Handle partial label creation, bulk workflows, and compensation steps without corrupting internal state.
Success and Failure Can Arrive Together
A carrier can create three labels, reject two parcels, and still return one transport-level success response. If you collapse that into a single pass/fail flag, your downstream systems will never know which parcels actually moved.
Compensation Is Part of the Write Path
When the carrier succeeded but your database write failed, you now own a split-brain workflow. Compensation might mean voiding the carrier artifact, replaying the internal save with idempotency, or parking the job in manual review. The right answer depends on what the carrier can still reverse safely.
Carrier Reality
Bulk manifest and multi-piece shipment APIs often blend accepted and rejected items in the same payload. The only safe implementation is to model each piece explicitly instead of pretending the whole batch has one status.
Bulk APIs Need Item-Level Evidence
Store per-item identifiers, failure reasons, and compensation status. If you cannot explain which child operation succeeded and which child operation failed, the post-incident cleanup will be slow, manual, and expensive.