← Back to blog

Logistics API integration: five checkpoints for WMS and e-commerce order sync

By Alex Chen

Who this article is for

  • E-commerce operations / support leads: Diagnosing “in stock online but cannot ship from warehouse” and scoping API integration.
  • Engineering / WMS owners: Teams maintaining WMS, OMS, or a .NET middleware for order push, inventory write-back, and logistics status.

The problem

Marketplaces, brand sites, and warehouse systems (WMS) are often owned by different vendors or departments. Orders originate on the platform, picking happens in the warehouse, tracking lives with carriers—CSV imports and manual reconciliation turn minutes of lag into half-day delays during promos.

Typical symptoms:

  • Platform reserved stock before WMS received the order—oversell complaints rise
  • Warehouse shipped while the storefront still shows “preparing”
  • Returns update only one side—finance and support each keep a spreadsheet

Executive summary: Logistics API value is not “fewer export clicks”—it is a single reconcilable timeline for orders and inventory. Define inventory authority and state flow before writing code.

Checkpoint one: inventory authority and reservation

Decision-makers care about: One oversell hurts the brand more than the integration budget—answer “whose stock number wins” first.

Engineering focus:

  • Name an inventory authority (usually WMS physical stock; platform shows sellable quantity)
  • On order place: reserve then confirm deduction—prevent concurrent checkout oversell
  • Sellable = on-hand − reserved − safety stock—document the formula
  • Multi-warehouse routing (nearest, designated) configurable at the API layer
  • Stockouts write back predictable states (partial ship, split orders)—not silent failures

Checkpoint two: order state machine and event ordering

Decision-makers care about: When support and shoppers see different status than the warehouse, trust is harder to fix than tech debt.

Engineering focus:

  • Cross-system state machine: paid → pushed to WMS → picking → shipped → in transit → delivered
  • Each transition triggered by one event (webhook, poll, or queue)—no ad hoc bidirectional edits
  • Idempotency keys for duplicate carrier webhooks
  • SLA for write-back latency (e.g. platform updates within 5 minutes of WMS ship)
  • Exceptions (cancel, address change, intercept) on separate flows—not the happy-path API
State Writer Customer-facing
Reserved Middleware / OMS Preparing
Shipped WMS Shipped + tracking
Delivered Carrier API Completed

Checkpoint three: API contracts, throttling, peak drills

Decision-makers care about: A promo that knocks WMS offline costs more than daily integration maintenance.

Engineering focus:

  • Separate order push from inventory queries—read/write throttling independently
  • .NET middleware queues platform orders and smooths to WMS throughput
  • Versioned contracts with schema validation on SKU, qty, warehouse, recipient
  • Peak drill at 3× daily volume—queue depth, error rate, oldest unprocessed order age
  • Carrier API timeouts, retries, circuit breakers; failed orders to dead-letter with manual playbook

Checkpoint four: returns and partial fulfillment

Decision-makers care about: Returns season with only outbound automation still means manual returns—and inventory blows up at quarter end.

Engineering focus:

  • Returns, exchanges, partial ship in the state machine from day one—not “phase two”
  • Return authorization linked to original order; WMS receipt releases sellable stock on the platform
  • Split shipments: child tracking numbers; parent completes when all children ship
  • Cancellations release reservations; picked orders use intercept flows—not hard deletes

Checkpoint five: reconciliation, alerts, manual exceptions

Decision-makers care about: After automation, leadership asks “did we miss orders yesterday?”—not “is the API up?”

Engineering focus:

  • Daily reconcile: platform orders vs. WMS received vs. shipment write-backs
  • Variance reports with order IDs and trace IDs for support and warehouse joint handling
  • Alerts: queue depth thresholds, consecutive webhook failures, inventory variance ratio
  • Manual exception console: single-order resubmit, forced sync—with role permissions and audit logs
  • Degraded mode: constrained batch import when APIs fail, flag orders for catch-up sync

Suggested rollout

Phase Scope Acceptance
Phase 1 Single warehouse, single channel, outbound only Zero reconcile gaps for 7 days
Phase 2 Promo SKUs, queue and throttling Peak drill pass
Phase 3 Returns, split ship Complete before returns season

Next steps

If e-commerce and WMS still exchange files, start with an inventory authority and state machine workshop, then scope .NET middleware. We have integrated similar order and warehouse flows—contact us through the site to discuss your current state.

Related articles