Skip to content

Reference / Products

Create or update product

PUT/api/v1/stores/{store_id}/products/{product_id}

Creates the product with the shop's ID, or updates it. If variants is sent, it replaces all variants.

Fields you omit are kept; null clears them. Returns 201 when the product was created and 200 when it was updated.

Guide: e-commerce →

Scope

  • ecommerce:write Edit e-commerce – the person behind the key must be editor or higher.

Path parameters

store_idstringrequired
The store's ID, which you choose.
product_idstringrequired
The product's ID in your shop.

Body

JSON, Content-Type: application/json. Unknown fields return 422.

titlestringrequired
The product's name.at least 1 characters · at most 255 characters
urlstring | null
The product's page in the shop.at most 2048 characters
image_urlstring | null
The product's image.at most 2048 characters
vendorstring | null
Manufacturer or brand.at most 255 characters
product_typestring | null
Product type or category.at most 255 characters
variantsarray<object>
The variants (at most 100). Replaces all variants when sent.at most 100
variants[].idstringrequired
The variant's ID in your shop.
variants[].titlestringrequired
at least 1 characters · at most 255 characters
variants[].skustring | null
SKU.at most 100 characters
variants[].pricenumber | null
Price per unit.at least 0 · at most 999999999999.99
variants[].inventory_quantityinteger | null
Quantity in stock.at least -1000000 · at most 1000000000
variants[].urlstring | null
The variant's page.at most 2048 characters
variants[].image_urlstring | null
The variant's image.at most 2048 characters

Retrying a request

PUT creates or updates using the shop's own ID: the same call twice gives the same result, so it can always be repeated. Batch and idempotency

Response

200 The product (201 if it was created).

idstringrequired
titlestringrequired
urlstring | nullrequired
image_urlstring | nullrequired
vendorstring | nullrequired
product_typestring | nullrequired
variantsarray<object>required
variants[].idstringrequired
variants[].titlestringrequired
variants[].skustring | nullrequired
variants[].pricenumber | nullrequired
variants[].inventory_quantityinteger | nullrequired
variants[].urlstring | nullrequired
variants[].image_urlstring | nullrequired
created_atstring (time, ISO 8601)required
When the product was first sent in.
updated_atstring (time, ISO 8601)required
When the product was last changed.

Errors