Working with products in Lidia PIM
Use the Products API to query existing catalog records, update product information, manage category and brand relationships, and attach images or documents. For initial or high-volume product ingestion, use the Pool Batch workflow.
Product integration workflow
New catalog data is normally introduced through asynchronous pool jobs, whereas existing product records are updated with partial PATCH operations. Category schema discovery should happen before preparing category-specific properties and variant options.
- 01 · DISCOVERCategory schemaRead mandatory properties, allowed values and variant options
- 02 · INGESTPool BatchSubmit → status → import / images → cleanup
- 03 · MAINTAINProduct PATCHUpdate existing fields; preserve omitted values
- 04 · READProduct QueryRetrieve products with filtering and pagination
Schema lookup, product queries, partial updates, category/brand relationship removal, and document-first media operations use /api/v2/... routes.
Batch submit, status, import, image import and cleanup use /api/v1/pool/batch/... (or documented /pool/... aliases).
Version numbers belong to individual routes, not to the entire PIM product. The presence of an older endpoint does not, by itself, establish a deprecation date. Refer to each endpoint's current specification before migrating.
Authentication and request conventions
| Topic | Rule |
|---|---|
| Credentials | Send ClientId and AppKey at the root of the JSON request body, not in an Authorization header. |
| JSON fields | Request models use PascalCase, e.g. ProductId, CategoryIds, SortOrder. |
| Content type | Use Content-Type: application/json and Accept: application/json. |
| Metadata operations | Create/update request models also include Environment, SessionId, and UserToken. Check the specific endpoint schema for exact requirements. |
| Query pagination | Pass Skip (offset) and Take (page size) in the body; do not use the previous pageIndex guidance for these v2 queries. |
| Tracing | ThreadId is optional; if omitted, the service generates a tracing identifier. |
AppKey is a secret. Use HTTPS, store credentials in a secure secret manager, and never commit real keys to repositories or documentation examples.
Product operations at a glance
This overview is a navigation and integration guide. Endpoint pages remain the source of truth for complete request/response models and field-level validation.
| Operation | Method | Path | Per 60 s: endpoint / AppKey |
|---|---|---|---|
| Get Products | POST | /api/v2/query/products | 600 / 60 |
| Update Product | PATCH | /api/v2/products | 600 / 60 |
| Remove Product from Category | DELETE | /api/v2/products/categories | 300 / 30 |
| Remove Product from Brand | DELETE | /api/v2/products/trademarks | 300 / 30 |
| Get Product Media List | POST | /api/v2/query/product-media-list | 1200 / 120 |
| Create Product Picture / Document | POST | /api/v2/products/pictures /api/v2/products/documents | 300 / 30 |
| Update Product Picture / Document | PATCH | /api/v2/products/pictures /api/v2/products/documents | 600 / 60 |
| Delete Product Picture / Document | DELETE | /api/v2/products/pictures /api/v2/products/documents | 300 / 30 |
Limits shown above are sliding-window quotas. Both the endpoint quota and the AppKey quota apply. The operation labels describe intent; technical endpoint/operation identifiers may differ.
Related schema and ingestion APIs
| Purpose | Method | Path |
|---|---|---|
| Discover category data schema | POST | /api/v2/categories/dataschema |
| Submit a batch | POST | /api/v1/pool/batch/submit |
| Check batch status | POST | /api/v1/pool/batch/status/{jobId} |
| Import validated data | POST | /api/v1/pool/batch/import |
| Import batch images | POST | /api/v1/pool/batch/images |
| Clean up batch jobs | POST | /api/v1/pool/batch/cleanup |
Category data schema: 600 endpoint / 60 AppKey calls per 60 seconds. The supplied specification lists Pool Batch operations as standard services without a numerical quota; do not assume they are unlimited.
Request and response examples
{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"ProductIds": [5001, 5002],
"CategoryIds": [12],
"TrademarkIds": [4],
"Skip": 0,
"Take": 20,
"Status": 1
}
Query requests accept filtering parameters in JSON. The list above is illustrative; combine only supported filters for the selected endpoint.
StandardServiceResponse<T> envelope (illustrative values)
{
"result": [],
"resultCount": 0,
"totalCount": 0,
"type": 1,
"code": "200",
"message": "Operation completed successfully.",
"errors": [],
"preProcessingTook": 8,
"serviceTook": 32,
"totalTook": 40
}
The current response envelope includes resultCount for returned records and totalCount for matching records. Timing values are in milliseconds. Earlier envelope fields such as Source, LogRecords, and Details are no longer part of this documented model.
{
"ClientId": "YOUR_CLIENT_ID",
"AppKey": "YOUR_APP_KEY",
"Environment": "production",
"SessionId": "YOUR_SESSION_ID",
"UserToken": "YOUR_USER_TOKEN",
"ProductId": 5001,
"Name": "Wireless Headphones ANC Pro",
"Status": 1,
"Pictures": [
{ "PictureId": 501, "IsCover": true, "SortOrder": 1 }
]
}
Only supplied fields are changed; omitted fields and existing relationships remain intact. ProductId is required. The Pictures and Documents arrays can update existing media metadata by ID, but cannot upload new Base64 or URL content within the product PATCH request.
Media, relationships and lifecycle
Document-first media
Add images and files using the dedicated /pictures and /documents endpoints. Files are stored by the Lidia Document service and linked through a document identifier.
Upload sources
Provide Base64 (preferred) or an absolute external URL. Image formats include JPEG, PNG, WebP and GIF. Document examples include PDF, DOCX and XLSX.
Media validation
The documented media flow enforces a 20 MB file limit, a 30-second timeout and SSRF protections for external URLs.
Existing media metadata
Use the relevant existing PictureId or ProductDocumentId for updates such as SortOrder or IsCover where supported.
Product records are not directly deleted through these APIs. DELETE is used for subordinate product-category or product-brand relationships and for linked images/documents. Delete operations take identifiers in a JSON request body, not as URL path parameters.
For category-specific attributes, first call POST /api/v2/categories/dataschema to discover properties, isMandatory, allowedValues and variant options/optionValues. Build ingestion and update payloads against that schema.
Rate limits, statuses and troubleshooting
The API uses a 60-second sliding window. A request can be throttled when either its endpoint limit or its per-AppKey limit is exceeded. If the server returns 429, follow the Retry-After response header before retrying.
| HTTP | Meaning | Recommended action |
|---|---|---|
400 | Bad Request | Check required fields, category schema, and metadata tokens; review errors. |
401 | Unauthorized | Check root-level ClientId and AppKey and endpoint authorization. |
404 | Not Found | Verify the record or relationship identifier and the selected tenant context. |
429 | Too Many Requests | Respect Retry-After; add backoff and reduce concurrency. |
500 | Internal Server Error | Record request context and tracing information for Lidia integration support. |
Entity status codes in the reference: Active=1, Draft=0, Passive=-1, Test=-9, Freezed=-11, Blocked=-12, Deleted=-99. Do not infer that a Deleted status authorizes product deletion via an API endpoint.