Practical guide

How to design a CloudEvents contract for shipment webhooks

Use the CloudEvents envelope to identify and route events, and document the freight payload separately. Use the event origin and event ID for deduplication; use a shipment or leg reference to associate multiple events with the same movement.

Separate envelope and payload

Agree which changes require a new contract version.

The CloudEvents specification requires source, id, specversion and type. The source and ID together distinguish an event. Document the event type, payload schema, status vocabulary and delivery guarantees independently. CloudEvents does not itself establish that a webhook is authentic or provide exactly-once delivery.

Worked example

Two carrier systems both send event 42.

In a synthetic webhook feed, carrier A and carrier B both publish ID 42 from different sources. Treat them as distinct events. If carrier A redelivers the same event, avoid repeating a side effect. If a redelivery has different content for the same source and ID, flag the contract conflict rather than silently accepting it as a new status.

Acceptance checks

Test idempotency, access and ordering separately.

Related resources

Continue with a scoped check.

Plan connector acceptance and observability

Keep freight event semantics consistent across formats

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