Skip to main content

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

FieldTypeRequiredDescription
protocolIduuidProtocol this category belongs to.
namestringCategory name (cannot be empty for native categories).
imageIndexintegerIcon index representing the category in the app.
productExternalIdstringERP identifier of a product in the DigiAnt catalog. DigiAnt resolves it and links the product to the category.

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

ValueDescription
nativeCreated directly in DigiAnt via Partner API.
erpImported 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.