orderLifecycle
Topics: Commerce
Fetch a complete order lifecycle: order, lines, estimate, invoices, shipments, and jobs. Requires order:read.
Returns
OrderLifecyclePayload!Arguments
TypeID of the order to expand (ord_01K…). Must belong to the caller's tenant; otherwise the payload comes back empty with an orderId: order not found error.
Examples
Read Commerce Order Lifecycle
query ReadCommerceOrderLifecycle($orderId: OrderID!) {
orderLifecycle(orderId: $orderId) {
order { id orderNumber status paymentStatus }
orderLines { id lineNumber quantity }
estimate { id estimateNumber }
invoices { id invoiceNumber totalAmount paidAmount currency }
jobs { id name }
errors { path message }
}
}Variables
{
"orderId": "ord_01h455vb4pex5vsknk084sn02q"
}Exact field SDL
"""
Fetch a complete order lifecycle: order, lines, estimate, invoices, shipments, and jobs. Requires order:read.
"""
orderLifecycle(
"""
TypeID of the order to expand (`ord_01K…`). Must belong to the caller's tenant; otherwise the payload comes back empty with an `orderId: order not found` error.
"""
orderId: OrderID!
): OrderLifecyclePayload! @topic(names: ["commerce"]) @topic_example(names: ["commerce.order-lifecycle"])Declared on Query. Access is checked by the platform for each operation.