Skip to main content

Create Product

Creates a new product with its pricing, media, options, variants and metafields. To create many products at once, use Create Multiple Products.

HTTP Request​

  • URL: /products
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_WRITE_PRODUCT

Request Body​

Send the product as a JSON object.

FieldTypeRequiredDescription
skuStringYesSKU of the product. Must be unique.
nameStringYesName of the product.
priceNumberYesBase price of the product.
costNumberNoCost price.
saleNumberNoSale price.
statusStringNoactive or inactive. Default is active.
visibilityBooleanNoWhether the product is visible on the storefront. Default is true.
descriptionObjectNoFull description. See Description Object.
shortDescriptionStringNoShort description.
specificationsArrayNoSpecifications. See Specification Object.
customUrlStringNoURL of the product page on the storefront.
manufacturerStringNoManufacturer name.
mpnStringNoManufacturer part number.
brandStringNoID of the product's brand.
categoriesArrayNoIDs of the categories the product belongs to.
weightNumberNoWeight of the product. Default is 1.
dimensionsObjectNowidth, height and depth as numbers. Each defaults to 1.
quantityObjectNominQuantity and quantityIncrement for ordering. Both default to 1.
trackInventoryBooleanNoWhether stock is tracked. Default is false.
inventoryTypeStringNoTrack stock per product or per variant. Default is product.
isFeaturedBooleanNoWhether the product is featured. Default is false.
isFreeShippingBooleanNoWhether the product ships free. Default is false.
isTaxExemptBooleanNoWhether the product is tax exempt. Default is false.
taxcodeStringNoTax code.
additionalCostObjectNoExtra cost. See Additional Cost Object.
tierPriceArrayNoQuantity price breaks. See Tier Price Object.
mediaGalleryArrayNoImages and videos. See Media Gallery Object.
filesArrayNoAttached files. See File Object.
optionsArrayNoProduct options. See Option Object.
variantsArrayNoProduct variants. See Variant Object.
groupedProductsArrayNoProducts in a grouped product. See Grouped Product Object.
bundledProductsArrayNoBundle sections. See Bundled Product Object.
relatedProductsArrayNoRelated product lists. See Related Product Object.
filtersArrayNoFilter values. See Filter Object.
metaFieldsArrayNoCustom field values. See Metafield Object.
searchKeyWordsArrayNoExtra keywords for storefront search.
synonymKeywordsArrayNoSearch synonyms.
seoObjectNoSEO settings. See SEO Object.
manageCustomsBooleanNoWhether customs details are used. Default is false.
customsObjectNoCustoms details. See Customs Object.
sortOrderNumberNoDisplay order.

Description Object​

FieldTypeRequiredDescription
dataTypeStringNoHTML or JSON. Default is HTML.
valueStringNoThe description content.

Specification Object​

FieldTypeRequiredDescription
nameStringNoName of the specification, for example Material.
valueStringNoValue of the specification.
displayStorefrontBooleanNoShow on the product page. Default is true.

Additional Cost Object​

FieldTypeRequiredDescription
typeStringNocustom, fixed or percentage. Default is fixed.
valueNumberNoAmount or percentage. Default is 0.

Tier Price Object​

FieldTypeRequiredDescription
quantityNumberNoMinimum quantity for this price break.
priceNumberNoPrice when tierPricingType is fixed.
discountNumberNoDiscount when tierPricingType is discount.
tierPricingTypeStringNofixed or discount. Default is fixed.
FieldTypeRequiredDescription
urlStringNoPublic URL of the image or video.
typeStringNoimage, video or embed. Default is image.
labelStringNoLabel or alt text.
isDefaultBooleanNoUse as the main image. Default is false.

File Object​

FieldTypeRequiredDescription
formatStringYesFile format, for example pdf.
urlStringYesURL of the file.
nameStringNoDisplay name of the file.
typeStringNodocument, image or video. Default is document.

Option Object​

FieldTypeRequiredDescription
optionNameStringYesName of the option, for example Size.
optionTypeStringYescolor, dropdown, radio, rectangleBox or image.
optionValuesArrayNoValues, each with label (required), value (required) and isDefault.

Variant Object​

FieldTypeRequiredDescription
skuStringYesSKU of the variant.
nameStringYesName of the variant.
optionsArrayNoOption values for this variant, each with optionName, optionValue and optionValueLabel (all required).
priceNumberNoPrice of the variant.
costNumberNoCost price.
saleNumberNoSale price.
weightNumberNoWeight of the variant.
mpnStringNoManufacturer part number.
tierPriceArrayNoQuantity price breaks. Same fields as the Tier Price Object.
mediaGalleryArrayNoImages and videos. Same fields as the Media Gallery Object.

Grouped Product Object​

FieldTypeRequiredDescription
productIdStringNoID of an existing product to include.
quantityNumberNoDefault quantity.
dynamicQuantityBooleanNoWhether the shopper can change the quantity. Default is true.

Bundled Product Object​

