Unlink Batch from Shipment EVM Rollback | AgriBackup
Asynchronously roll back the Hedera smart contract lock to free a batch from a cancelled shipment. Returns 202 Accepted with a jobId.
202 Accepted immediately with a jobId. Poll GET /api/v1/enterprise/eudr/jobs/{jobId} to confirm the rollback has completed before attempting to re-link the batch.
Request Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | ✅ | Your live API key, e.g. sk_live_.... |
Idempotency-Key | ✅ | A UUID v4 string. Replaying the same key within 24 hours returns the original response without re-invoking the rollback. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
batchId | string | ✅ | The UUID of the EUDR batch to unlink. |
shipmentId | string | ✅ | The shipment reference ID to remove the link from. |
Response — 202 Accepted
| Field | Type | Description |
|---|---|---|
jobId | string | Use this ID to poll rollback status via GET /api/v1/enterprise/eudr/jobs/{jobId}. |
status | string | Always PENDING on acceptance. |
estimatedDurationSec | integer | Estimated seconds until the Hedera rollback transaction reaches consensus. |
createdAt | string (ISO-8601) | Timestamp when the job was accepted. |
Error Responses
| Status | Meaning |
|---|---|
400 | Invalid batchId or shipmentId. |
401 | Missing or invalid X-API-Key. |
403 | The batch has been submitted to TRACES NT and the link cannot be rolled back. |
404 | No active link found between the given batchId and shipmentId. |
Code Examples
Authorizations
Enterprise API Key provided via the AgriBackup developer console.
Headers
Unique idempotency key (UUID) to prevent duplicate operations. Safely stored in Redis with a strict 24-hour TTL to prevent memory bloat during saturation attacks.
Response
Smart contract unlock initiated asynchronously
Response payload for asynchronously accepted jobs
The unique asynchronous tracking job ID
"job_998877"
Current execution status invariant
PENDING "PENDING"
Estimated duration in seconds before consensus or processing lock release
3
Timestamp when the job was accepted
"2026-06-15T12:00:00Z"