Category Overview

Lidia PIM · API Reference · Categories / Schema Discovery

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 API: v2Schema discovery: v2
01 · Architecture

Category-first integration

  1. 01 · IdentifyChoose categoryResolve the target CategoryId and any ParentId hierarchy.
  2. 02 · DiscoverInspect data schemaRead accepted properties, mandatory fields, values and variant options.
  3. 03 · MapConstruct payloadUse the returned property/option identifiers and constraints.
  4. 04 · UseIngest or updateSubmit batch items or PATCH existing products/variants.
Important

The category data schema is the integration contract for category-specific product data. Do not assume one fixed attribute set across all categories.

02 · Endpoint map

Category operations

OperationMethodPathLimit / 60s (endpoint / AppKey)
FindCategoryDataSchemaPOST/api/v2/categories/dataschema600 / 60
FindCategoryDataSchema aliasPOST/api/v2/categories/findSchemaSee primary route
CreateCategoryPOST/api/v2/categories300 / 30
UpdateCategoryPATCH/api/v2/categories600 / 60
GetCategoriesPOST/api/v2/query/categories1200 / 120
Remove Category from ProductDELETE/api/v2/products/categories300 / 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.

03 · Discovery

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.

POST /api/v2/categories/dataschema · FindCategoryDataSchema
{
  "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.

04 · Quick start

Create, update and query categories

POST /api/v2/categories · CreateCategory
{
  "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.

05 · Relationships

Category assignment and removal

Request typeRequired fields / rules
All PIM requestsClientId and AppKey at the JSON body root, not as authentication headers.
Metadata commandsEnvironment, SessionId, UserToken in addition to credentials, as specified for the endpoint.
Query, search and poolNo metadata-command fields required by the supplied specification; use ClientId / AppKey.
TracingOptional ThreadId; the service generates one if omitted.
JSON conventionUse 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
}
Deletion boundary

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.

06 · Operations

Errors and quotas

HTTPMeaningWhat to check
400Bad RequestRequired fields, metadata session values, category schema and the errors array.
401UnauthorizedRoot-level ClientId and AppKey, plus access permission.
404Not FoundRecord or relationship ID and tenant context.
429Too Many RequestsUse Retry-After and retry with backoff.
500Internal Server ErrorCapture 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.