Update Stock Information
- 08 May 2024
- 1 Minute to read
Update Stock Information
- Updated on 08 May 2024
- 1 Minute to read
Article Summary
Share feedback
Thanks for sharing your feedback!
Your title goes here
If you are using this API on your end, we highly suggest you to use our new Update API that enables you to update the existing products in your product catalog since this API will deprecated and removed very soon.
Overview
Stock Update API provides a service to update the stock information of the existing products in the Product Catalog. With the API, products can be instantly updated if overcoming the latency on product-related field updates is necessary.
Your title goes here
If the given item_id in the request does not exist in the Product Catalog, the update action will not be performed.
Endpoint and Headers
POST https://catalog.api.useinsider.com/v1/stock-update
Headers
Headers | Sample Value | Description |
---|---|---|
X-PARTNER-NAME | mybrand | 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 stock-update endpoint does not require all of the product fields of the products already updated or inserted. Instead, product_id and locale fields are required to update the stock information of a specific product.
You should send the following product fields as parameters in the object with their field name and data type as stated.
Field Name | Description | Data Type | Required |
---|---|---|---|
locale | Language of the website | String | Yes |
item_ids | List of unique product IDs to update the stock information as 0 | List of Strings | Yes |
items.item_id | Product id that you update the stock information | String | Yes |
items.in_stock | Stock information to update | Integer. 0 or 1 | Yes |
Sample Example
Sample Request
{
"groups": [
{
"locale": "tr_TR",
"items": [
{"item_id": "2511017", "in_stock": 0},
{"item_id": "2511018", "in_stock": 0},
{"item_id": "2511019", "in_stock": 1}
]
},
{
"locale": "en_US",
"items": [
{"item_id": "1111017", "in_stock": 0},
{"item_id": "111019", "in_stock": 0}
]
}
]
}
Sample Response
200 OK
{
"success": true,
"results": {
"successful": {
"count": 5
},
"fail": {
"count": 0,
"records": []
},
"warnings": []
}
}
Limitations
- The endpoint only works for stock information updates for products.
- For all the other limitations, refer Catalog API Limitations.
Was this article helpful?