Cleaning Protocol
The cleaning protocol defines the rules DigiAnt enforces when a driver declares previous loads when entering a facility. DigiAnt checks whether there is an incompatibility between the product previously transported and the one the driver is about to load or unload, and determines whether cleaning is required, the combination is prohibited, or the driver can proceed without restriction.
Each logistics company has at most one protocol. It is created with status inactive and must be explicitly activated before DigiAnt starts enforcing its rules.
Lifecycle
| Transition | Endpoint |
|---|---|
Create (starts as inactive) | POST /cleaning-protocol |
inactive → active | POST /cleaning-protocol/{id}/activate |
active → inactive | POST /cleaning-protocol/{id}/deactivate |
| Delete (including all content) | DELETE /cleaning-protocol/{id} |
Deleting the protocol permanently deletes all its categories, types, and incompatibilities.
Configuration fields
| Field | Type | Required | Description |
|---|---|---|---|
previousLoadsCount | 1 / 2 / 3 | ✅ | How many previous loads the driver must declare when entering. |
companyProtocolEnabled | boolean | ✅ | If true, DigiAnt shows the driver the company protocol PDF before the operation. |
companyProtocolDocument | Conditional | Required when companyProtocolEnabled is true. | |
cleaningConfirmationRequired | boolean | ✅ | If true, the driver must explicitly confirm that cleaning has been performed. |
If companyProtocolEnabled is true and no PDF is attached, the request returns 400.
Source
| Value | Description |
|---|---|
erp | Synced from the ERP via the Partner API. The source is assigned automatically when creating via Partner API. |
native | Created directly in DigiAnt. |
Managing via Partner API
Get
GET /partner/cleaning-protocol
X-Partner-API-Key: dpk_live_...
Returns the protocol for your company, or 204 No Content if none exists.
Create
POST /partner/cleaning-protocol
X-Partner-API-Key: dpk_live_...
Content-Type: multipart/form-data
previousLoadsCount=3
companyProtocolEnabled=false
cleaningConfirmationRequired=true
The protocol is created with status inactive. Activate it once categories, types, and incompatibilities are set up.
Update configuration
PUT /partner/cleaning-protocol/{id}/configuration
X-Partner-API-Key: dpk_live_...
Content-Type: multipart/form-data
previousLoadsCount=2
companyProtocolEnabled=true
existingDocumentId=current-pdf-uuid
cleaningConfirmationRequired=true
To replace the PDF, omit existingDocumentId and attach a new file in companyProtocolDocument.
Activate / deactivate
POST /partner/cleaning-protocol/{id}/activate
X-Partner-API-Key: dpk_live_...
POST /partner/cleaning-protocol/{id}/deactivate
X-Partner-API-Key: dpk_live_...