Working with categories and data schemas
Manage PIM category records and discover the exact data schema required for product and variant ingestion. Category schema discovery should happen before creating category-specific attribute and option payloads.
Category-first integration
- 01 · IdentifyChoose categoryResolve the target CategoryId and any ParentId hierarchy.
- 02 · DiscoverInspect data schemaRead accepted properties, mandatory fields, values and variant options.
- 03 · MapConstruct payloadUse the returned property/option identifiers and constraints.
- 04 · UseIngest or updateSubmit batch items or PATCH existing products/variants.
The category data schema is the integration contract for category-specific product data. Do not assume one fixed attribute set across all categories.
Category operations
| Operation | Method | Path | Limit / 60s (endpoint / AppKey) |
|---|---|---|---|
| FindCategoryDataSchema | POST | /api/v2/categories/dataschema | 600 / 60 |
| FindCategoryDataSchema alias | POST | /api/v2/categories/findSchema | See primary route |
| CreateCategory | POST | /api/v2/categories | 300 / 30 |
| UpdateCategory | PATCH | /api/v2/categories | 600 / 60 |
| GetCategories | POST | /api/v2/query/categories | 1200 / 120 |
| Remove Category from Product | DELETE | /api/v2/products/categories | 300 / 30 |
The alternate schema route is documented as an alias; the source provides a quota for the primary /dataschema route, not a distinct alias-specific quota.
What the data schema returns
Properties
Identify accepted fields through propertyId and related property keys.
Required constraints
Use isMandatory to determine which properties need values.
Allowed values
Validate enumerated values against allowedValues before ingestion.
Variant options
Use returned options and optionValues to prepare valid variants.
{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"Environment": "production",
"SessionId": "YOUR_SESSION_ID",
"UserToken": "YOUR_USER_TOKEN",
"CategoryId": 12
}Use actual returned schema identifiers in later requests. The precise nested response shape should be taken from the operation reference.
Create, update and query categories
{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"Environment": "production",
"SessionId": "YOUR_SESSION_ID",
"UserToken": "YOUR_USER_TOKEN",
"Name": "Headphones",
"Code": "CAT-AUDIO-HEADPHONES",
"IntegrationCode": "ERP-CAT-22",
"ParentId": 5,
"SortOrder": 10
}PATCH /api/v2/categories · UpdateCategory{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"Environment": "production",
"SessionId": "YOUR_SESSION_ID",
"UserToken": "YOUR_USER_TOKEN",
"CategoryId": 22,
"Name": "Premium Headphones",
"SortOrder": 1,
"Status": 1
}POST /api/v2/query/categories · GetCategories{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"CategoryIds": [
12
],
"Status": 1
}Category creation uses POST; existing category updates use PATCH and preserve omitted fields.
Category assignment and removal
| Request type | Required fields / rules |
|---|---|
| All PIM requests | ClientId and AppKey at the JSON body root, not as authentication headers. |
| Metadata commands | Environment, SessionId, UserToken in addition to credentials, as specified for the endpoint. |
| Query, search and pool | No metadata-command fields required by the supplied specification; use ClientId / AppKey. |
| Tracing | Optional ThreadId; the service generates one if omitted. |
| JSON convention | Use exact PascalCase request fields such as CategoryId, SortOrder, Skip and Take. |
The category master record and the product-category relationship are different resources. The documented DELETE operation removes a specific category association from a product, not the master category.
DELETE /api/v2/products/categories{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"ProductId": 5001,
"CategoryId": 12
}No direct category-master DELETE operation is documented. The association is removed by supplying the two identifiers in the JSON DELETE body.
Metadata command prerequisites may differ for DELETE examples; verify the live endpoint schema before publishing exact required fields.
Errors and quotas
| HTTP | Meaning | What to check |
|---|---|---|
400 | Bad Request | Required fields, metadata session values, category schema and the errors array. |
401 | Unauthorized | Root-level ClientId and AppKey, plus access permission. |
404 | Not Found | Record or relationship ID and tenant context. |
429 | Too Many Requests | Use Retry-After and retry with backoff. |
500 | Internal Server Error | Capture request context and trace information for support. |
Category schema discovery: 600 requests/60 seconds at endpoint level and 60 requests/60 seconds per AppKey. PATCH category: 600 / 60. Create category: 300 / 30.