Commerce
Create a product
Creates a product with its options and variants. status defaults to draft: no platform offers a sandbox for product writes, so nothing goes on sale unless you ask for active. A product without options has exactly one variant. Images are fetched by the platform from the given URLs and may appear on the product a few seconds later.
post/v1/commerce/products
Request body
Example request
{
"options": [
{
"name": "Size",
"values": [
"S",
"M",
"L"
]
}
]
}Response
Product created
Example response
{
"product": {
"variants": [
{
"price": {
"amount": "19.90",
"currency": "USD"
},
"compareAtPrice": {
"amount": "19.90",
"currency": "USD"
}
}
]
}
}Changes
Changed in 2 of the 60 revisions of this API.2
- ○
removed the
platformenum value from the/response property for the response statusresponse-property-enum-value-removed
- ○
- ○
endpoint added
endpoint-added
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○