Skip to main content

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

ValueDescription
cleaningThe vehicle must be cleaned using the procedure defined in cleaningTypeId before operating. The driver sees the procedure and must confirm it.
prohibitionThe combination is strictly prohibited. No cleaning process can allow this load.

Fields

FieldTypeRequiredDescription
protocolIduuidProtocol this rule belongs to.
category1IduuidLast load category. Must differ from category2Id.
category2IduuidCurrent operation category.
action"cleaning" / "prohibition"Action to apply when this combination is detected.
cleaningTypeIduuidConditionalRequired when action is "cleaning".
specificProtocolImageUrlstringURL 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.