Errors
Problem details
Errors use real HTTP status codes and an RFC 9457 application/problem+json body:
{
"type": "https://docs.deltavelocity.in/errors/insufficient-scope",
"title": "Insufficient scope",
"status": 403,
"detail": "This key needs the shipments:write scope."
}
typeidentifies the problem. Match on it in code; it never changes for a given problem.titleis a short summary, anddetail(when present) explains this occurrence. Both are for people, not code.statusrepeats the HTTP status.- Some problems add fields. A
422validation error haserrors, a list of{loc, msg, type}, one per invalid field.shipment-processing-lockedhaslock. Booking's409answers (booking-failed,shipment-cancelled) carry the order, with each shipment'sbooking_error. - Each operation in the reference lists the problem types it can answer.
- A
5xxnever carries internal details.
Status codes
| Status | Typical type suffix | Meaning | Retry? |
|---|---|---|---|
400 | bad-request, invalid-cursor, invalid-message-id, invalid-request, unsupported-grant-type | The request is malformed. | No; fix the request. |
401 | unauthenticated | No token, or an expired or revoked one. | After fetching a new token. |
403 | insufficient-scope, gst-not-approved | The key lacks the scope, or your brand's GST is not approved yet. | No; fix the key or contact DeltaVelocity. |
403 | shipment-processing-locked | Shipment processing is temporarily locked for your brand; the body's lock says why. | Temporary: retry later. |
404 | not-found | The id doesn't exist, or belongs to another brand. | No. |
405 | method-not-allowed | The path exists, but not with this HTTP method. | No; fix the request. |
409 | message-id-in-progress | A request with the same Message-Id is still running. | Yes, after Retry-After, with the same Message-Id. |
409 | order-exists | The channel_order_ref is already used by an order from a different channel of your brand. (A repeat from the same channel is not an error: it returns 200 with Order-Existing: true.) | No; use a unique ref per channel, or fetch the existing order with GET /v1/orders?channel_order_ref=. |
409 | return-in-progress | A return for this order is still being booked with the courier. | Yes, after Retry-After. |
409 | shipment-cancelled, booking-failed | Booking refused: the shipment was cancelled (create a new order), or nothing could be booked (each booking_error says why). | No blind retry: act on the reason. |
409 | conflict, order-not-editable, shipment-not-booked, shipment-not-cancellable, ndr-action-refused, warehouse-exists | The resource is in a state that conflicts with the request. | No blind retry: read the resource, then decide. |
422 | validation-error, message-id-reused, unprocessable, warehouse-not-found, return-not-created | The request is well formed but can't be processed. | No; fix the request. |
429 | rate-limited | Over the rate limit. | Yes, after Retry-After. |
503 | booking-queue-full | Too many bookings are running for your brand; nothing was started. | Yes, after Retry-After. |
5xx | internal-error, unavailable, timeout | A problem on our side. | Yes, with backoff, ideally with the same Message-Id. |
A shipment's booking_error uses the same problem shape. Its common types are allocation-failed (fix the wallet balance or serviceability, then book again) and manifest-failed (the courier refused; the shipment needs reallocation from the dashboard).
Retry-After (seconds) comes with 429, 409 message-id-in-progress, 409 return-in-progress, 503 booking-queue-full, and 409 conflict when a shipment moved while it was being cancelled. For 5xx and 429, check resource state and use bounded backoff with jitter. Retain the same Message-Id where supported; see Retries and pagination for exclusions and recovery after uncertain outcomes.