WarehouseSync
For warehouses and 3PLs

Warehouse integration guide

For warehouse and 3PL systems connecting to a Shopify store that uses WarehouseSync. The merchant sends you a setup link with the store's base URL and an API secret; the values below are placeholders. Every endpoint works as .xml and .json.

1. Credentials

https://warehousesync.leadersol.com/api/your-store.myshopify.com/v1
Authorization: Bearer <API secret>
Use the API secret the merchant gave you.

2. Test the connection

curl -s -H "Authorization: Bearer <API secret>" "https://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/connection.xml"

A successful response is an XML document starting with <Connection>.

3. Endpoints

Bodies and responses are application/xml.

Check

GEThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/connection.xml

Verify the credentials and see which permissions the store granted. Call this first.

Pull orders

GEThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/orders.xml

Orders waiting to ship. Optional query: fulfillment_status=any|unfulfilled|partial (default any), location_id, limit (1–250). Cancelled orders, digital items and items removed by an edit are never included.

GEThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/changes.xml

Orders that changed after you received them: Type cancelled / deleted (Action STOP_SHIPMENT), address_changed (UPDATE_ADDRESS), items_changed (RE_PULL_ORDER). Check before shipping; poll with since_id=<LastChangeID>.

GEThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/orders/{orderId}.xml

One order by its Shopify order id — re-read an order after items_changed.

GEThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/fulfillment-orders/{orderId}.xml

Fulfillment orders (per location) for one order.

Push updates

POSThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/fulfillment-confirmation.xml

Confirm a shipment with tracking. Shopify fulfills the order and notifies the customer. A cancelled order is refused with ORDER_CANCELLED.

Sample request body
<?xml version="1.0" encoding="UTF-8"?>
<Fulfillment>
  <OrderID>5551234567890</OrderID>
  <Status>shipped</Status>
  <TrackingNumber>1Z999AA10123456784</TrackingNumber>
  <Carrier>UPS</Carrier>
  <Lines>
    <Line>
      <SKU>SKU-123</SKU>
      <QuantityFulfilled>1</QuantityFulfilled>
    </Line>
  </Lines>
</Fulfillment>
POSThttps://warehousesync.leadersol.com/api/your-store.myshopify.com/v1/inventory.xml

Set available stock per SKU and location. Send many updates in one request.

Sample request body
<?xml version="1.0" encoding="UTF-8"?>
<Inventory>
  <InventoryUpdate>
    <SKU>SKU-123</SKU>
    <LocationID>12345678901</LocationID>
    <Available>42</Available>
  </InventoryUpdate>
</Inventory>

Good to know

  • Always use https. A plain http request is redirected, and some clients turn a redirected POST into a GET.
  • Every response is XML. Errors return <Error> with <Code>, <Message> and, when Shopify rejected a write, <Details>. Every endpoint also exists as .json.
  • Before shipping, check changes for orders that were cancelled or edited after you received them. If you give the merchant a webhook URL, each change is also POSTed to it the moment it happens, signed: X-WarehouseSync-Signature is base64 HMAC-SHA256 of the raw body with your webhook secret.
  • Rate limit: 240 requests per minute per store. A 429 response carries Retry-After.
  • A 402 response means the store has no active plan — ask the merchant to open the app in Shopify admin.
  • A store with several warehouses gives each one a secret for its own Shopify location (connection shows LocationID). That secret only sees orders assigned to its location; a shipment for another location is refused with WRONG_LOCATION, and stock for another location with LOCATION_NOT_ALLOWED. LocationID may then be left out of inventory updates.
  • Polling orders every 5–15 minutes is plenty; there is no benefit to polling faster.

Error codes

  • 401 UNAUTHORIZEDMissing or wrong API secret, or the secret was revoked.
  • 402 PAYMENT_REQUIRED / FEATURE_NOT_ENABLEDThe store's plan does not cover this endpoint.
  • 404 SHOP_NOT_INSTALLEDThe store uninstalled the app.
  • 405 METHOD_NOT_ALLOWEDA POST-only endpoint received another method.
  • 422The body could not be read or failed validation; the message says why.
  • 429 RATE_LIMITEDSlow down and retry after the Retry-After seconds.
  • 5xxTemporary; retry with backoff.