---
agentTools:
  projectIndex: https://commercehq.readme.io/llms.txt
---

# Create a product

[block:api-header]
{
  "type": "post",
  "title": "/products"
}
[/block]

Creates a new product.

[block:api-header]
{
  "type": "basic",
  "title": "Request body attributes"
}
[/block]

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

[block:parameters]
{
  "data": {
    "h-0": "Title",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "title",
    "1-0": "is_multi",
    "2-0": "type",
    "4-0": "tags",
    "5-0": "shipping_weight",
    "6-0": "auto_fulfilment",
    "7-0": "track_inventory",
    "8-0": "vendor",
    "9-0": "sku",
    "10-0": "seo_meta",
    "11-0": "seo_title",
    "12-0": "seo_url",
    "13-0": "is_template",
    "14-0": "is_draft",
    "21-0": "options",
    "22-0": "options.title",
    "23-0": "options.changes_look",
    "24-0": "options.values",
    "25-0": "options.thumbnails",
    "26-0": "options.thumbnails.value",
    "27-0": "options.thumbnails.color",
    "28-0": "options.thumbnails.image",
    "29-0": "variants",
    "30-0": "variants.variant",
    "31-0": "variants.price",
    "32-0": "variants.compare_price",
    "0-1": "string",
    "1-1": "bool",
    "2-1": "string",
    "4-1": "array of strings",
    "5-1": "float",
    "6-1": "bool",
    "7-1": "bool",
    "8-1": "string",
    "9-1": "string",
    "10-1": "string",
    "11-1": "string",
    "12-1": "string",
    "13-1": "bool",
    "14-1": "bool",
    "21-1": "object containing arrays",
    "22-1": "string",
    "23-1": "bool",
    "24-1": "array of strings",
    "25-1": "object containing arrays",
    "26-1": "string",
    "27-1": "string",
    "28-1": "id",
    "29-1": "object containing arrays",
    "30-1": "array of strings",
    "31-1": "float",
    "32-1": "float",
    "31-2": "Price of the variant",
    "32-2": "Compare price of the variant",
    "0-2": "Title of the product",
    "1-2": "If the product is multi variant as opposed to single variant",
    "2-2": "Type of the product, for example Shirts",
    "3-0": "collections",
    "3-1": "array of ints",
    "3-2": "Array containing IDs of collections that the product belongs to. Only returns collections with manual addition of products",
    "4-2": "Tags assigned to the product",
    "5-2": "Shipping weight of the product",
    "6-2": "Whether automatic fulfilment is enabled",
    "7-2": "Whether product is tracked in Inventory",
    "8-2": "Name of the vendor that supplies the product",
    "9-2": "SKU of the product",
    "10-2": "Meta for SEO",
    "11-2": "Page title for SEO",
    "12-2": "Page URL for SEO. Generates automatically from title",
    "13-2": "Whether this is a template to create products from",
    "14-2": "Whether this product is a draft that is not published",
    "21-2": "Options for multi-variant products",
    "22-2": "Title of the option, for example Color",
    "23-2": "Whether this option changes look of the product",
    "24-2": "Values of the option, for example Red and Blue",
    "25-2": "Thumbnails that will be used in the variant selector on the product page",
    "26-2": "Value of the option for which the thumbnail is used, for example Red",
    "27-2": "Color of the selector thumbnail, HEX value. Either color or image is used.",
    "28-2": "Image ID for the selector thumbnail. Either color or image is used. **Images have to be uploaded first through the Images API**",
    "29-2": "Variants resulting from combining of options",
    "30-2": "A combination of options, for example Red and Big",
    "33-0": "variants.sku",
    "34-0": "variants.default",
    "35-0": "variants.ignore",
    "36-0": "variants.images",
    "17-0": "textareas",
    "18-0": "textareas.name",
    "19-0": "textareas.text",
    "20-0": "images",
    "17-1": "object containing arrays",
    "18-1": "string",
    "19-1": "string",
    "20-1": "array of ints",
    "33-1": "string",
    "34-1": "bool",
    "35-1": "bool",
    "36-1": "array of ints",
    "17-2": "Custom 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 here",
    "18-2": "Title of the tab. Only the titles that have been pre-set on Product settings page can be used here",
    "19-2": "Text contents of the tab",
    "20-2": "Image IDs for the product. Used if no variants change product look. **Images have to be uploaded first through the Images API**",
    "33-2": "SKU of the variant",
    "34-2": "Whether the variant is default",
    "35-2": "Whether the variant should not be used",
    "36-2": "Array containing image IDs for the variant if it changes product look. **Images have to be uploaded first through the Images API**",
    "h-3": "Required?",
    "0-3": "Yes",
    "1-3": "No",
    "2-3": "No",
    "3-3": "No",
    "4-3": "No",
    "5-3": "No",
    "6-3": "No",
    "7-3": "No",
    "8-3": "No",
    "9-3": "No",
    "10-3": "No",
    "11-3": "No",
    "12-3": "No",
    "13-3": "No",
    "14-3": "No",
    "17-3": "No",
    "18-3": "Yes, if textareas are used",
    "19-3": "Yes, if textareas are used",
    "20-3": "No",
    "21-3": "Yes, if product is multi variant",
    "22-3": "Yes, if options are used",
    "23-3": "No",
    "24-3": "Yes, if options are used",
    "25-3": "No",
    "26-3": "Yes, if thumbnails are used",
    "27-3": "No",
    "28-3": "No",
    "29-3": "No",
    "30-3": "Yes, if variants are used",
    "31-3": "Yes, if variants are used",
    "32-3": "No",
    "33-3": "No",
    "34-3": "No",
    "35-3": "No",
    "36-3": "No",
    "15-0": "price",
    "15-1": "float",
    "15-2": "Price of the product, for single variant products",
    "15-3": "Yes, if product is single variant",
    "16-0": "compare_price",
    "16-1": "float",
    "16-2": "Compare price of the product, for single variant products",
    "16-3": "No"
  },
  "cols": 4,
  "rows": 37
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Response attributes"
}
[/block]

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

