Practical guide

How to use HTTP If-Match for concurrent shipment updates

Where the API supports it, read the resource with its strong ETag and send that tag in If-Match when updating. If the update is stale, fetch the current record and reconcile the changes instead of retrying automatically with a newer tag.

Define the concurrency boundary

Prevent overwrites at the origin server.

RFC 9110 section 13.1.1 specifies strong comparison for If-Match. The origin must not perform the requested method when the condition is false; a typical failure response is HTTP 412. Apply the version check and write atomically. An existence-only If-Match: * check does not protect against overwriting a specific newer version.

Worked example

Two dispatchers change the same movement.

Two synthetic clients read the same shipment version. The first updates the vehicle; the second submits a revised stop against the earlier tag. The stale write must not overwrite the new vehicle. Fetch the current shipment, show both intended changes and apply a new request only after conflict resolution.

Acceptance checks

Separate concurrency, permissions and retry.

Related resources

Continue with a scoped check.

Review freight API boundaries

Document machine-readable conflict responses

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