Skip to content

Create a product

POST
/stores/{storeRef}/products
curl --request POST \
--url https://apibase.ecomweb.app/api/v1/stores/example/products \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "name": "Premium Cotton T-Shirt", "slug": "premium-cotton-t-shirt", "description": "High-quality cotton t-shirt with modern fit", "category_code": "apparel.clothing.tops", "product_type": "Túi thơm treo tủ", "images": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/image.jpg", "design_id": "DABCdefg123", "design_edit_url": "https://canva.com/design/edit/123", "canva_asset_id": "asset123", "alt": "Product image", "caption": "Main product view", "sort_order": 1, "is_primary": true } ], "videos": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://cdn.example.com/videos/product-demo.mp4", "thumbnail_url": "https://cdn.example.com/thumbnails/product-demo-thumb.jpg", "duration": 30, "width": 1280, "height": 720, "status": "processing", "sort_order": 0 } ], "status": "draft", "published_at": "2024-12-31T10:00:00Z", "variant_mode": "simple", "external_id": "tiktok_12345", "product_variants": [ { "seller_sku": "SHIRT-BLU-L", "external_id": "tiktok_variant_12345", "price": 29.99, "inventory": 0, "min_stock_alert": 10, "track_inventory": true, "inventory_policy": "deny", "cost_per_item": 125000, "weight": 0.5, "dimensions": { "length": 25.5, "width": 15.2, "height": 3.1, "unit": "cm" }, "status": "active", "combinations": [ { "option_id": 1, "option_value_id": 5 } ], "images": [ { "id": "b1f0…", "url": "https://cdn.ecomweb.app/stores/1/red.jpg" } ], "id": 10, "clear_combinations": true } ], "service_ids": [ 1, 2, 3 ], "tags": [ "example" ] }'

Creates a product with at least one variant. Images are copied into the store’s media library. A product is created as a draft unless status is active. Variant cost_per_item is returned only when the key holds the read:inventory scope.

Required scopes: write:products

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
name
required

Product name

string

Example

Premium Cotton T-Shirt
slug

Product slug (URL-friendly identifier)

string

Example

premium-cotton-t-shirt
description

Product description

string

Example

High-quality cotton t-shirt with modern fit
category_code

Global taxonomy category code. Omit or null for an uncategorized product.

string
nullable <= 255 characters

Example

apparel.clothing.tops
product_type

Free-text product type, used when no taxonomy category fits. Display only.

string
<= 255 characters

Example

Túi thơm treo tủ
images

Array of product images

Array<object>
object
id

Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.

string

Example

550e8400-e29b-41d4-a716-446655440000
url
required

Image URL: the asset’s public_url or cdn_url

string

Example

https://example.com/image.jpg
design_id

Canva design ID

string

Example

DABCdefg123
design_edit_url

Canva design edit URL

string

Example

https://canva.com/design/edit/123
canva_asset_id

Canva asset ID

string

Example

asset123
alt

Image alt text

string

Example

Product image
caption

Image caption

string

Example

Main product view
sort_order

Sort order for image display

number

Example

1
is_primary

Whether this is the primary image

boolean

Example

true
videos

Product videos (UI limit: 1 video, DB supports multiple for future). MP4/MOV/WebM, max 100MB, 1-300 seconds, max 1920x1920px

Array<object>
object
id
required

ID of the uploaded video asset

string

Example

550e8400-e29b-41d4-a716-446655440000
url
required

Video URL

string

Example

https://cdn.example.com/videos/product-demo.mp4
thumbnail_url

Thumbnail URL

string

Example

https://cdn.example.com/thumbnails/product-demo-thumb.jpg
duration
required

Duration in seconds (1-300 seconds)

number
>= 1 <= 300

Example

30
width

Video width in pixels

number

Example

1280
height

Video height in pixels

number

Example

720
status

Processing status

string
Allowed values: processing active failed

Example

active
sort_order

Sort order for multiple videos (future use)

number

Example

0
status

Product status

string
default: draft
Allowed values: draft active unlisted

Example

active
published_at

Scheduled publishing date (required when status is ‘scheduled’)

string format: date-time

Example

2024-12-31T10:00:00Z
variant_mode

Variant mode for the product

string
default: simple
Allowed values: simple variant

Example

simple
external_id

External ID for integration with other systems

string

Example

tiktok_12345
product_variants

Variants to create/update along with product

Array<object>
object
seller_sku

Seller SKU for this variant

string

Example

SHIRT-BLU-L
external_id

External ID for integration with other systems

string

Example

tiktok_variant_12345
price
required

Price for this variant

number

Example

29.99
inventory

Inventory count for this variant

number
0

Example