FieldTypeRequiredDescription
optionTitleStringNoTitle of the bundle section, for example Choose a lid.
inputTypeStringNoHow the shopper picks items, for example radio.
isRequiredBooleanNoWhether the shopper must choose an item. Default is false.
bundledItemsArrayNoItems, each with productId, quantity and dynamicQuantity.
FieldTypeRequiredDescription
codeStringYesCode of the list, for example accessories.
labelStringYesTitle of the list shown on the storefront.
productsArrayNoIDs of the related products.
isShowBooleanNoShow the list on the storefront. Default is true.

Filter Object​

FieldTypeRequiredDescription
codeStringYesCode of the filter, for example color.
labelStringYesLabel of the filter.
optionsArrayNoValues, each with label and value.

Metafield Object​

FieldTypeRequiredDescription
codeStringYesCode of an existing product metafield. See Metafields.
valueString, Number, Boolean or ArrayNoValue to store.

SEO Object​

FieldTypeRequiredDescription
pageTitleStringNoPage title for the product.
metaKeywordsStringNoMeta keywords.
metaDescriptionStringNoMeta description.

Customs Object​

FieldTypeRequiredDescription
countryCodeStringNoCountry of origin, for example US.
commodityDescriptionStringNoDescription of the goods for customs.
hsCodesObjectNoHS code details: countryCode and hsCode.

cURL Example​

curl --location '<BASE_URL>/products' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"sku": "TSHIRT",
"name": "Classic Cotton T-Shirt",
"price": 19.99,
"cost": 7.5,
"status": "active",
"brand": "65b0d13f98539a33577ac4ce",
"categories": ["696a558b2c0b334070270d81"],
"description": { "dataType": "HTML", "value": "<p>Soft 100% cotton tee.</p>" },
"shortDescription": "100% cotton",
"trackInventory": true,
"mediaGallery": [
{ "url": "https://images.example.com/tshirt-red.jpg", "type": "image", "label": "Red", "isDefault": true }
],
"options": [
{
"optionName": "Size",
"optionType": "dropdown",
"optionValues": [{ "label": "Small", "value": "S" }, { "label": "Large", "value": "L" }]
}
],
"variants": [
{
"sku": "TSHIRT-S",
"name": "Small",
"price": 19.99,
"options": [{ "optionName": "Size", "optionValue": "S", "optionValueLabel": "Small" }]
},
{
"sku": "TSHIRT-L",
"name": "Large",
"price": 21.99,
"options": [{ "optionName": "Size", "optionValue": "L", "optionValueLabel": "Large" }]
}
],
"tierPrice": [{ "quantity": 24, "price": 17.5, "tierPricingType": "fixed" }],
"metaFields": [{ "code": "material", "value": "Cotton" }],
"seo": { "pageTitle": "Classic Cotton T-Shirt", "metaDescription": "Soft cotton tee." },
"customUrl": "classic-cotton-t-shirt"
}'

Response​

  • 200 OK: The product was created successfully.
  • 400 Bad Request: The access token is missing or invalid, a required field is missing, a value is not valid, or a product with the same SKU already exists.

Sample JSON Response​

{
"success": true,
"message": "Product added Successfully",
"data": {
"id": "6703a1c4e1d2f3a4b5c6d7e8",
"entityId": 1043,
"name": "Classic Cotton T-Shirt",
"sku": "TSHIRT",
"productType": "configurable",
"hasOptions": true,
"status": "active",
"price": 19.99,
"cost": 7.5,
"priceRange": { "minPrice": 19.99, "maxPrice": 21.99 },
"customUrl": "classic-cotton-t-shirt",
"mediaGallery": [
{
"_id": "6703a1c4e1d2f3a4b5c6d7e9",
"url": "https://cdn.example.com/products/classic-cotton-t-shirt-red.webp",
"type": "image",
"label": "Red",
"isDefault": true
}
],
"variants": [
{ "_id": "6703a1c4e1d2f3a4b5c6d7ea", "sku": "TSHIRT-S", "name": "Small", "price": 19.99, "isActive": true },
{ "_id": "6703a1c4e1d2f3a4b5c6d7eb", "sku": "TSHIRT-L", "name": "Large", "price": 21.99, "isActive": true }
],
"createdAt": "2025-10-07T09:12:36.401Z",
"updatedAt": "2025-10-07T09:12:36.401Z"
}
}

Response Details​

FieldTypeDescription
successBooleantrue when the product was created.
messageStringConfirmation message.
dataObjectThe new product. For all fields, see Get Product.

Notes​

  • The product type is set for you: configurable when you send options, grouped when you send groupedProducts, bundle when you send bundledProducts, and simple otherwise.
  • If you send options without variants, a variant is created for every combination of option values. Each one gets the product's price and an SKU made from the product SKU and the first letter of each value, for example TSHIRT-S.
  • Grouped and bundle products take their price from the products they contain, so price is not used for them.
  • Images in mediaGallery are copied to your store's media library, and url is updated to the new location.
  • To set stock levels, use Update Product Inventory.