Skip to main content
Next Defence - Next-Gen AI Cyber Security Firm
Australia & New Zealand[email protected](02) 9064 2614
INSIGHT

Recovery Workbook for a Freight Booking API Failure

When a carrier-booking API becomes unavailable, transport brokers often keep taking consignments by telephone, spreadsheet or alternative carrier portal. After the API returns, those manual decisions must be.

A restored booking endpoint can create new freight problems

When a carrier-booking API becomes unavailable, transport brokers often keep taking consignments by telephone, spreadsheet or alternative carrier portal. After the API returns, those manual decisions must be reconciled with queued messages, idempotency keys, labels and billing events. Restarting the interface is not the same as restoring the freight service. The recovery workbook should prove that consignments are accounted for exactly once in the business record, or that every exception has a controlled disposition.

Imagine a fictional logistics broker integrating its transport management system with three carrier APIs. During a two-hour outage, customers continue to request pickups, drivers change routes and operations staff create several jobs manually. One carrier accepted a booking before the connection timed out; another never received it. The broker cannot safely replay every request because a timeout does not reveal whether the remote transaction was committed.

The recovery objective therefore has three dimensions: service availability, event integrity and business reconciliation. A successful demonstration shows that new bookings can be processed, previously accepted bookings are not duplicated and unresolved shipments remain visible for human handling. It also preserves an audit trail suitable for investigating customer disputes, not merely a green health indicator on the API dashboard.

Map the booking lifecycle and its side effects

Draw a workflow from customer order to carrier acknowledgement, label issuance, pickup scheduling, tracking update and invoice creation. Mark where the broker sends data, where the carrier accepts responsibility and where an asynchronous callback or webhook updates the transport management system. Identify which system owns the authoritative job identifier at each stage. Distinguish internal booking IDs, carrier consignment references, label IDs and invoice references; treating them as interchangeable is a common reconciliation error.

List actions that cannot safely be replayed blindly: charging a payment method, allocating a vehicle, printing a regulated document, notifying the recipient, requesting customs clearance or cancelling a pickup. Note the carrier-specific semantics of retries and idempotency. If one carrier documents an idempotency key for creation requests and another does not, the workbook must not assume universal behaviour.

Capture dependency assumptions such as DNS, authentication tokens, certificate expiry, messaging queue retention, timestamp handling, object storage and the carrier’s rate limits. A recovered web API may still have a blocked callback endpoint or an expired credential. Include the business-side fallbacks and the people who can approve manual dispatch when systems are degraded.

Define the outage and recovery ledger

Prepare a fictional set of at least six consignments. One should be acknowledged normally; one accepted remotely but followed by a client timeout; one rejected before submission; one submitted twice with the same idempotency identifier; one manually booked during the outage; and one cancelled while its creation message remains queued. Include expected destination, goods classification, carrier, sender, pickup slot and charge reference. Use a sandbox supplied by the carrier where available; otherwise simulate carrier responses in an isolated test harness.

For each record, track the source event, internal job ID, external reference if known, last confirmed status, message ID, retry count, event timestamp, disposition owner and customer communication. Do not use only a boolean “sent” flag. The important distinction is between not sent, sent but outcome unknown, accepted, rejected, cancelled and requires review. The ledger needs to survive an integration service restart and be queryable by operations staff.

Set realistic acceptance criteria with the transport manager. It may be acceptable to hold an ambiguous consignment for a telephone confirmation; it is not acceptable to silently dispatch it twice. Record recovery time to usable booking and a maximum period for reconciling ambiguous records. The target should reflect the cargo and service promise rather than an arbitrary universal number.

Prove the normal path first

Before introducing failure, send a synthetic booking to the test carrier and verify the full chain: gateway response, carrier acknowledgement, returned consignment reference, label storage, tracking subscription and billing record. Repeat with another carrier because schema and callback differences matter. Capture an event sequence with correlation IDs, not just screenshots of the final order screen.

Check whether the same booking can be seen by the service desk, warehouse planner and accounts team using their real business roles in the test environment. A recovery run can appear complete to engineers while the dispatch team has no printable label or cannot view the carrier’s pickup number. Include the user-facing step that declares the consignment operationally usable.

Then run the failure fixture. Simulate a connection timeout after a carrier acceptance, preserving the ambiguous state. Allow other bookings to queue while a control operator records a manual booking in the ledger. Restore connectivity according to the runbook and observe what the integration retries. Use low-rate synthetic messages, not uncontrolled bursts against live carrier systems.

Prevent duplicates when events return out of order

The critical check is whether the broker can determine the status of a timed-out request before creating another shipment. Where supported, query the carrier using a stable customer reference or idempotency key. Where there is no safe query, route the item to a named operator for confirmation. Do not retry with a new booking identifier simply to clear an error queue. That can produce two pickups, two labels or two charges.

