Products
Create a Product
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Products
Create a Product
Creates a Product
POST
/
api
/
v2
/
platform
/
products
curl --request POST \
--url http://{defaultHost}/api/v2/platform/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"product": {
"name": "<string>",
"description": "<string>",
"available_on": "<string>",
"discontinue_on": "<string>",
"permalink": "<string>",
"meta_description": "<string>",
"meta_keywords": "<string>",
"price": "<string>",
"sku": "<string>",
"deleted_at": "<string>",
"prototype_id": "<string>",
"option_values_hash": "<string>",
"weight": "<string>",
"height": "<string>",
"width": "<string>",
"depth": "<string>",
"shipping_category_id": "<string>",
"tax_category_id": "<string>",
"cost_currency": "<string>",
"cost_price": "<string>",
"compare_at_price": "<string>",
"option_type_ids": "<string>",
"taxon_ids": "<string>",
"public_metadata": {},
"private_metadata": {}
}
}'
{
"data": {
"id": "168",
"type": "product",
"attributes": {
"name": "Spinning Top",
"description": null,
"available_on": null,
"deleted_at": null,
"slug": "spinning-top",
"meta_description": null,
"meta_keywords": null,
"created_at": "2022-11-08T19:34:53.239Z",
"updated_at": "2022-11-08T19:34:53.243Z",
"promotionable": true,
"meta_title": null,
"discontinue_on": null,
"public_metadata": {},
"private_metadata": {},
"status": "draft",
"make_active_at": null,
"display_compare_at_price": null,
"display_price": "$87.43",
"purchasable": false,
"in_stock": false,
"backorderable": false,
"available": false,
"currency": "USD",
"price": "87.43",
"compare_at_price": null
},
"relationships": {
"tax_category": {
"data": null
},
"primary_variant": {
"data": {
"id": "235",
"type": "variant"
}
},
"default_variant": {
"data": {
"id": "235",
"type": "variant"
}
},
"variants": {
"data": []
},
"option_types": {
"data": []
},
"product_properties": {
"data": []
},
"taxons": {
"data": []
},
"images": {
"data": []
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Body
application/json
Was this page helpful?
curl --request POST \
--url http://{defaultHost}/api/v2/platform/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"product": {
"name": "<string>",
"description": "<string>",
"available_on": "<string>",
"discontinue_on": "<string>",
"permalink": "<string>",
"meta_description": "<string>",
"meta_keywords": "<string>",
"price": "<string>",
"sku": "<string>",
"deleted_at": "<string>",
"prototype_id": "<string>",
"option_values_hash": "<string>",
"weight": "<string>",
"height": "<string>",
"width": "<string>",
"depth": "<string>",
"shipping_category_id": "<string>",
"tax_category_id": "<string>",
"cost_currency": "<string>",
"cost_price": "<string>",
"compare_at_price": "<string>",
"option_type_ids": "<string>",
"taxon_ids": "<string>",
"public_metadata": {},
"private_metadata": {}
}
}'
{
"data": {
"id": "168",
"type": "product",
"attributes": {
"name": "Spinning Top",
"description": null,
"available_on": null,
"deleted_at": null,
"slug": "spinning-top",
"meta_description": null,
"meta_keywords": null,
"created_at": "2022-11-08T19:34:53.239Z",
"updated_at": "2022-11-08T19:34:53.243Z",
"promotionable": true,
"meta_title": null,
"discontinue_on": null,
"public_metadata": {},
"private_metadata": {},
"status": "draft",
"make_active_at": null,
"display_compare_at_price": null,
"display_price": "$87.43",
"purchasable": false,
"in_stock": false,
"backorderable": false,
"available": false,
"currency": "USD",
"price": "87.43",
"compare_at_price": null
},
"relationships": {
"tax_category": {
"data": null
},
"primary_variant": {
"data": {
"id": "235",
"type": "variant"
}
},
"default_variant": {
"data": {
"id": "235",
"type": "variant"
}
},
"variants": {
"data": []
},
"option_types": {
"data": []
},
"product_properties": {
"data": []
},
"taxons": {
"data": []
},
"images": {
"data": []
}
}
}
}