Follow

Orders tracking

There are two big states in the BrainSINS orders tracking process: creating an order and closing an order. The first one asserts that the user has products in his cart, and the later means that the user has finished his purchase.

Creating an order

Path:

https://api.brainsins.com/RecSinsAPI/api/order/trackOrder.xml?token={TOKEN}

Type: POST

URL Parameters:

  • TOKEN: your account BrainSINS token

Post Parameters: xml in the body representing the product list, as described in the following example:

<recsins version="0.1">
<orders>
<order>
<idBuyer>10000001</idBuyer>
<products>
<product>
<idProducts>5</idProducts>
<productType>product</productType>
<price>45.6</price>
<quantity>1</quantity>
</product>
<product>
<idProducts>56</idProducts>
<productType>product</productType>
<price>45.6</price>
<quantity>1</quantity>
</product>
</products>
</order>
</orders>
</recsins>

Example: 

https://api.brainsins.com/RecSinsAPI/api/order/trackOrder.xml?token=BS-8709661092-1


Closing an order

Path:

https://api.brainsins.com/RecSinsAPI/api/purchase/close/{IDPURCHASE}/{IDUSER}/{AMOUNT}.xml?token={TOKEN}

Type: POST

URL Parameters:

  • IDPURCHASE: numeric identifier for the purchase
  • IDUSER: numeric user identifier
  • AMOUNT: the final purchase value can contain decimals separated with a dot like 10.5
  • TOKEN: your account BrainSINS token

Example:

https://api.brainsins.com/RecSinsAPI/api/purchase/close/111/100001/12.9.xml?token=BS-8709661092-1

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk