Practical guide

How to handle RFC 9457 problem details in freight APIs

Branch on the HTTP response status and a documented problem type, not on the human-readable error message. Decide separately whether to correct data, retry, or check if the original operation already succeeded.

Define predictable error types

Keep field errors safe and useful.

RFC 9457 defines a machine-readable error representation including JSON served as application/problem+json. Use documented problem type identifiers and put partner-specific field information in a documented extension. Treat the response status as authoritative for HTTP semantics; do not blindly trust a conflicting status member. Do not put credentials, internal stack traces or private shipment details into the public error body.

Worked example

A data correction is not a retry.

A synthetic submission receives a documented validation problem identifying the loading site field. Route it to the party that owns that field, and resubmit only after correction. If a separate request times out with no response, first establish whether the provider processed the original request. A missing response is not proof that replay is safe.

Acceptance checks

Handle partial and non-standard responses.

Related resources

Continue with a scoped check.

Review API integration boundaries

Preserve the original response in an audit trail

Software direction

Make transport data issues visible before the handoff.

Explore the public demo and compare proposed software plans. Paid access is not open yet.

Compare plans