Check that callback processing is idempotent as well. A carrier may deliver the same accepted event more than once; the integration should not create duplicate internal jobs each time. Conversely, an old pending event arriving after cancelled should not reopen the consignment. Define ordering or state-transition rules and test them with the synthetic cases. Audit the exact application rule used to select the authoritative state.

A manually booked job needs deliberate merging. Match it by a controlled combination of customer reference, pickup details and confirmed carrier reference, with human verification when necessary. Do not automatically match on a person’s name or an approximate timestamp; those are unreliable and may expose personal information unnecessarily. Mark that the manual action has been incorporated, who approved the merge and whether any payment or tracking corrections are required.

Verify operational and financial reconciliation

Once the technical service is healthy, compare three sources: the broker’s order ledger, each carrier’s accepted consignments and the finance system’s charges or accruals. Confirm one authorised booking disposition per customer request. An exception may be valid when a job was intentionally cancelled or moved to another carrier, but the reason must be recorded. Reconciliation should include consignments created just before and just after the outage window, not only those stored in the retry queue.

Inspect customer communications. A duplicate shipment confirmation can cause a recipient to prepare for two deliveries; a missing tracking notice can drive support costs. Identify which notifications were sent during degradation and which should be suppressed when recovery finishes. Decide who authorises any corrective customer message and how the broker avoids broadcasting inconsistent status across email and portal views.

Use an evidence table with business request ID, carrier, expected final state, actual final state, manual action, exceptions and sign-off. Include a reference to the carrier response rather than copying unnecessary customer details. The final acceptance should be jointly approved by integration engineering and freight operations; neither team alone sees the entire impact.

Prepare for a compromised integration credential

Recovery planning should also handle a suspected leak of the token used to book consignments. Ask how the organisation would revoke or rotate the token while preserving evidence of recent API calls. Can it distinguish legitimate jobs from bookings submitted by an unauthorised party? Are carrier logs available for the relevant period, and can outstanding bookings be placed on review without deleting the ledger?

Do not simply revoke an active credential in production during a tabletop. In the test harness, change a synthetic token and verify that the new service identity has the minimum required routes while the old token is rejected. Identify who can authorise emergency replacement if the regular administrator is unavailable. A token rollover that only one engineer knows how to perform is an untested operational dependency.

Explain the difference between retry, replay and replacement

Operations teams sometimes use these words interchangeably, but they demand different safeguards. A retry sends the same logical request again, ideally with an idempotency identifier recognised by the carrier. A replay reconstructs events from a durable queue or log and must preserve ordering and processing status. A replacement cancels or supersedes the original customer request with a newly authorised booking. The recovery procedure should document which operation is being performed and who can approve it.

For the ambiguous synthetic consignment, have the recovery operator choose among those actions and explain the evidence. If the carrier already accepted the job, a new booking is not a retry; it may create another obligation. If a cancelled event appears after a successful manual replacement, blindly replaying it may cancel the wrong shipment. The state-transition design should require a reconciliation decision rather than treating all recovered queue entries as safe instructions.

This distinction is particularly important when the freight system integrates payment, border documentation or insurance services. The exercise should identify which dependent business actions require separate confirmation before any retry is released.

Make service restoration a business decision

Run a short handover drill with a dispatcher who did not take part in the technical test. Provide the current reconciliation ledger and ask which consignments can be released for pickup, which require carrier confirmation and which customers need an update. Record ambiguities in the runbook. If staff cannot act on the output, the integration is not sufficiently recovered regardless of dashboard health.

The resulting workbook should include outage chronology, systems affected, carrier-specific behaviour, message traces, duplicate prevention checks, unresolved records, recovery timing and approvals. Schedule a new exercise when a carrier changes its API, when an event queue is replaced, or when a new finance integration adds side effects. The success criterion is simple to state but difficult to demonstrate: each customer request has a trustworthy outcome and no unapproved replay creates a second physical or financial obligation.

Sources and further reading

How Next Defence can help

Rehearse freight booking API recovery with agreed customer-impact limits as part of an incident response and cyber resilience assessment. The platform owner should compare restored orders against the queue and verify that duplicates are not dispatched.

LET'S TALK

Let’s talk about your security.

Tell us what you are protecting, where you need greater visibility or what you want to achieve. We will help identify the right next step.

Talk to a Security Specialist

Describe your security requirements. Please do not submit passwords, credentials or confidential incident evidence. This form is not an emergency incident-response channel.

Form powered by HubSpot. Review our Privacy Policy. If the form doesn’t load, email [email protected].