Create a product (with optional variants)
POST
/admin/v1/products
const url = 'https://your-store.example.com/admin/v1/products';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"title":"example","slug":"example","description":"example","status":"draft","seoTitle":"example","seoDescription":"example","isBundle":false,"variants":[{"sku":"example","title":"example","options":{},"priceAmount":1,"currency":"example","compareAtAmount":1,"stockQuantity":0,"allowBackorder":false,"weightGrams":1,"lengthMm":1,"widthMm":1,"heightMm":1,"position":0}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-store.example.com/admin/v1/products \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "slug": "example", "description": "example", "status": "draft", "seoTitle": "example", "seoDescription": "example", "isBundle": false, "variants": [ { "sku": "example", "title": "example", "options": {}, "priceAmount": 1, "currency": "example", "compareAtAmount": 1, "stockQuantity": 0, "allowBackorder": false, "weightGrams": 1, "lengthMm": 1, "widthMm": 1, "heightMm": 1, "position": 0 } ] }'Request Body required
Section titled “Request Body required ” Media type application/json
object
title
required
string
slug
string
status
string
isBundle
boolean
variants
Array<object>
object
sku
string
title
string
options
object
key
additional properties
priceAmount
required
integer
currency
required
string
stockQuantity
integer
allowBackorder
boolean
position
integer