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 Name | Parameter Value | Parameter Example | Description | Format | Required |
---|---|---|---|---|---|
offer_id | {order_offer_id} | 1234 | Fixed merchant id. Please obtain this value from your ShopBack representative. | numeric | mandatory |
adv_sub | { customer_facing_order_id } | Order1 | Customer-facing order id | alphanumeric | mandatory |
adv_sub2 | { line_item_category } | Electronics | Product category | alphanumeric | optional |
adv_sub3 | { line_item_quantity } | 3 | Product quantity | alphanumeric | optional |
adv_sub4 | { line_item_id } | A2648 | Product ID or SKU ID | alphanumeric | optional |
adv_sub5 | { order_total } | 100 | Order total amount paid by customer | - numeric value (2 decimals max) - will not accept “,” (commas) - will not accept “MYR” (currency code) | optional |
adv_unique1 | optional | ||||
adv_unique2 | optional | ||||
adv_unique3 | optional | ||||
adv_unique4 | optional | ||||
adv_unique5 | optional | ||||
transaction_id | { transaction_id } | 102b983f153f632c9a0a1469e27b55 (example only) | transaction_id from a ShopBack redirect link | alphanumeric (30 digits) | mandatory |
amount | { final_line_subtotal } | 1234.56 | The 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
String | Description |
---|---|
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. |
Updated over 1 year ago