Product sync API
Before you start using the API, you need to get your API key. To do this, contact your account manager.
List products
In order to get a list of products, you need to send a GET
request to the following endpoint:
https://api.robosize.com/api/v1/product/?api_key=API_KEY
The response will be a JSON object with the following structure:
{
"count": 1000,
"next": "https://api.robosize.com/api/v1/product/?api_key=API_KEY&limit=50&offset=50",
"previous": null,
"results": [
{
"id": "PRODUCT_ID",
"store_id": "STORE_ID",
"name": "PRODUCT_NAME",
"status": "active",
"brand": "BRAND",
"tags": [
{
"name": "Pant"
}
],
"fit_toughness": 5,
"comment": null,
"image_md": "IMAGE_URL",
"available_sizes": "S,M,L,XL,XXL",
"size_chart": {},
"fabric": {},
"handle": "PRODUCT_URL_SLUG"
}
]
}
The id
field is the product ID that you will need to use in the subsequent API calls.
This id
is different from the product ID that you use in your store and is returned in the create product API call.
The store_id
field is the ID of the product in your store. This field is used as the product ID on the product page passed to the script.
Create product
In order to create a product, you need to send a POST
request to the same product endpoint with the following content:
{
"name": "PRODUCT_NAME",
"store_id": "123456",
"tags": [
"tag 1",
"tag 2",
"tag 3"
],
"image_url": "IMAGE_URL",
"type": "top"
}
The response will be a JSON object with the following structure:
{
"created": 1,
"id": "PRODUCT_ID"
}
Update product
In order to update a product, you need to send a PATCH
request to the same product endpoint with the following content:
{
"products": [
"PRODUCT_ID"
],
"store_id": "NEW_STORE_ID",
"name": "New product name",
"tags": [
"tag 1",
"tag 2"
],
"image_url": "NEW_IMAGE_URL",
"type": "top"
}
The response will be a JSON object with the following structure:
{
"message": "Products updated"
}
You can update only the fields that you need to change. The rest of the fields that are not included will remain unchanged.
Delete product
In order to delete a product, you need to send a DELETE
request to the same product endpoint with hash=PRODUCT_ID
as a query parameter.