ml-connector
XeroShipBob

Xero and ShipBob integration

Xero manages your general ledger and customer invoices. ShipBob manages your e-commerce order fulfillment across multiple warehouses. Connecting them keeps your accounting records aligned with your fulfillment operations. Customer orders that flow through Xero as invoices are tracked in ShipBob as they ship, and ShipBob's billing and fulfillment status feed back into Xero so your ledger reflects what actually shipped. The two systems work together instead of in parallel.

How Xero works

Xero is a cloud-based accounting platform that exposes invoices, contacts, purchase orders, payments, accounts, and tracking categories through the Xero Accounting API, a REST service at https://api.xero.com/api.xro/2.0/. Authentication uses OAuth2 Authorization Code flow with 30-minute access tokens and 60-day refresh tokens. Xero supports webhooks for invoice, payment, and purchase order changes (CREATE and UPDATE events only), but webhook payloads contain only resource IDs, requiring a follow-up GET to fetch the full record. The API enforces a 5 concurrent call limit and 60 calls per minute per tenant. All requests must include the Xero-tenant-id header to target the correct organization.

How ShipBob works

ShipBob is an e-commerce fulfillment platform where merchants send inventory to ShipBob fulfillment centers for storage, picking, packing, and shipping. The ShipBob API exposes orders, shipments, products, inventory levels, warehouse receiving orders (WROs), returns, and billing through a REST service at https://api.shipbob.com with current version path /2026-01/. Authentication uses OAuth2 Authorization Code flow with 1-hour access tokens and 30-day refresh tokens, or Personal Access Tokens for single-merchant use. All API calls require the Authorization header and shipbob_channel_id header to identify the acting channel. ShipBob uses webhooks exclusively for sync and provides events for order shipments, returns, receiving, and billing changes. Webhook signatures are verified with HMAC-SHA256.

What moves between them

Orders from Xero flow into ShipBob as new shipments are created or tracked. ShipBob shipment completion, tracking updates, and delivery events flow back to Xero as received transactions and payment records. Billing from ShipBob fulfillment charges (pick-pack-ship costs, storage, returns processing) flow into Xero as vendor invoices or journal entries, keyed to the fulfillment center and order. The main cadence is event-driven via webhooks: ShipBob publishes shipment, delivery, and billing events, while Xero invoice creation and payment records are synced on a regular polling interval or webhook-triggered basis. Contact and customer master data is aligned in both directions so ShipBob orders correctly reference Xero customers.

How ml-connector handles it

ml-connector stores encrypted credentials for both Xero (OAuth tokens) and ShipBob (OAuth tokens) and manages their separate token refresh lifecycles independently. Xero requires the Xero-tenant-id header on every call, which ml-connector sources from customer configuration at setup time and validates against the tenant the user authorized. ShipBob requires shipbob_channel_id on every write, which ml-connector reads from customer settings to ensure writes occur only on behalf of the configured channel. Xero publishes webhook events (invoices, payments) that contain only resource IDs, so ml-connector fetches the full record via GET immediately after notification. ShipBob webhooks include full order, shipment, and billing event payloads, so records are hydrated on arrival. Xero rate limits are strict (5 concurrent, 60 per minute per tenant), so ml-connector queues requests and backs off on rate-limit errors. ShipBob inventory weights are stored in ounces and dimensions in inches, so ml-connector converts these units if Xero expects different units. Fulfillment costs from ShipBob are mapped to Xero tracking categories and cost centers so finance can split fulfillment expenses by warehouse, customer segment, or service level. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A small e-commerce retailer sells specialized products through multiple channels and uses Xero to manage invoicing, accounts payable, and monthly financial reporting. They use ShipBob for fulfillment, storing stock across two regional warehouses. Before the integration, finance staff spent hours each week reconciling ShipBob's warehouse fees and shipment costs against Xero's expense accounts, often discovering mismatches between when ShipBob recorded a shipment and when the customer invoice appeared in Xero. With Xero and ShipBob connected, shipment events automatically post back to Xero as earned revenue or fulfillment cost, and ShipBob billing charges flow into Xero by warehouse and order, so monthly close starts with accurate fulfillment costs already allocated to the correct periods and customers.

What you can do

  • Sync Xero invoices and contacts to ShipBob orders so fulfillment uses the latest customer and pricing data.
  • Post ShipBob shipment completion, tracking, and delivery events back to Xero as received transactions and revenue recognition.
  • Flow ShipBob billing charges (fulfillment fees, storage, returns) into Xero as vendor invoices or journal entries, mapped to warehouse and order for cost allocation.
  • Authenticate both systems independently: Xero via OAuth2 with per-tenant header validation, ShipBob via OAuth2 with channel-id verification on all writes.
  • Handle Xero's strict rate limits and tenant isolation model with queueing and backoff, and ShipBob's webhook-only event stream with full event hydration and HMAC-SHA256 signature verification.

Questions

Which direction does data move between Xero and ShipBob?
Both directions. Xero invoices and customer contacts flow into ShipBob to populate order and shipment records with the latest billing and customer data. ShipBob shipment events, delivery confirmations, and fulfillment billing flow back into Xero as revenue and expense records. The integration keeps both systems current rather than treating one as read-only.
How does ml-connector handle Xero's tenant isolation and ShipBob's channel isolation?
Every Xero request includes the Xero-tenant-id header, which ml-connector reads from customer configuration and validates at setup time. ShipBob requires shipbob_channel_id on all write operations; ml-connector stores this per customer and uses it on every mutation to ensure writes occur only on behalf of the configured channel. Both headers are essential to keeping multi-tenant data isolated.
What happens if Xero's invoice webhook fires but only includes a resource ID?
ml-connector immediately fetches the full invoice record via a GET call after receiving the webhook notification. This ensures the integration has complete invoice data before posting it to ShipBob or flowing it downstream. Similarly, Xero's strict rate limits (5 concurrent, 60 per minute per tenant) are managed with request queueing and exponential backoff.

Related integrations

Connect Xero and ShipBob

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started