External warehouse integration
An external warehouse can integrate with OMS through GraphQL queries and mutations. The integration has three goals:
- Pull the orders to fulfil from OMS, with everything needed to prepare the shipments — order lines, shipping details and, when the waybill is produced by Calicantus, the shipping labels to apply to the parcels.
- Declare the fulfilment — only in projects where the warehouse validates each shipping before OMS ships it: report the parcels prepared and the quantities packed, or cancel the fulfilment when nothing is shipped, so that OMS can book the carrier and issue the shipping label. Many integrations do not include this step: OMS books the carrier on its own and the warehouse only pulls the orders and their labels.
- Handle the returns: pick up the repayment requests waiting for the warehouse, report the goods actually received and their condition, and confirm the reception — so that the approval and any refund can proceed in OMS.
The orders reach OMS through the e-commerce channel, not through this integration: the scope described here is only the direct exchange between OMS and the warehouse. If the warehouse produces its own waybills, that part of the flow is agreed with Calicantus during onboarding and is not covered by this page.
How the integration works
Pull the orders to fulfil
How the work queue is built depends on how your project is configured in OMS — Calicantus tells you which setup applies to you during onboarding:
- Standard setup — OMS books the carrier on its own. The queue is the
ordersquery filtered onstatus: completed: the order has been processed by OMS but not shipped yet — from that moment it is in the warehouse's court. The Filter by order status guide documents the status filter; instead of polling, OMS can notify you when an order becomescompletedwith theOrder/completedwebhook event. The fulfilment mutations of the next section are not part of this setup. - The warehouse validates the shippings (next section): OMS holds the carrier booking until the warehouse declares what was packed, so the shippings to prepare are those with
fulfillmentStatus: pendingandbookingStatus: pending— theordersquery filtered on the shippings (see Filtering). The order itself is stillprocessingat this stage.
Order and shipping statuses explains the full order lifecycle and the three statuses of a shipping.
The same orders query can include everything needed to prepare the shipments: lines with SKUs and quantities, billing data, shippings and the shipping documents. The Get order details and Get order documents guides document the available fields; keep an eye on the query cost (see Rate limiting).
Declare the fulfilment
This section applies only to projects where the warehouse validates the shippings (see above); skip it otherwise. In this setup each shipping waits for your declaration before OMS books the carrier. Once the goods are packed, close the step with one of two mutations, documented field by field, with the validation rules, in Confirm or cancel a fulfilment:
- Confirm the fulfilment with
shippingFulfillmentConfirm: the parcels prepared and, when the shipping is not packed in full, the quantity packed for each item line (lines not listed have nothing packed), with the serial or batch numbers if you track them. Without lines, the whole shipping is fulfilled. - Cancel the fulfilment with
shippingFulfillmentCancelwhen nothing is packed and nothing will be shipped.
Things to know:
- Each shipping accepts one declaration and there are no follow-up calls: a partial confirmation is final too (the missing items are not shipped with it), so send it when the parcels are closed.
- After the confirmation OMS books the carrier with the parcels you declared and the shipping label is issued — see the next section.
- There is no webhook event for shippings waiting to be fulfilled: poll the
ordersquery periodically, as for the returns.
The shipping labels
When the waybill is produced by Calicantus, the shipping labels are available on the order as soon as the carrier booking is confirmed — right away for an order that is completed in the standard setup, after your fulfilment confirmation when the warehouse validates the shippings: one shipping label (waybill) per parcel — a multi-parcel shipping has multiple labels. The shipping's bookingStatus field tells where the booking process stands: confirmed means the shipping label has been generated. The Get order details and Get order documents guides show how to read it and retrieve the labels. OMS can also notify your integration when a shipping label is issued — see the ShippingLabel / issued webhook event.
Handle the returns
Returns enter OMS as repayment requests (see their lifecycle): when customer care confirms a return, the repayment request moves to waiting_warehouse_reception — from that moment it is in the warehouse's court.
- Pick up the returns to process with the
repaymentRequestsquery, filtering onstatus: waiting_warehouse_reception— the Filter by status and update date guide documents this filter, with theupdatedAtcondition to pick up only what changed since your last poll. Each repayment request carries its return shipping: its status uses the same values as order shippings, sodeliveredmeans the returned goods have reached the warehouse. - Inspect the goods and report the evaluation. For each returned line, record how many items actually came back and how many are in acceptable condition with the
repaymentReturnedLineSetQuantitiesmutation (quantityReceivedandquantityCompliant— the compliant quantity cannot exceed the received one). If the parcel contains an item that was not expected as part of the return, add it with therepaymentReturnedLineCreatemutation. Both are documented field by field, with verified examples, in Manage returned lines. - Confirm the reception with the
repaymentReturnLinesEvaluationConfirmmutation once the evaluation is complete: the repayment request moves fromwaiting_warehouse_receptiontowaiting_for_approval, and the approval and any refund proceed in OMS — see Confirm return line reception.
Things to know:
- There is no webhook event for new repayment requests: poll the
repaymentRequestsquery periodically to pick up the returns waiting for the warehouse. - Quantities can be adjusted only while the repayment request is in
waiting_warehouse_receptionorwaiting_for_approval(any other status is rejected), but the confirmation is accepted only inwaiting_warehouse_reception: review the evaluation before confirming. - An order can have multiple repayment requests over time — always work at the repayment request level, not at the order level.
- The full detail of a repayment request — lines, returned lines, return reason and shipping — is returned by the
repaymentRequestquery, documented in Get repayment request details.
What you need to get started
Everything below is agreed with and configured by Calicantus — to start the onboarding, contact developers@calicant.us:
- API credentials — the integration authenticates like any other API client: see Authentication.
- Your warehouse configured in OMS — the orders and the returns the integration works on are the ones assigned to your warehouse, configured for you by Calicantus.
Before going live, also review the core concepts of the API in Getting started — in particular Errors and Rate limiting.