/products/id

Updates an existing product. If it has been purchased before, its data will remain untouched in orders.

URL parameters

Parameters that you can append to the URL, for example: ?parameter=value

TitleTypeDescriptionRequired?
idintID of a single product to update. Can be used after the slash.
Example:
products/27
update product with ID 27
Yes

Request body attributes

Parameters that you can send in the request body in JSON format, for example:
{"id": 1,"title": "Product"}

TitleTypeDescriptionRequired?
titlestringTitle of the productNo
is_multiboolIf the product is multi variant as opposed to single variantNo
typestringType of the product, for example ShirtsNo
collectionsarray of intsArray containing IDs of collections that the product belongs to. Only returns collections with manual addition of productsNo
tagsarray of stringsTags assigned to the productNo
shipping_weightfloatShipping weight of the productNo
auto_fulfilmentboolWhether automatic fulfilment is enabledNo
track_inventoryboolWhether product is tracked in InventoryNo
vendorstringName of the vendor that supplies the productNo
skustringSKU of the productNo
seo_metastringMeta for SEONo
seo_titlestringPage title for SEONo
seo_urlstringPage URL for SEO. Generates automatically from titleNo
is_templateboolWhether this is a template to create products fromNo
is_draftboolWhether this product is a draft that is not publishedNo
pricefloatPrice of the product, for single variant productsNo
compare_pricefloatCompare price of the product, for single variant productsNo
textareasobject containing arraysCustom pieces of text that can be displayed as tabs on the product page. Only the titles that have been pre-set on Product settings page can be used hereNo
textareas.namestringTitle of the tab. Only the titles that have been pre-set on Product settings page can be used hereYes, if textareas are used
textareas.textstringText contents of the tabYes, if textareas are used
imagesarray of intsImage IDs for the product. Used if no variants change product look. Images have to be uploaded first through the Images APINo
optionsobject containing arraysOptions for multi-variant productsYes, if product is multi variant
options.titlestringTitle of the option, for example ColorYes, if options are used
options.changes_lookboolWhether this option changes look of the productNo
options.valuesarray of stringsValues of the option, for example Red and BlueYes, if options are used
options.thumbnailsobject containing arraysThumbnails that will be used in the variant selector on the product pageNo
options.thumbnails.valuestringValue of the option for which the thumbnail is used, for example RedYes, if thumbnails are used
options.thumbnails.colorstringColor of the selector thumbnail, HEX value. Either color or image is used.No
options.thumbnails.imageidImage ID for the selector thumbnail. Either color or image is used. Images have to be uploaded first through the Images APINo
variantsobject containing arraysVariants resulting from combining of optionsNo
variants.variantarray of stringsA combination of options, for example Red and BigYes, if variants are used
variants.pricefloatPrice of the variantYes, if variants are used
variants.compare_pricefloatCompare price of the variantNo
variants.skustringSKU of the variantNo
variants.defaultboolWhether the variant is defaultNo
variants.ignoreboolWhether the variant should not be usedNo
variants.imagesarray of intsArray containing image IDs for the variant if it changes product look. Images have to be uploaded first through the Images APINo

Response attributes

Attributes that you will receive in response from the endpoint in JSON format, for example:
{"id": 1,"title": "Product"}

TitleTypeDescription
idintID of the product
titlestringTitle of the product
is_multiboolIf the product is multi variant as opposed to single variant
typestringType of the product, for example Shirts
collectionsarray of intsArray containing IDs of collections that the product belongs to. Only returns collections with manual addition of products
tagsarray of stringsTags assigned to the product
shipping_weightfloatShipping weight of the product
auto_fulfilmentboolWhether automatic fulfilment is enabled
track_inventoryboolWhether product is tracked in Inventory
vendorstringName of the vendor that supplies the product
skustringSKU of the product
seo_metastringMeta for SEO
seo_titlestringPage title for SEO
seo_urlstringPage URL for SEO. Generates automatically from title
is_templateboolWhether this is a template to create products from
is_draftboolWhether this product is a draft that is not published
PATCH https://mystore.commercehq.com/api/v1/products/18

{
    "title": "Good product 123",
    "price": 1,
    "collections": [1],
    "images": [8],
    "tags":["tag1", "tag heuer"],
    "type":"Shoes",
    "vendor":"abidas",
    "is_multi": true,
    "options":[
        {
            "title": "Color",
            "changes_look": false,
            "values": ["red"]
        },
        {
            "title": "Size",
            "changes_look": false,
            "values": ["S", "XL"],
            "thumbnails": [
                {
                    "value": "S",
                    "color": "#000",
                    "image": 7
                }
            ]
        }
    ],
    "variants":[
        {
            "variant": ["red"],
            "price": 1,
            "compare_price": 1,
            "sku": "abc",
            "default": true,
            "ignore": true,
            "images": [12]
        }
    ],
    "seo_url": "good-product-123"
}
{
  "id": 18,
  "title": "Good product 123",
  "is_multi": true,
  "type": "Shoes",
  "collections": [
    1
  ],
  "tags": [],
  "shipping_weight": null,
  "auto_fulfilment": false,
  "track_inventory": false,
  "vendor": "abidas",
  "sku": null,
  "seo_meta": null,
  "seo_title": null,
  "seo_url": "good-product-123",
  "is_template": false,
  "is_draft": false,
  "created_at": 1485010678,
  "updated_at": 1485010678
}