Skip to main content
POST

Authorizations

Authorization
string
header
required

Workspace API key. The workspace is derived from the key.

Body

application/json

Create a full product in one call. The required fields depend on type:

  • SIMPLE_PRODUCT / VIRTUAL_PRODUCT — a single default variant; provide top-level sku, price, cost, stock. Do not send options/variants.
  • VARIABLE_PRODUCT — provide options (each option + its values) and an explicit variants array. Options are resolved to workspace options by name (created/extended as needed); each variant's attributes selects one value per option. price/cost/stock/sku then belong on each variant, not the product.

Categories: use categories (ids or slugs, ordered, first = primary) for multi-category products; the legacy single category (by name or id) still works but categories wins when both are sent. status and type must be values your workspace supports. Money is integer minor units.

name
string
required
Example:

"Classic Tee"

type
enum<string>
required
Available options:
SIMPLE_PRODUCT,
VARIABLE_PRODUCT,
VIRTUAL_PRODUCT
status
string
required

A product status your workspace uses (e.g. ACTIVE, ARCHIVED, HIDDEN).

Example:

"ACTIVE"

description
string
category
object

Legacy single category. Provide name (created if missing) or an existing id. Prefer categories for multi-category products; if both are sent, categories wins and this is ignored.

categories
string[]

Ordered list of category ids or slugs (first = primary). Replaces the product's category set. When present it takes precedence over category. An unknown id/slug returns 422 unprocessable and nothing is applied.

Example:
tax_class
string<uuid>

Tax class id (optional).

requires_shipping
boolean
default:false
can_preorder
boolean
default:false
preorder_stops_at
string<date-time>
max_cart_quantity
integer
low_stock_threshold
integer
purchase_note
string
sku
string

Required for SIMPLE/VIRTUAL products.

price
object

Currency code → amount in minor units (e.g. NGN 450000 = 4500.00).

Example:
cost
object

Currency code → amount in minor units (e.g. NGN 450000 = 4500.00).

Example:
stock
integer

Required for SIMPLE/VIRTUAL products.

options
object[]

Required for VARIABLE_PRODUCT. The product's options and their values.

variants
object[]

Required for VARIABLE_PRODUCT. One entry per variant; attributes selects a value for each option.

Response

Created product

id
string<uuid>
required
name
string
required
status
string
required
type
string
required
description
string
category
string

The primary category's name (the first of categories). Kept for backwards compatibility — prefer categories.

categories
object[]

The product's categories, ordered (first = primary). Each entry carries its parent/parent_slug, so a headless storefront can build /shop/{parent_slug}/{slug} links with no extra calls.

requires_shipping
boolean
can_preorder
boolean
total_stock
integer
price_range
object
options
object[]

The product's resolved options. Each variant's attributes is keyed by the option id here, so use this to map a variant back to option names/values.

media
object[]
variants
object[]

Created variants. Each variant's attributes maps an option id (see options) to the chosen value key.

created_at
string<date-time>
updated_at
string<date-time>