FacetFlux
pim.productTypes.create
Create a product type in a schema, or return the existing one if `code` already exists in the schema. ProductType is the flat product classification within a schema (NOT category/sales nav). Response: { productType: {...}, created: bool }. Errors: { error: { code: 'not_found' | 'bad_input', ... } }.
Remote revuo:facetflux
Other tools also called pim.productTypes.create?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"schemaId": {
"description": "Schema id (must belong to current tenant).",
"type": "string"
},
"code": {
"description": "Code — uppercase / kebab convention. Unique within schema.",
"type": "string"
},
"labels": {
"description": "Localized labels (e.g. {\"en\":\"Centrifugal pump\"}).",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": [
"string",
"null"
]
},
"default": null
},
"defaultTraitIds": {
"description": "Trait ids assigned by default to new products of this type.",
"type": [
"array",
"null"
],
"items": {
"type": [
"string",
"null"
]
},
"default": null
},
"parentCode": {
"description": "Optional parent product type code for hierarchy.",
"type": [
"string",
"null"
],
"default": null
},
"sortOrder": {
"description": "Sort order within the schema.",
"type": "integer",
"default": 0
}
},
"required": [
"schemaId",
"code"
]
}