Order Intake API: Testing and Go-Live

The scenarios to test before going live, the go-live checklist, and answers to common questions.

Recommended integration

  1. Create each order once it's final (paid, approved, past any cancellation window your platform has). Store the returned order id and item ids. If the request times out, send it again.
  2. Send money fields (currency, amounts and item price) on every order, so international shipments have customs values.
  3. Send changes only while unverified. If an edit or cancel returns 403, the warehouse has started. Contact your customer instead of retrying.
  4. Poll the shipments feed on a schedule. See The tracking poll.
  5. Write tracking for every order in each shipment's orders, with every parcel's tracking number if your platform supports more than one.
  6. Show why an order is waiting. Read not_ready_to_ship_types from your orders poll to tell shoppers about address problems or stock delays.
  7. Close orders out when fulfillment_status is fulfilled or cancelled. To check specific orders, use GET /orders.json?order_number=… or GET /orders/{id}.json. Don't page through every order.
  8. Watch for authentication failures. A 401 means the key was rotated or the store deactivated. Alert your customer and pause the store's sync rather than retrying.

Testing your integration

Ask your customer for a test store: a separate store in their Warehance account with its own credentials. Then walk through these scenarios:

#ScenarioExpect
1Create an order, then read it back by id and by ?order_number=201, then 200 with the same order
2Send the same order again200 with the existing order, no duplicate
3Update the address, add a line, change a quantity and delete a line while unverified200 each time; the deleted line is gone
4Cancel an unverified order200, fulfillment_status cancelled
5Send an order with an unknown SKU201, sku_id null; it ships once your customer maps it
6Have your customer ship an order in one box, then one in two boxesYour poll picks up every tracking number
7Have your customer split an order and merge two ordersTracking lands on the right orders
8Have your customer mark an order shipped without a labelYour platform closes it without tracking
9Try an edit after the warehouse has started403, handled without retrying
10Have your customer regenerate the keyYour platform alerts on 401 and accepts the new key
11Send an international order with currency, amounts and item pricesThe values come back as sent
12Have your customer put an order on hold, then release itYour poll sees the hold flag in not_ready_to_ship_types turn true, then false

Go-live checklist

  • Credentials. The base URL, username, API key and store ID for the live store are stored, and the key can be updated without a deploy.
  • SKUs. Your customer has your SKU list and has mapped any SKUs that differ from their product SKUs.
  • Shipping services. Your customer has the list of requested_shipping_service names you send and has mapped each one.
  • Money fields. Orders carry currency, amounts and item prices.
  • Polling. Your shipments poll runs on a schedule with an overlapping window, reads every page, and de-duplicates on shipment id.
  • Edge cases. Multi-parcel shipments, several shipments per order, merged orders and fulfilled-without-tracking orders are handled.
  • Alerts. 401 and repeated 5xx responses alert someone.

FAQ

Can Warehance push tracking to our platform instead of us polling?
Not through this API. Poll GET /shipments.json with updated_at_start.

Can we send orders for several stores with one set of credentials?
No. Each store your customer connects has its own username, API key and store ID.

Is there a sandbox?
Use a test store in your customer's Warehance account. It behaves exactly like the live one; your customer can ship, split, merge and cancel test orders for you.

Why is status different from fulfillment_status?
fulfillment_status uses the same values as the rest of Warehance and is more precise. status is simpler and tells you whether the order still accepts edits. Use fulfillment_status for progress, and status unverified to know whether the order still accepts edits.

Can we change the order number?
No. To replace an order, cancel it while it's unverified and create a new order with a new number.

Can we change the currency?
No. currency is set when the order is created. Cancel and recreate the order (with a new number) if it was wrong.

What happens if we send an order before payment clears?
The warehouse may ship it straight away. Only send orders that are ready to fulfill, and cancel with DELETE while unverified if something changes.

We used page and per_page before. Do they still work?
Yes, for now, but use limit and cursor. See Pagination.

Who do we contact when something looks wrong?
Your customer: the brand or warehouse that gave you the credentials. Include the store ID, order numbers, request times and any request_id.


Did this page help you?