Update Existing Product Information
  • 19 Feb 2024
  • 3 Minutes to read

    Update Existing Product Information


      Article Summary

      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.

      Your title goes here
      If the update requested item_id does not exist on Product Catalog, the update will not be saved.
      Your title goes here
      You can refer here to read Update API v1 documentation. Please bear in mind that it will be deprecated in December 2023.

      Endpoint and Headers

      POST https://catalog.api.useinsider.com/v2/update

      Headers

      HeadersSample ValueDescription
      X-PARTNER-NAMEmy-parter-nameThis 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.

      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.

      your title goes here
      If any undefined attribute is sent through Catalog API, the respective product(s) will be updated without the undefined attribute(s).
      Field NameDescriptionData TypeRequired
      item_idUnique product IDStringYes
      localeLanguage of the websiteStringYes
      nameName of the productStringNo
      urlURL address of the productStringNo
      image_urlURL address of the product imageStringNo
      categoryCategory tree of the productArray (of string)No
      descriptionProduct descriptionStringNo
      priceUnit price of the product. Object key is currency (string) and value is  values will be in float type.Object {String:Float}No
      original_priceOriginal 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_stockStock status of the productIntegerNo
      variantsOther variants of the given product IDArray (of string)No
      brandBrand information of the productStringNo
      colorColor information of the productStringNo
      sizeSize information of the productStringNo
      groupcodeInformation for group product variants.StringNo
      product_attributesObject of the custom product attributesObject {key:value}No

      Sample Example

      Sample Request

      Products in JSON format can be sent as batches if they are packed inside a comma-separated list.

      [{
              "item_id": "2159967",
              "locale": "en_US",      
              "in_stock": 1,    
              "price": {            
                    "USD": 40.9        
                },              
              "original_price": {            
                    "USD": 49.9        
                } 
      }]

      Sample Response

      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,
          "message": {
              "invalidRatio": 0,
              "valid": {
                  "count": 1
              },
              "invalid": {
                  "count": 0,
                  "details": []
              },
              "warnings": {
                  "count": 0,
                  "details": []
              }
          }
      }

      Sample Request

      Update API can also return successful responses with warnings in the response body. These warnings refer to optional attributes being entered by the user 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 see a sample request and a Catalog API response that contains a warning below.

       [{
          "item_id": "Item-123",
          "locale": "en_US",
          "in_stock": 1,
          "price": {
              "USD": 35.5
          },
          "original_price": {
              "USD": 35.5
          },
          "product_attributes": {
              "stock_code": "01020304"
          }
      }]

      Sample Response

      In this example, if the stock_code attribute is not defined as a Product Attribute for you before requesting the Catalog API, responses include a warning message as below.

      {
          "success": true,
          "message": {
              "invalidRatio": 0,
              "valid": {
                  "count": 1
              },
              "invalid": {
                  "count": 0,
                  "details": []
              },
              "warnings": {
                  "count": 1,
                  "details": [
                      {
                          "message": "Product attribute keys are not included in partners attribute.(stock_code)is not included in partner attribute map.",
                          "count": 1,
                          "document_ids": [
                              "Item-123:en_US"
                          ]
                      }
                  ]
              }
          }
      }

      400 Invalid Data Exception; Couldn’t Parse JSON

      {
          "status": false,
          "message": "Request data is not in valid JSON format."
      }

      400 Maximum Allowed Record Count

      {
          "status": false,
          "message": "Maximum allowed request size is exceeded."
      }

      400 Maximum Allowed Request Size

      {
          "status": false,
          "message": "Maximum allowed request size is exceeded."
      }

      401 Partner Cannot Be Validated

      {
          "status": false,
          "message": "Partner does not have necessary integration settings for Catalog API."
      }

      401 Wrong Token Usage

      {
          "status": false,
          "message": "Partner token authentication failed."
      }

      500 Internal Server Error

      {
          "status": false,
          "message": "Internal server error."
      }

      Limitations

      • Only existing data can be sent via this API. If a non-exist product is sent, it will be not updated.
      • For all the other limitations, refer here. 

      Was this article helpful?


      ESC

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