Cleaning Categories
Cleaning categories classify products by cargo type. DigiAnt uses them as the two ends of an incompatibility rule: "if the driver previously transported a product from category A and is now loading one from category B, what happens?".
Typical examples: "Cereals", "Fertilizers", "Pig Feed", "Seeds".
Fields
| Field | Type | Required | Description |
|---|---|---|---|
protocolId | uuid | ✅ | Protocol this category belongs to. |
name | string | ✅ | Category name (cannot be empty for native categories). |
imageIndex | integer | ✅ | Icon index representing the category in the app. |
productExternalId | string | ❌ | ERP identifier of a product in the DigiAnt catalog. DigiAnt resolves it and links the product to the category. |
Product catalog link
A category can optionally be linked to a catalog product via productExternalId. When provided, DigiAnt looks up the product by its externalId and links it. If the product does not exist, the request returns 422.
The link is optional — a category can exist without an associated product.
Source and read-only fields
| Value | Description |
|---|---|
native | Created directly in DigiAnt via Partner API. |
erp | Imported from the ERP. |
For erp-origin categories, the name field is read-only from DigiAnt — the ERP owns the name. The imageIndex can be updated regardless of the source.
Managing via Partner API
List
GET /partner/cleaning-categories?protocolId={id}
X-Partner-API-Key: dpk_live_...
Create
POST /partner/cleaning-categories
X-Partner-API-Key: dpk_live_...
Content-Type: application/json
{
"protocolId": "protocol-uuid",
"name": "Cereals",
"imageIndex": 3,
"productExternalId": "ERP-PROD-001"
}
Update
PATCH /partner/cleaning-categories/{id}
X-Partner-API-Key: dpk_live_...
Content-Type: application/json
{
"imageIndex": 5
}
All fields are optional in the PATCH. Attempting to change name on an erp-origin category returns 400.