Update Stock Information
  • 08 May 2024
  • 1 Minute to read

    Update Stock Information


      Article Summary

      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

      HeadersSample ValueDescription
      X-PARTNER-NAMEmybrandThis is your partner name. Navigate to InOne > InOne Settings > Account Preferences to copy your partner name. The partner name should be lowercase.
      X-REQUEST-TOKEN1a2b3c4d5e6fThis 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 NameDescriptionData TypeRequired
      localeLanguage of the websiteStringYes
      item_idsList of unique product IDs to update the stock information as 0List of StringsYes
      items.item_idProduct id that you update the stock informationStringYes
      items.in_stockStock information to updateInteger. 0 or 1Yes

      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?


      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses