- 29 Dec 2023
- 3 Minutes to read
Update existing product information / v1
- Updated on 29 Dec 2023
- 3 Minutes to read
Overview
Update API provides a service to update the existing products in your Product Catalog. You can send any of the field requests to update your Product Catalogs directly.
Endpoint and Headers
POST https://catalog.api.useinsider.com/v1/update
Headers
Headers | Sample Value | Description |
---|---|---|
X-PARTNER-NAME | my-brand-name | This is your partner name. Navigate to InOne > InOne Settings > Account Preferences to copy your partner name. The partner name should be lowercase. |
X-REQUEST-TOKEN | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to API Authentication Tokens to generate your Catalog API token. |
Body Parameters
The following product fields should be sent as parameters in the object with their field name and data type as stated. If any of the required fields is not sent through Catalog API, the respective product is not updated or inserted. At least one update field should be sent except from the required fields.
Field Name | Description | Data Type | Required |
---|---|---|---|
item_id | Unique product ID | String | Yes |
locale | Language of the website | String | Yes |
name | Name of the product | String | No |
url | URL address of the product | String | No |
image_url | URL address of the product image | String | No |
category | Category tree of the product | Array (of string) | No |
description | Product description | String | No |
price | Unit price of the product. Object key is currency (string) and value is values will be in float type. | Object {String:Float} | No |
original_price | Original price of the product without any discount. Object key is currency (string) and value is values will be in float type. | Object {String:Float} | No |
in_stock | Stock status of the product | Integer | No |
brand | Brand information of the product | String | No |
color | Color information of the product | String | No |
size | Size information of the product | String | No |
groupcode | Information for group product variants. | String | No |
product_attributes | Object of the custom product attributes | Object {key:value} | No |
Sample Example
Sample Request
[{
"item_id": "2159967",
"locale": "en_US",
"in_stock": 1,
"price": {
"USD": 40.9
},
"original_price": {
"USD": 49.9
}
}]
Sample Responses
200 OK
Catalog API returns responses with status code 200 for successful requests. Successful responses display the number of valid products to be updated and the full information of the failed products.
{
"success": true,
"result": {
"successful": {
"count": 1,
},
"fail": {
"count": 0,
"records": []
}
}
}
Update API can also return successful responses with warnings in the response body. These warnings refer to optional attributes entered wrongly. In such cases, products in the requests are still processed. However, product attributes causing the warnings are ignored and not updated in your Product Catalog. You can observe below a sample request and a Catalog API response that contains a warning.
[{
"item_id": "Item-123",
"locale": "en_US",
"in_stock": 1,
"price": {
"USD": 35.5
},
"original_price": {
"USD": 35.5
},
"product_attributes": {
"stock_code": "01020304"
},
}]
In the example below, if the stock_code attribute is not defined as a Product Attribute for you before requesting the Catalog API, responses include a warning message:
{
"success": true,
"results": {
"successful": {
"count": 1
},
"fail": {
"count": 0,
"records": []
},
"warnings": [{
"data": "[{\"field\":\"stock_code\",\"message\":\"Product attribute keys are not included in partners attribute.(stock_code) is not included in partner attribute map.\"}]"
}]
}
}
400 Invalid Data Exception; Couldn't parse json
{
"success": false,
"message": "Request data is not in valid JSON format."
}
400 Maximum Allowed Record Count
{
"success": false,
"message": "Maximum allowed record count is exceeded."
}
400 Maximum Allowed Request Size
{
"success": false,
"message": "Maximum allowed request size is exceeded."
}
401 Partner cannot be validated
{
"success": false,
"message": "Partner does not have necessary integration settings for Catalog API."
}
401 Wrong Token Usage
{
"success": false,
"message": "Partner token authentication is unsuccessful."
}
429 Partner rate limit exceeded
{
"success": false,
"message": "Usage request rate of partner is exceeded for current period."
}
500 Internal Error
{
"success": false,
"message": "The request processing has failed because of an unknown error."
}
Limitations
- For all the limitations, refer here.