Skip to main content
Version: 1.0

Sync orders

Get you API Key

Before you start using the API, you need to get your API key. To do this, contact your account manager.

List orders

In order to get a list of orders, you need to send a GET request to the following endpoint:

https://api.robosize.com/api/v1/business/order/?api_key=API_KEY

The response will be a JSON object with the following structure:

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "ORDER_ID",
"store_id": "STORE_ID",
"data": {},
"recommendations": [
{
"id": "RECOMMENDATION_ID",
"ip_address": "IP_ADDRESS",
"product": {},
"data": {},
"creation_time": "Thursday, Jan 01 1970 00:00:00 AM"
}
]
}
]
}
Note

The id field is the order ID that you will need to use in the subsequent API calls. This id is different from the order ID that you use in your store and is returned in the create order API call.

Store ID

The store_id field is the ID of the order in your store.

Create order

In order to create an order, you need to send a POST request to the same endpoint with the following content:

{
"store_id": "STORE_ID",
"device_id": "DEVICE_ID",
"data": {}
}
Device ID

The device_id field is the ID of the device that the order was created on. If you are using the Robosize widget, this ID is automatically generated by the widget and is available at window.Robosize.deviceId. Otherwise, you need to generate this ID yourself. Check out tracking integration for more details.

The response will be a JSON object with the following structure:

{
"id": 1,
"store_id": "STORE_ID",
"data": {},
"recommendations": []
}

Update order

In order to update a product, you need to send a PATCH request to the following endpoint:

https://api.robosize.com/api/v1/business/order/ORDER_ID/?api_key=API_KEY
{
"store_id": "NEW_STORE_ID",
"data": {}
}

The response will be a JSON object similar to the one returned on the create order API call.

Delete order

In order to delete a product, you need to send a DELETE request to the same edit endpoint.