[block:parameters]
{
  "data": {
    "h-0": "Title",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "id",
    "1-0": "title",
    "2-0": "is_multi",
    "3-0": "type",
    "5-0": "tags",
    "6-0": "shipping_weight",
    "7-0": "auto_fulfilment",
    "8-0": "track_inventory",
    "9-0": "vendor",
    "10-0": "sku",
    "11-0": "seo_meta",
    "12-0": "seo_title",
    "13-0": "seo_url",
    "14-0": "is_template",
    "15-0": "is_draft",
    "18-0": "created_at",
    "19-0": "updated_at",
    "20-0": "options.title",
    "21-0": "options.changes_look",
    "22-0": "options.values",
    "23-0": "options.thumbnails",
    "24-0": "options.thumbnails.value",
    "25-0": "options.thumbnails.color",
    "26-0": "options.thumbnails.image",
    "27-0": "options.thumbnails.image.id",
    "28-0": "options.thumbnails.image.path",
    "29-0": "options.thumbnails.image.max_size",
    "30-0": "variants",
    "31-0": "variants.id",
    "32-0": "variants.variant",
    "33-0": "variants.price",
    "34-0": "variants.compare_price",
    "0-1": "int",
    "1-1": "string",
    "2-1": "bool",
    "3-1": "string",
    "5-1": "array of strings",
    "6-1": "float",
    "7-1": "bool",
    "8-1": "bool",
    "9-1": "string",
    "10-1": "string",
    "11-1": "string",
    "12-1": "string",
    "13-1": "string",
    "14-1": "bool",
    "15-1": "bool",
    "18-1": "int",
    "19-1": "int",
    "20-1": "string",
    "21-1": "bool",
    "22-1": "array of strings",
    "23-1": "object containing arrays",
    "24-1": "string",
    "25-1": "string",
    "26-1": "array of mixed",
    "27-1": "int",
    "28-1": "string",
    "29-1": "int",
    "30-1": "object containing arrays",
    "31-1": "int",
    "32-1": "array of strings",
    "33-1": "float",
    "34-1": "float",
    "33-2": "Price of the variant",
    "34-2": "Compare price of the variant",
    "0-2": "ID of the product",
    "1-2": "Title of the product",
    "2-2": "If the product is multi variant as opposed to single variant",
    "3-2": "Type of the product, for example Shirts",
    "4-0": "collections",
    "4-1": "array of ints",
    "4-2": "Array containing IDs of collections that the product belongs to. Only returns collections with manual addition of products",
    "5-2": "Tags assigned to the product",
    "6-2": "Shipping weight of the product",
    "7-2": "Whether automatic fulfilment is enabled",
    "8-2": "Whether product is tracked in Inventory",
    "9-2": "Name of the vendor that supplies the product",
    "10-2": "SKU of the product",
    "11-2": "Meta for SEO",
    "12-2": "Page title for SEO",
    "13-2": "Page URL for SEO. Generates automatically from title",
    "14-2": "Whether this is a template to create products from",
    "15-2": "Whether this product is a draft that is not published",
    "18-2": "Timestamp of the product creation time",
    "19-2": "Timestamp of the product last update time",
    "20-2": "Title of the option, for example Color",
    "21-2": "Whether this option changes look of the product",
    "22-2": "Values of the option, for example Red and Blue",
    "23-2": "Thumbnails that will be used in the variant selector on the product page",
    "24-2": "Value of the option for which the thumbnail is used, for example Red",
    "25-2": "Color of the selector thumbnail, HEX value. Either color or image is used.",
    "26-2": "Image of the selector thumbnail. Either color or image is used.",
    "27-2": "ID of the image, if image is used",
    "28-2": "Absolute URL of the image, if image is used",
    "29-2": "Max size of the image, for internal usage",
    "30-2": "Variants resulting from combining of options",
    "31-2": "ID of the variant",
    "32-2": "A combination of options, for example Red and Big",
    "35-0": "variants.sku",
    "36-0": "variants.default",
    "37-0": "variants.ignore",
    "39-0": "variants.images.id",
    "40-0": "variants.images.path",
    "38-0": "variants.images",
    "41-0": "variants.images.max_size",
    "35-1": "string",
    "36-1": "bool",
    "37-1": "bool",
    "38-1": "object containing arrays",
    "39-1": "int",
    "40-1": "string",
    "41-1": "int",
    "35-2": "SKU of the variant",
    "36-2": "Whether the variant is default",
    "37-2": "Whether the variant should not be used",
    "38-2": "Images for the variant if it changes product look",
    "39-2": "ID of the image",
    "40-2": "Absolute URL of the image",
    "41-2": "Max size of the image, for internal usage",
    "16-0": "price",
    "16-1": "float",
    "16-2": "Price of the product, for single variant products",
    "17-0": "compare_price",
    "17-1": "float",
    "17-2": "Compare price of the product, for single variant products"
  },
  "cols": 3,
  "rows": 16
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "POST https://mystore.commercehq.com/api/v1/products/\n\n{\n    \"title\": \"Good product 123\",\n    \"price\": 1,\n    \"collections\": [1],\n    \"images\": [8],\n    \"tags\":[\"tag1\", \"tag heuer\"],\n    \"type\":\"Shoes\",\n    \"vendor\":\"abidas\",\n    \"is_multi\": true,\n    \"options\":[\n        {\n            \"title\": \"Color\",\n            \"changes_look\": false,\n            \"values\": [\"red\"]\n        },\n        {\n            \"title\": \"Size\",\n            \"changes_look\": false,\n            \"values\": [\"S\", \"XL\"],\n            \"thumbnails\": [\n                {\n                    \"value\": \"S\",\n                    \"color\": \"#000\",\n                    \"image\": 7\n                }\n            ]\n        }\n    ],\n    \"variants\":[\n        {\n            \"variant\": [\"red\"],\n            \"price\": 1,\n            \"compare_price\": 1,\n            \"sku\": \"abc\",\n            \"default\": true,\n            \"ignore\": true,\n            \"images\": [12]\n        }\n    ],\n    \"seo_url\": \"good-product-123\"\n}",
      "language": "json",
      "name": "Sample request"
    }
  ],
  "sidebar": true
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"id\": 18,\n  \"title\": \"Good product 123\",\n  \"is_multi\": true,\n  \"type\": \"Shoes\",\n  \"collections\": [\n    1\n  ],\n  \"tags\": [],\n  \"shipping_weight\": null,\n  \"auto_fulfilment\": false,\n  \"track_inventory\": false,\n  \"vendor\": \"abidas\",\n  \"sku\": null,\n  \"seo_meta\": null,\n  \"seo_title\": null,\n  \"seo_url\": \"good-product-123\",\n  \"is_template\": false,\n  \"is_draft\": false,\n  \"created_at\": 1485010678,\n  \"updated_at\": 1485010678\n}",
      "language": "json",
      "name": "Sample response"
    }
  ],
  "sidebar": true
}
[/block]