Skip to main content

Create Product Type

POST 

/api/v2/product-types

Create a product type. A new type is always a leaf; adding a child under an existing type turns that parent into a non-leaf. Products can only be assigned to leaf types.

Required scope: products:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Fields:

  • name (required, string, max 120) — runs of whitespace are collapsed; cannot contain > (the path separator); must be unique among its siblings, case-insensitively. An archived sibling with the same name blocks creation — restore it instead.
  • parent_id (nullable, integer) — the parent type; omit or null for a top-level type. The parent must be active, and the tree is at most 3 levels deep, so a type on the third level cannot take children.
  • sort_order (nullable, integer, min 0) — position among siblings.

Requires permission: product_types.create

Request

Responses

Created

Response Headers
    Content-Type