Skip to main content
POST
/
api
/
product-types
/
Create Product Type
curl --request POST \
  --url https://api.merchantops.ai/api/product-types/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "name": "<string>",
  "category_key": "<string>",
  "description": [
    {}
  ],
  "isActive": true,
  "properties": [
    {
      "key": "<string>",
      "ai_matching_guidance_override": "<string>",
      "display_group": "<string>",
      "display_order": 123,
      "enrichment_config_override": {
        "extraction_hint": "<string>",
        "generation_context_fields": [
          "<string>"
        ],
        "generation_prompt": "<string>",
        "llm_model": "<string>",
        "max_length": 123,
        "overwrite_merchant_input": true,
        "source_priority": [
          "<string>"
        ],
        "strategies": [
          "<string>"
        ]
      },
      "is_hidden": false,
      "prompt_name_override": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "key": "<string>",
  "name": "<string>",
  "category_key": "<string>",
  "createdAt": "<string>",
  "createdBy": "<string>",
  "description": [
    {}
  ],
  "isActive": true,
  "is_system": false,
  "lastModifiedAt": "<string>",
  "lastModifiedBy": "<string>",
  "propertyCount": 0,
  "propertyKeys": [
    "<string>"
  ]
}

Headers

authorization
string | null
X-Organization-ID
string | null

Cookies

stytch_session
string | null

Body

application/json

Request model for creating a ProductType.

key
string
required

Unique identifier (lowercase with underscores)

name
string
required

Human-readable name

category_key
string | null

Key into product_type_categories (e.g. 'apparel'). Drives 3-tier prompt resolution.

description
Description · object[] | null

Localized descriptions

isActive
boolean
default:true

Active status

properties
PropertyReferenceDict · object[]

Property references

Response

Successful Response

Response model for a single ProductType.

id
string
required

MongoDB ObjectId as string

key
string
required

Unique identifier

name
string
required

Human-readable name

category_key
string | null

Key into product_type_categories — links this ProductType to a Category for 3-tier prompt resolution.

createdAt
string | null

Creation timestamp

createdBy
string | null

User who created this

description
Description · object[] | null

Localized descriptions

isActive
boolean
default:true

Active status

is_system
boolean
default:false

System-managed ProductType

lastModifiedAt
string | null

Last modification timestamp

lastModifiedBy
string | null

User who last modified this

propertyCount
integer
default:0

Number of properties

propertyKeys
string[]

List of property keys