Batches
Update an EUDR Batch | AgriBackup API Reference
Partially update a registered EUDR batch — quantity, commodity description, HS code, or harvest date — before it is locked to a shipment or TRACES NT.
PATCH
Python
Partially updates the mutable fields of a registered EUDR batch. You can correct the commodity description, quantity, HS code, or harvest date at any point before the batch is cryptographically locked to a shipment on the Hedera ledger or submitted to TRACES NT. Once locked, the batch record is immutable and this endpoint will return
403 Forbidden. Only the fields you include in the request body are updated; omitted fields retain their existing values.
Request Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | ✅ | Your live API key, e.g. sk_live_.... |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
batchId | string | ✅ | The unique batch identifier (UUID) to be updated. |
Request Body
All fields are optional. Include only the fields you wish to change.| Field | Type | Description |
|---|---|---|
quantity | number | Updated total commodity weight or volume. |
commodityDescription | string | Updated human-readable commodity description, e.g. Roasted Cocoa Beans. |
hsCode | string | Updated 6-digit HS code, e.g. 180100. |
harvestDate | string (date) | Updated harvest date in YYYY-MM-DD format, e.g. 2023-11-15. |
Response — 200 OK
Returns an empty object{} on successful update.
Error Responses
| Status | Meaning |
|---|---|
401 | Missing or invalid X-API-Key. |
403 | The batch is cryptographically linked to a shipment or TRACES NT and cannot be modified. |
404 | No batch found with the given batchId. |
Code Examples
Authorizations
Enterprise API Key provided via the AgriBackup developer console.
Path Parameters
Body
application/json
Payload for updating a consolidated batch pre-consensus
Response
200 - */*
OK
The response is of type object.
Get EUDR Batch by ID | AgriBackup API Reference
Previous
Delete an EUDR Batch | AgriBackup API Reference
Next