100
min_stock_alert

Minimum stock alert threshold. System will send notification when inventory falls below or equals this value. Leave empty to disable alerts.

number

Example

10
track_inventory

Track stock for this variant. An untracked variant is never reserved and never blocked at checkout.

boolean
default: true

Example

true
inventory_policy

Deny: checkout rejects an order this variant cannot cover. continue: keep selling past zero.

string
default: deny
Allowed values: deny continue

Example

deny
cost_per_item

What the store pays per unit. null clears it. Never returned to storefront callers.

number
nullable

Example

125000
weight

Weight of the variant

number

Example

0.5
dimensions

Dimensions of the variant

object
length

Length in specified unit

number

Example

25.5
width

Width in specified unit

number

Example

15.2
height

Height in specified unit

number

Example

3.1
unit

Unit of measurement

string
default: cm

Example

cm
status

Variant status

string
default: active
Allowed values: active inactive out_of_stock

Example

active
combinations

Combinations for this variant

Array<object>
object
option_id
required

Variant option ID

number
>= 1

Example

1
option_value_id
required

Variant option value ID

number
>= 1

Example

5
images

Images for this variant, at most 10

Array<object>
object
id
required

Asset id

string

Example

b1f0…
url
required

Public asset URL

string

Example

https://cdn.ecomweb.app/stores/1/red.jpg
id

Existing variant ID when updating

number

Example

10
clear_combinations

Remove this variant’s combinations. combinations: [] is a no-op on this route; use this to clear.

boolean

Example

true
service_ids

Service IDs to assign to this product

Array<number>

Example

[
1,
2,
3
]
tags

Tag names. Unknown names are created on use; matching is by slug, so “Summer 2026” and “summer 2026” resolve to one tag.

Array<string>
<= 100 items
Media typeapplication/json
object
images
required

Product images, in display order.

Array<object>
object
id

Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.

string
url
required

Image URL: the asset’s public_url or cdn_url

string
design_id

Canva design ID

string
design_edit_url

Canva design edit URL

string
canva_asset_id

Canva asset ID

string
alt

Image alt text

string
caption

Image caption

string
sort_order

Sort order for image display

number
is_primary

Whether this is the primary image

boolean
videos
required

Product videos. Always empty unless videos are requested.

Array<object>
object
id
required

ID of the uploaded video asset

string
url
required

Video URL

string
thumbnail_url

Thumbnail URL

string
duration
required

Duration in seconds (1-300 seconds)

number
>= 1 <= 300
width

Video width in pixels

number
height

Video height in pixels

number
status

Processing status

string
Allowed values: processing active failed
sort_order

Sort order for multiple videos (future use)

number
variants

Variants. Present only when include_variants is true.

Array<object>
object
inventory_policy
required

deny rejects checkout when stock is short; continue lets stock go negative.

string
Allowed values: deny continue
dimensions
required

Package dimensions, or null.

object
key
additional properties
any
images
required

Images for this variant.

Array<object>
object
id

Asset ID of the image. Omit it to have the asset looked up from url, which must then be a URL of an asset uploaded to this store.

string
url
required

Image URL: the asset’s public_url or cdn_url

string
design_id

Canva design ID

string
design_edit_url

Canva design edit URL

string
canva_asset_id

Canva asset ID

string
alt

Image alt text

string
caption

Image caption

string
sort_order

Sort order for image display

number
is_primary

Whether this is the primary image

boolean
combinations

Attribute values that define this variant. Present only when combinations are requested.

Array<object>
object
attributes
required

The attribute (axis), or null when it no longer exists.

object
id
required

Attribute ID.

number
name
required

Attribute name, such as “Color”.

string
slug
required

URL-safe identifier of the attribute, unique within the store.

string
type
required

How values are chosen, such as select.

string
order_by
required

How the values are ordered, such as manual.

string
sort_order
required

Position of the attribute among the store’s attributes.

number
nullable
created_at
required

When the attribute was created, as an ISO 8601 timestamp.

string
updated_at
required

When the attribute was last updated, as an ISO 8601 timestamp.

string
taxonomy_attribute_code
required

Code of the global taxonomy attribute this one maps to, or null for a local attribute.

string
nullable
attribute_values
required

The chosen value, or null when it no longer exists.

object
id
required

Attribute value ID.

number
attribute_id
required

ID of the attribute this value belongs to.

number
value
required

Stored value, such as “red”.

string
display_value
required

Value as shown to shoppers, such as “Red”.

string
swatch_type
required

Swatch kind: none, color or image.

string
swatch_value
required

Swatch content: a color code or an image URL. Empty when there is no swatch.

string
sort_order
required

