Upsert (Update/Insert) Products
The third endpoint is one of the most important endpoint. This is the endpoint to send your items that will be used in our system to search your items. This is a bulk insert/update endpoint, so you can give multiple items at once (max 500 items at once to give best performance).
note
All attributes in the items must be provided by the mapping fields, which you add in the first step.
POST#
#
HeaderField | Type | Description |
---|---|---|
x-token | String | token Users unique token |
#
Request Header Example#
Request BodyField | Type | Description |
---|---|---|
items | Object[] | Items |
id | String | Unique id of the item |
title optional | String | Title of the item, our search widget and client panel will use this field to show the name of product |
link optional | String | Our search widget need this field to go to the product page after user click |
image_link optional | String | Url of image, our search widget and client panel will use this field to show the picture of product |
thumb_link optional | String | Url of image (smaller than image_link or same one with image_link), our search widget and client panel will use this field to show the picture of product |
availability optional | String | Boolean to detect the availability of the items (this will used in our search widget) |
categoryIds optional | String | You didnt need to add this in mappingSync, we already provide this and hide it from client panel. Array of categoryId, this field will be used for autosuggestion and filter category espcially if you used our search widget |
price optional | String | Price of the product, our default search widget will use this field to show price |
sale_price optional | String | Sale price of the product, our default search widget will use this field to show sale price and will give strikethrough text to price |
coordinates optional | Object | Coordinates of the product if you want to use geolocation feature |
#
Body Request Example#
Success 200Field | Type | Description |
---|---|---|
success | Boolean | Request was successful |
inserted | Number | Number of total success inserted items |
failed | Object[] | Reasons of fail inserted items |
    reason | String | Unique id of the items |