Order API - Item Level Tracking

Order API Specifications - Item Level Tracking

This API is used for order data postback. Once the purchase is done and API gets called, ShopBack will receive the data and keep it in the system with a pending status for further validation.

📘

As a general rule for ShopBack APIs, all parameter values must be URL-encoded to prevent read errors.

GET URL: http://shopback.go2cloud.org/aff_lsr

Parameter NameParameter ValueParameter ExampleDescriptionFormatRequired
offer_id{order_offer_id}1234Fixed merchant id. Please obtain this value from your ShopBack representative.numericmandatory
adv_sub{ customer_facing_order_id }Order1Customer-facing order idalphanumericmandatory
adv_sub2{ line_item_category }ElectronicsProduct categoryalphanumericoptional
adv_sub3{ line_item_quantity }3Product quantityalphanumericoptional
adv_sub4{ line_item_id }A2648Product ID or SKU IDalphanumericoptional
adv_sub5{ order_total }100Order total amount paid by customer- numeric value (2 decimals max)
- will not accept “,” (commas)
- will not accept “MYR” (currency code)
optional
adv_unique1optional
adv_unique2optional
adv_unique3optional
adv_unique4optional
adv_unique5optional
transaction_id{ transaction_id }102b983f153f632c9a0a1469e27b55 (example only)transaction_id from a ShopBack redirect linkalphanumeric (30 digits)mandatory
amount{ final_line_subtotal }1234.56The combined price of all of the items in the line item. This includes any line-level discounts such as coupon codes or credits.

The value is equal to line_item_final_price multiplied by line_item_quantity.
- numeric value (2 decimals max)
- will not accept “,” (commas)
- will not accept “MYR” (currency code)
mandatory
security_token{ security_token }070a632e2b574ca894d90610c7da97bc (example only)Static security token specific to each merchant. Please obtain this value from your ShopBack representative.alphanumeric (32 digits)mandatory

Example Order API

Merchant replaces the following fields with the actual values:

http://shopback.go2cloud.org/aff_lsr?
offer_id={order_offer_id}&
adv_sub={ customer_facing_order_id }&
adv_sub2={ line_item_category }&
adv_sub3={ line_item_quantity }&
adv_sub4={ line_item_id }&
adv_sub5={ order_total }&
transaction_id={ transaction_id }&
amount={ final_line_subtotal }&
security_token={ security_token }

Order API Demonstration

Merchant replaces the following fields with the actual values:

  • Order 123
    • Item 1, Category A, quantity 2, RM10 each
    • Item 2, Category B, quantity 5, RM2 each
    • Item 3, Category C, quantity 15, RM1 each
    • Click_id = ABCD1234

API 1:
[http://shopback.go2cloud.org/aff_lsr?

offer_id={order_offer_id}&adv_sub=order_123&adv_sub2=category_A&adv_sub3=2&adv_sub4=item_1&adv_sub5=45&transaction_id=ABCD1234&amount=20&security_token={ security_token }

API 2:
[http://shopback.go2cloud.org/aff_lsr?

offer_id={order_offer_id}&adv_sub=order_123&adv_sub2=category_B&adv_sub3=5&adv_sub4=item_2&adv_sub5=45&transaction_id=ABCD1234&amount=10&security_token={ security_token }

API 3:
[http://shopback.go2cloud.org/aff_lsr?

offer_id={order_offer_id}&adv_sub=order_123&adv_sub2=category_C&adv_sub3=15&adv_sub4=item_3&adv_sub5=45&transaction_id=ABCD1234&amount=15&security_token={ security_token }

Order API Response

Status Code - 200

StringDescription
sucess=true;The order has been created successfully by API call.
success=false;
err_msg=Invalid Trans. ID
Transaction_id is in the wrong format.
success=false;
err_msg=Request offer #1234 does not match session offer #2345.
This transaction_id wasn’t distributed by your offer.
success=false;
err_msg=Duplicate recorded with Trans. ID
This transaction_id has already expired.