Position of the value within its attribute.

number
nullable
created_at
required

When the value was created, as an ISO 8601 timestamp.

string
updated_at
required

When the value was last updated, as an ISO 8601 timestamp.

string
taxonomy_value_code
required

Code of the global taxonomy value this one maps to, or null.

string
nullable
promotions

Active promotions on this variant. Present only when promotions are requested on a single product.

Array<object>
object
id
required

Promotion ID.

number
name
required

Promotion name.

string
description

Promotion description.

string
mode
required

How the promotion is applied, such as automatic or code.

string
code

Discount code, for code promotions.

string
type
required

Promotion type.

string
condition_type
required

What the promotion targets, such as product or variant.

string
discount_method

How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.

string
discount_value

Discount amount or percentage.

number
max_discount_amount

Upper bound on the discount amount.

number
fixed_price

Fixed price the item is sold at, for fixed-price promotions.

number
min_amount

Minimum order amount for the promotion to apply.

number
min_quantity

Minimum quantity for the promotion to apply.

number
start_at
required

When the promotion starts, as an ISO 8601 timestamp.

string
end_at

When the promotion ends, as an ISO 8601 timestamp.

string
promotion_price
required

Price after the promotion.

number
original_price
required

Price before the promotion.

number
discount_amount
required

Amount taken off the original price.

number
best_promotion

The promotion giving the lowest price, or null. Present only when promotions are requested on a single product.

object
id
required

Promotion ID.

number
name
required

Promotion name.

string
description

Promotion description.

string
mode
required

How the promotion is applied, such as automatic or code.

string
code

Discount code, for code promotions.

string
type
required

Promotion type.

string
condition_type
required

What the promotion targets, such as product or variant.

string
discount_method

How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.

string
discount_value

Discount amount or percentage.

number
max_discount_amount

Upper bound on the discount amount.

number
fixed_price

Fixed price the item is sold at, for fixed-price promotions.

number
min_amount

Minimum order amount for the promotion to apply.

number
min_quantity

Minimum quantity for the promotion to apply.

number
start_at
required

When the promotion starts, as an ISO 8601 timestamp.

string
end_at

When the promotion ends, as an ISO 8601 timestamp.

string
promotion_price
required

Price after the promotion.

number
original_price
required

Price before the promotion.

number
discount_amount
required

Amount taken off the original price.

number
id
required

Variant ID.

number
product_id
required

ID of the product this variant belongs to.

number
sku_id
required

Store-wide numeric SKU identifier, assigned automatically.

number
seller_sku
required

Merchant-assigned SKU, or null.

string
nullable
external_id
required

The variant’s ID in an external system, or null.

string
nullable
price
required

Selling price in the store’s currency.

number
inventory
required

Units available across all locations.

number
nullable
inventory_version
required

Counter that increases on every stock change.

number
min_stock_alert
required

Stock level at or below which the variant counts as low stock.

number
nullable
track_inventory
required

Whether stock is tracked. When false the variant never runs out.

boolean
cost_per_item

Unit cost to the store. Present only when the key holds the read:inventory scope. Null when no cost is recorded.

number
nullable
weight
required

Weight, in the store’s weight unit, or null.

number
nullable
is_default
required

Whether this is the product’s default variant.

boolean
nullable
status
required

Variant status, such as active or inactive.

string
nullable
created_at
required

When the variant was created, as an ISO 8601 timestamp.

string
updated_at
required

When the variant was last updated, as an ISO 8601 timestamp.

string
promotion_price

Price after the best active promotion. Present only when promotions are requested; null when none applies.

number
nullable
_count

Related counts. Present only when include_counts is true.

object
variants
required

Number of variants.

number
seo_metadata

SEO metadata, or null when none is set. Present only when include_seo_metadata is true.

object
meta_title
required

Page title for search engines, or null.

string
nullable
meta_description
required

Page description for search engines, or null.

string
nullable
product_attributes

Attributes linked to the product, with their selected values. Present only when include_attributes is true.

Array<object>
object
key
additional properties
any
tags

Tags on the product. Present only when include_tags is true.

Array<object>
object
id
required

Tag ID.

number
name
required

Tag name.

string
slug
required

URL-safe tag identifier.

string
created_at
required

When the tag was created, as an ISO 8601 timestamp.

string
updated_at
required

When the tag was last updated, as an ISO 8601 timestamp.

string
channels

Sales channels the product is published to. Present only when include_channels is true.

Array<object>
object
code
required

Channel code, such as online_store.

string
is_listed
required

Whether the product is listed (visible in listings) on this channel.

boolean
published_at
required

When the product was published to the channel, as an ISO 8601 timestamp, or null.

