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, and packaging.
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.
The status values in the example (accepted → processing, preparing, cancelled) are real and come directly from the state machine (ORDER_STATE_MACHINE, see State Transitions). The exact key names in the response object (currentStatus, validTransitions) were not verified line by line against the source code — confirm them against the real response before depending on their exact shape.
No status returned by this endpoint can differ from the 23 real states of the state machine; states such as on_hold do not exist and will never appear in the response.
This endpoint answers the question "how much did this order actually earn?" by subtracting the real shipping cost, the channel commission, the cost of goods sold (COGS), and packaging from the revenue (revenue) — unlike shippingCharged, which is what was charged to the customer for shipping, costs.shipping is what shipping actually cost.
Field
Description
revenue
Total order revenue.
subtotal
Subtotal before taxes.
shippingCharged
Shipping amount charged to the customer.
costs.shipping
Real shipping cost (fee paid to the carrier).
costs.commission
Sales channel commission.
costs.cogs
Cost of goods sold.
costs.packaging
Packaging cost.
costs.otherFees
Other fees or charges.
taxWithheld
Taxes withheld.
netProfit
Net profit (revenue minus all costs).
marginPercent
Profit margin as a percentage.
flags.cogsComplete
false if any order line lacks a cost snapshot — in that case the breakdown doesn't invent a cost, it flags it as incomplete.
flags.currencyMixed
true if the order mixes different currencies across its components.
flags.packagingPending
true if the packaging cost hasn't been recorded yet.
No invented costs
When a line's cost snapshot is missing, the breakdown flags flags.cogsComplete: false instead of estimating or inventing a cost. A netProfit calculated with cogsComplete: false is partial: treat it as a minimum, not as final profit.