Practical guide

When to use OpenAPI webhooks or callbacks in a freight API

Use a callback to describe a request tied to a parent API operation. Use top-level webhooks for notifications independent of another API call. This describes the HTTP contract; it does not specify which transport events the business must accept.

Model the trigger and response

Choose the contract based on how the notification starts.

The OpenAPI 3.1.1 specification defines callback operations linked to a parent operation and top-level webhooks for independent incoming requests. Document the sender, recipient response, correlation key and applicable payload version. Specify authentication, retries and delivery semantics as explicit operational policies rather than assuming the OpenAPI definition implements them.

Worked example

A booking response and a standing status feed have different contracts.

A synthetic freight API sends a booking result tied to a submitted booking operation. That result can be described as a callback. A separate standing status feed registered outside the API can be described under webhooks. Both may carry the same shipment reference, but their trigger, accepted response and retry policy can differ.

Acceptance checks

Test the contract before a partner integrates.

Related resources

Continue with a scoped check.

Review developer integration resources

Specify shipment event identity and payload separately

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