string
nullable
promotions

Active promotions on the product. Present only when include_promotion is true on a single product.

Array<object>
object
id
required

Promotion ID.

number
name
required

Promotion name.

string
description

Promotion description.

string
mode
required

How the promotion is applied, such as automatic or code.

string
code

Discount code, for code promotions.

string
type
required

Promotion type.

string
condition_type
required

What the promotion targets, such as product or variant.

string
discount_method

How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.

string
discount_value

Discount amount or percentage.

number
max_discount_amount

Upper bound on the discount amount.

number
fixed_price

Fixed price the item is sold at, for fixed-price promotions.

number
min_amount

Minimum order amount for the promotion to apply.

number
min_quantity

Minimum quantity for the promotion to apply.

number
start_at
required

When the promotion starts, as an ISO 8601 timestamp.

string
end_at

When the promotion ends, as an ISO 8601 timestamp.

string
promotion_price
required

Price after the promotion.

number
original_price
required

Price before the promotion.

number
discount_amount
required

Amount taken off the original price.

number
best_promotion

The promotion giving the lowest price, or null. Present only when include_promotion is true on a single product.

object
id
required

Promotion ID.

number
name
required

Promotion name.

string
description

Promotion description.

string
mode
required

How the promotion is applied, such as automatic or code.

string
code

Discount code, for code promotions.

string
type
required

Promotion type.

string
condition_type
required

What the promotion targets, such as product or variant.

string
discount_method

How the discount is computed, such as PERCENTAGE or FIXED_AMOUNT.

string
discount_value

Discount amount or percentage.

number
max_discount_amount

Upper bound on the discount amount.

number
fixed_price

Fixed price the item is sold at, for fixed-price promotions.

number
min_amount

Minimum order amount for the promotion to apply.

number
min_quantity

Minimum quantity for the promotion to apply.

number
start_at
required

When the promotion starts, as an ISO 8601 timestamp.

string
end_at

When the promotion ends, as an ISO 8601 timestamp.

string
promotion_price
required

Price after the promotion.

number
original_price
required

Price before the promotion.

number
discount_amount
required

Amount taken off the original price.

number
review_stats

Review statistics. Present only when include_review_stats is true.

object
key
additional properties
any
services

Services attached to the product. Present only when include_services is true.

Array<object>
object
key
additional properties
any
id
required

Product ID.

number
name
required

Product name.

string
slug
required

URL slug, unique within the store.

string
nullable
description
required

Product description, or null.

string
nullable
status
required

Lifecycle status: draft, active or unlisted.

string
nullable
published_at
required

When the product was published, as an ISO 8601 timestamp, or null.

string
nullable
created_at
required

When the product was created, as an ISO 8601 timestamp.

string
updated_at
required

When the product was last updated, as an ISO 8601 timestamp.

string
deleted_at
required

When the product was soft-deleted, as an ISO 8601 timestamp. Null for live products.

string
nullable
category_code
required

Code of the global taxonomy category, or null.

string
nullable
taxonomy_release
required

Taxonomy release the category was assigned from, or null.

string
nullable
product_type
required

Free-text product type, or null.

string
nullable
is_featured
required

Whether the product is featured.

boolean
nullable
min_price
required

Lowest variant price.

number
nullable
max_price
required

Highest variant price.

number
nullable
variant_mode
required

simple for a single-variant product, variant when it has options.

string
external_id
required

The product’s ID in an external system, or null.

string
nullable
total_inventory

Total stock across all variants. Present on reads.

number
min_promotion_price

Lowest price after promotions, or null. Present only when include_promotion is true on a single product.

number
nullable
max_promotion_price

Highest price after promotions, or null. Present only when include_promotion is true on a single product.

number
nullable

Example

{
"images": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/image.jpg",
"design_id": "DABCdefg123",
"design_edit_url": "https://canva.com/design/edit/123",
"canva_asset_id": "asset123",
"alt": "Product image",
"caption": "Main product view",
"sort_order": 1,
"is_primary": true
}
],
"videos": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://cdn.example.com/videos/product-demo.mp4",
"thumbnail_url": "https://cdn.example.com/thumbnails/product-demo-thumb.jpg",
"duration": 30,
"width": 1280,
"height": 720,
"status": "processing",
"sort_order": 0
}
],
"variants": [
{
"inventory_policy": "deny",
"images": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/image.jpg",
"design_id": "DABCdefg123",
"design_edit_url": "https://canva.com/design/edit/123",
"canva_asset_id": "asset123",
"alt": "Product image",
"caption": "Main product view",
"sort_order": 1,
"is_primary": true
}
]
}
]
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The request conflicts with the resource’s current state.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}