Skip to main content
POST
Create a product

Authorizations

Authorization
string
header
required

Use a project API key from Settings > API Access. Send it as Authorization: Bearer wpk_.... See authentication and scopes for setup and permissions.

Headers

Idempotency-Key
string

Reuse this key for retries of the same write. Scoped to this API key; retained for 30 days, after which the key may be reused. Different requests with the same key return 409.

Required string length: 1 - 128
Pattern: ^[!-~]+$

Body

application/json
sku
string
required
Required string length: 1 - 255
product_type
string | null

One of simple, configurable, virtual, bundle, grouped. A product with variants must stay configurable, and a variant cannot be configurable itself.

parent_id
integer | null

Makes this product a variant of the configurable product with this id. Null detaches it. Send either parent_id or parent_sku, not both.

Required range: 0 < x <= 9223372036854776000
parent_sku
string | null

Same as parent_id, addressed by SKU. In a batch the parent may be another item of the same batch, so a configurable product and its variants can be created in one call. Null detaches.

Required string length: 1 - 255
family_id
integer | null

Product family of this project. Variant axes flagged on the family (family-attributes, is_variant_axis) then apply to this product. Null clears the family.

Required range: 0 < x <= 9223372036854776000
family_code
string | null

Same as family_id, addressed by the family's code. Send one of the two, not both.

Required string length: 1 - 100
variant_axes
string[] | null

Attribute codes, in order, that tell this configurable product's variants apart. Stored on the product and wins over its family's axes; an empty list means no axes. Same rules as PUT /products/{id}/variant-axes.

Maximum array length: 32
Required string length: 1 - 255
ean
string | null
Maximum string length: 255
upc
string | null
Maximum string length: 12
manufacturer_part_number
string | null
Maximum string length: 255
brand
string | null
Maximum string length: 255
name
string | null
Maximum string length: 500
name_long
string | null
Maximum string length: 500
description
string | null
short_description
string | null
name_localized
Name Localized · object | null

Locale code → name, e.g. {"nl": "Boormachine"}.

name_long_localized
Name Long Localized · object | null
meta_title_localized
Meta Title Localized · object | null
meta_description_localized
Meta Description Localized · object | null
meta_keywords_localized
Meta Keywords Localized · object | null
supplier
string | null
Maximum string length: 255
is_visible
boolean | null
cost

Decimal string with at most two decimals ("7.50") or an integer. Null clears it.

weight

Decimal string with at most three decimals ("1.250") or an integer. Null clears it.

weight_unit
string | null

One of g, kg, oz, lb.

length

Decimal string with at most two decimals.

width

Decimal string with at most two decimals.

height

Decimal string with at most two decimals.

dimension_unit
string | null

One of mm, cm, m, in, ft.

manage_stock
boolean | null
stock_quantity
integer | null
Required range: -2147483648 <= x <= 2147483647
stock_status
string | null

One of in_stock, out_of_stock, on_backorder.

backorders_allowed
boolean | null
backorders_notify
boolean | null
availability_date
string<date-time> | null
low_stock_threshold
integer | null
Required range: 0 <= x <= 2147483647
requires_shipping
boolean | null
hs_code
string | null
Maximum string length: 255
country_of_origin
string | null

ISO 3166-1 alpha-2 code.

Required string length: 2
is_dangerous_good
boolean | null
is_fragile
boolean | null
free_shipping
boolean | null
shipping_class
string | null
Maximum string length: 255
handling_instructions
string | null
Maximum string length: 10000
faqs
Faqs · object[] | null

Ordered FAQ items: [{"id", "question", "answer"}]. Replaces the list.

faqs_localized
Faqs Localized · object | null

FAQ translations keyed by locale, then FAQ id.

skip_category_faqs
boolean | null
category_faq_threshold
integer | null
Required range: x >= 0
description_localized
Description Localized · object | null
short_description_localized
Short Description Localized · object | null
status
string | null

One of active, inactive, pending, archived.

meta_title
string | null
Maximum string length: 255
meta_description
string | null
meta_keywords
string | null
Maximum string length: 255
price

Decimal string with at most two decimals ("19.99") or an integer. Null clears it.

special_price

Decimal string with at most two decimals ("14.99") or an integer. Null clears it.

special_price_start_date
string<date-time> | null
special_price_end_date
string<date-time> | null
category_ids
integer[] | null

Replaces the product's category set. Every id must belong to this project.

Maximum array length: 200
Required range: x <= 9223372036854776000
attributes
Attributes · object | null

Attribute values keyed by attribute code. A value is a scalar or list, or {"value": ..., "unit": "kg"}; null removes the value. Only the codes sent are touched.

Response

Created

id
integer
required
sku
string
required
name
string
required
name_long
string
required
name_localized
Name Localized · object
required
description_localized
Description Localized · object
required
short_description_localized
Short Description Localized · object
required
status
string
required
product_type
string
required
category_ids
integer[]
required
attributes
AttributeValueOut · object[]
required
version
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
ean
string | null
upc
string | null
manufacturer_part_number
string | null
brand
string | null
description
string | null
short_description
string | null
parent_id
integer | null
family
FamilyRefOut · object | null
price
string | null

Decimal string, e.g. "19.99".

special_price
string | null

Decimal string, e.g. "14.99".

special_price_start_date
string<date-time> | null
special_price_end_date
string<date-time> | null
main_image
string | null
meta_title
string | null
meta_description
string | null
meta_keywords
string | null
name_long_localized
Name Long Localized · object
meta_title_localized
Meta Title Localized · object
meta_description_localized
Meta Description Localized · object
meta_keywords_localized
Meta Keywords Localized · object
supplier
string
default:""
is_visible
boolean
default:true
cost
string | null

Decimal string, e.g. "7.50".

weight
string | null

Decimal string with up to three decimals, e.g. "1.250".

weight_unit
string
default:kg
length
string | null
width
string | null
height
string | null
dimension_unit
string
default:cm
manage_stock
boolean
default:true
stock_quantity
integer
default:0
stock_status
string
default:in_stock
backorders_allowed
boolean
default:false
backorders_notify
boolean
default:false
availability_date
string<date-time> | null
low_stock_threshold
integer | null
requires_shipping
boolean
default:true
hs_code
string | null
country_of_origin
string | null
is_dangerous_good
boolean
default:false
is_fragile
boolean
default:false
free_shipping
boolean
default:false
shipping_class
string | null
handling_instructions
string | null
faqs
Faqs · object[]
faqs_localized
Faqs Localized · object
skip_category_faqs
boolean
default:false
category_faq_threshold
integer | null