Incompatibilities
Incompatibilities are the protocol rules: they define what happens when a driver declares having transported a product from one category, and the current authorization involves a product from another.
Directional nature
An incompatibility connects two categories with a direction:
category1Id— category of the last load (what the truck previously carried).category2Id— category of the current operation (what the driver is about to load or unload).
A → B and B → A are independent rules. That transporting A before B requires cleaning does not imply B before A does too — they must be created as two separate incompatibilities if needed.
Actions
| Value | Description |
|---|---|
cleaning | The vehicle must be cleaned using the procedure defined in cleaningTypeId before operating. The driver sees the procedure and must confirm it. |
prohibition | The combination is strictly prohibited. No cleaning process can allow this load. |
Fields
| Field | Type | Required | Description |
|---|---|---|---|
protocolId | uuid | ✅ | Protocol this rule belongs to. |
category1Id | uuid | ✅ | Last load category. Must differ from category2Id. |
category2Id | uuid | ✅ | Current operation category. |
action | "cleaning" / "prohibition" | ✅ | Action to apply when this combination is detected. |
cleaningTypeId | uuid | Conditional | Required when action is "cleaning". |
specificProtocolImageUrl | string | ❌ | URL of a specific procedure image. Only valid for action: "cleaning". |
caution
If action is "prohibition", specificProtocolImageUrl is automatically ignored and stored as null.
Managing via Partner API
List
GET /partner/cleaning-incompatibilities?protocolId={id}
X-Partner-API-Key: dpk_live_...
Create
POST /partner/cleaning-incompatibilities
X-Partner-API-Key: dpk_live_...
Content-Type: application/json
{
"protocolId": "protocol-uuid",
"category1Id": "cereals-uuid",
"category2Id": "fertilizers-uuid",
"action": "cleaning",
"cleaningTypeId": "type-uuid",
"specificProtocolImageUrl": "https://my-erp.com/cleaning-protocol.jpg"
}
Update
PATCH /partner/cleaning-incompatibilities/{id}
X-Partner-API-Key: dpk_live_...
Content-Type: application/json
{
"action": "prohibition"
}
Changing action to "prohibition" automatically clears specificProtocolImageUrl.
Delete
DELETE /partner/cleaning-incompatibilities/{id}
X-Partner-API-Key: dpk_live_...
Returns 204 on success.