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.
products:writeGrant 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
- 201
- 401
- 403
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.