This endpoint returns all the information for an order: its items, the customer, the originating channel, and the HATEOAS links with the actions available for its current state. This page also covers two related endpoints for a specific order: its valid state transitions and its financial profit breakdown.
Use it when you need to:
Display an order's detail in your application.
Sync information to external systems.
Verify which actions are available before executing a transition (accept, prepare, cancel).
Calculate an order's real profit after shipping, commission, cost of goods, packaging, and other fees.
The _links object (inside data, not as a sibling of the order) indicates which actions are available based on the current state. The possible actions are accept, reject, cancel, prepare, fulfill, and returns — the links engine only exposes the ones valid for the order's current state according to the state machine. You don't have to hardcode that logic in your client.
If an action doesn't appear in _links, it isn't valid in the current state; see State Transitions for the complete state machine.
Tenant isolation
You can only retrieve orders from your own tenant. Attempting to access an order from another tenant returns 404, never cross-tenant information.
Flow profile the valid transitions are computed against: basic, intermediate (default), or wms-full.
This is NOT the 23-state HATEOAS table
This endpoint validates against a different table than the one that decides which actions appear in _links — see State Transitions for the full detail (two tables, with 17 vs. 23 states, and why they differ). With the default profile (intermediate), accepted transitions to processing, fulfilled, or cancelled — not to preparing.
Returns the order's net profit: revenue minus real shipping cost, commission, cost of goods sold (COGS), packaging, and other fees (otherFees, e.g. payment gateway or platform charges). This endpoint answers the question "how much did this order actually earn?" — unlike shippingCharged, which is what was charged to the customer for shipping, costs.shipping is what shipping actually cost.
Order additional costs
costs.packaging, costs.labor and costs.other add up the order's additional costs by category (see Order costs and COGS correction). An order without additional costs returns 0 in all three.
Cost of goods sold: the sum of the lines' COGS minus their reversals, with corrections applied. Lines with costMissing do not add up.
costs.packagingnumber
Sum of the order's additional costs with category packaging (packaging and supplies).
costs.labornumber
Sum of the order's additional costs with category labor.
costs.othernumber
Sum of the order's additional costs with category other.
costs.otherFeesnumber
Other fees or charges (payment gateway, platform, other) — excludes the channel commission, which is reported separately in commission.
taxWithheldnumber
Taxes withheld.
netProfitnumber
Net profit: `revenue` minus `shipping`, `commission`, `cogs`, `packaging`, `labor`, `other`, and `otherFees`.
marginPercentnumber
Profit margin as a percentage.
flagsobject
Reliability indicators for the calculation.
flags.cogsCompleteboolean
`false` if any order line lacks a cost snapshot or was left with costMissing (no lot and no unitCost) — in that case the breakdown doesn't invent a cost, it flags it as incomplete.
flags.currencyMixedboolean
`true` if the order mixes different currencies across its components.
No invented costs
When a line's cost snapshot is missing, or the line was left with costMissing, the breakdown flags flags.cogsComplete: false instead of estimating or inventing a cost. A netProfit calculated with cogsComplete: false is a preliminary profit: treat it as a maximum, not as final profit. Enter the product's unitCost and correct the line's COGS to complete it.