Validation Errors
Validation problems generally mean required business data is missing, inconsistent, or not usable for the operation — malformed JSON, a missing required field, an invalid enum value, or an invalid identifier format.
Verified status codes
| Situation | Status |
|---|---|
Missing, empty, or whitespace-only required field on token exchange (apiKey) or refresh/revoke (refreshToken) | 422 |
Create Order with a required object missing: fromAddress, toAddress, shipments (or an empty array), or a Shipment's parcel | 400 |
Create Order that was readable but has a rejected value — an address field, a parcel outside the limits, more than one Shipment (Validation.OneShipmentPerOrder), or an invalid Idempotency-Key | 422 |
Update Order Status with status 10 (Error) or an undefined value, reason over 500 characters, or source over 100 | 422 |
Label purchase with a missing or malformed rate id | 400 |
Label purchase with a rate id unknown for your account (Rate.NotFound) | 404 |
Label purchase with a rate id that belongs to a different Shipment (Rate.ShipmentMismatch) | 422 |
A path identifier that is not a GUID, or a malformed X-SubAccount-Id | 400 |
The public contract's error envelope (errors[].code/message) is the same
shape across every operation — see
Error Handling. Branch on code, not on
message: code is the machine-readable identifier, while message is
human-readable prose whose wording may change and must not be parsed.
Validation codes are namespaced Validation.*, and some are composed at
request time from the field they concern — a missing field produces
Validation.<FieldName>Required and an invalid one
Validation.<FieldName>Invalid. That structure is usable, but it is not a
finite enum and the contract publishes no exhaustive list. Match the codes your
client handles, read the field name out of the code when you need to attribute
the problem to an input, and fall back on the HTTP status for everything else.
Use message for logs and operator-facing diagnostics only.
Recover safely
Inspect the relevant Order, Shipment, address, or parcel data in your client. Correct the data and resubmit only after the underlying issue is resolved. Validation issues normally need correction rather than a repeated identical request — resending the same invalid payload will fail the same way.
For the workflow context, see Order-to-Label Workflow and Create an Order for the exact required fields.