Access sales orders, line items, allocation status, and shipping progress.
query GetOrder($id: ID!) {
Order(id: $id) {
id
label
status
total
dated_at
customer { id label }
shipping_status
delivery_status
line_items {
id
variant { id label }
quantity
price
}
}
}
query Orders(
$where: QueryOrdersWhereWhereConditions,
$orderBy: [QueryOrdersOrderByOrderByClause!],
$search: String,
$first: Int,
$page: Int
) {
Orders(
where: $where,
orderBy: $orderBy,
search: $search,
first: $first,
page: $page
) {
paginatorInfo {
total
currentPage
}
data {
id
label
status
dated_at
total
customer { id label }
}
}
}
| Field | Type | Description |
|---|
id | Int | Unique identifier. |
label | String | Order number. |
status | OrderStatus | Global workflow status. |
notes | String | Public notes for the PDF. |
internal_notes | String | Private office notes. |
total_units | Float | Calculated sum of all items quantity. |
total_units_aggregate | Float | Sum of units for filtered results. |
update_on_hand | Boolean | True if this order impacts on-hand stock. |
available_for_shipping | Boolean | True if items are in stock and ready to ship. |
dated_at | Date | Sales order date. |
created_at | Date | Creation date. |
shipping_at | Date | Estimated shipping date. |
location_label | String | Origin warehouse name. |
need_reorder | Boolean | True if stock is insufficient to fulfill. |
shipping_status | ShippingStatus | Progress of shipping orders. |
delivery_status | DeliveryStatus | Progress of actual delivery. |
return_status | ReturnStatus | Progress of associated returns. |
stock_allocation_status | StockAllocationStatus | Stock reservation status. |
billing_status | BillingStatus | Progress of associated invoices. |
payment_status | PaymentStatus | Overall payment progress. |
committed_quantity | Float | Quantity assigned to this order. |
uncommitted_quantity | Float | Quantity pending assignment. |
reserved_quantity | Float | Quantity reserved in inventory. |
shipped_quantity | Float | Quantity documented in shipping orders. |
delivered_quantity | Float | Quantity actually out of stock. |
returned_quantity | Float | Quantity returned by customer. |
unreturned_quantity | Float | Quantity remaining to be returned. |
billed_quantity | Float | Quantity included in invoices. |
unbilled_quantity | Float | Quantity still pending billing. |
paid_quantity | Float | Quantity already paid for. |
unpaid_quantity | Float | Quantity still pending payment. |
billed_amount | Float | Value already invoiced. |
unbilled_amount | Float | Value still pending invoice. |
paid_amount | Float | Value already paid. |
unpaid_amount | Float | Value still pending payment. |
exchange_rate | Float | Currency exchange rate. |
tax_type | TaxType | "Exclusive" or "Inclusive". |
subtotal | Float | Net amount before taxes. |
total_without_tax | Float | Total excluding tax. |
total_ecotax | Float | Specific environmental tax sum. |
total | Float | Final order total. |
external_reference | String | External system reference. |
for_the_attention_of | String | Recipient contact name. |
source | String | Origin of the order (e.g. "B2B Store"). |
default_discount | Float | Global discount value. |
discount_type | DiscountType | "percentage" or "amount". |
customer | Customer | Associated customer. |
currency | Currency | Order currency. |
price_level | PriceLevel | Applied price level. |
account_representative | AccountRepresentative | Linked sales rep. |
season | Season | Commercial season. |
payment_information | PaymentInformation | Bank details for payment. |
billing_address | Address | Order billing address. |
shipping_address | Address | Documented delivery address. |
line_items | [LineItemOrder] | List of products ordered. |
total_taxes | [DocumentTaxRate] | List of taxes applied. |
estimates_count | Int | Number of source estimates. |
estimates | [Estimate] | Linked estimates history. |
invoices_count | Int | Number of linked invoices. |
invoices | [Invoice] | Associated invoices. |
shipping_orders_count | Int | Number of linked deliveries. |
shipping_orders | [ShippingOrder] | Linked shipping documents. |
product_returns_count | Int | Number of associated returns. |
product_returns | [ProductReturn] | Returns history. |
refunds | [Refund] | Linked refunds. |
credit_notes | [CreditNote] | Linked credit notes. |
integrations | [Integration] | Connected platform links. |
purchases_count | Int | Number of linked drop-shippings/purchases. |
purchases | [Purchase] | Procurement links. |
stock_adjustments_count | Int | Number of linked adjustments. |
stock_adjustments | [StockAdjustment] | Associated stock movements. |
email_histories | [EmailHistory] | Communication logs. |
files | [File] | Attachments. |
pdf_template | PdfTemplate | Design used for PDF generation. |
has_batch_numbers | Boolean | True if order items use batch tracking. |
tracking_completed | Boolean | True if all tracking requirements are met. |
custom_fields | [EntityCustomField] | Custom fields for this entity. |
The following fields can be used in the where parameter:
id, label, notes, status, total_units, update_on_hand, dated_at, created_at, updated_at, customer_id, available_for_shipping, shipping_at, committed_quantity, uncommitted_quantity, delivered_quantity, shipped_quantity, reserved_quantity, returned_quantity, unreturned_quantity, shipping_orders_count, product_returns_count, purchases_count, need_reorder, variant_id, variant_label, variant_sku, location_id, batch_number_id, has_batch_numbers, tracking_completed, shipping_status, delivery_status, return_status, stock_allocation_status.
Example Filters:
| Field | Example |
|---|
status | { "column": "STATUS", "operator": "EQ", "value": "active" } |
customer_id | { "column": "CUSTOMER_ID", "operator": "EQ", "value": 100050 } |
delivery_status | { "column": "DELIVERY_STATUS", "operator": "EQ", "value": "not_delivered" } |
You can sort results using the orderBy parameter:
id
label
notes
total_units
status
update_on_hand
dated_at
created_at
shipping_at
customer_id
customer_label
committed_quantity
uncommitted_quantity
shipped_quantity
delivered_quantity
reserved_quantity
returned_quantity
unreturned_quantity
You can group sales orders using the groupBy parameter for reports:
| Field | Description |
|---|
id | Group by internal ID. |
year | Group by year of dated_at. |
month | Group by month of dated_at. |
day | Group by day of dated_at. |
| Value | Description |
|---|
unpublished | Draft status (hidden). |
pending_validation | Awaiting approval. |
active | Confirmed and in progress. |
completed | Order fully fulfilled and closed. |
archived | Moved to history. |
cancelled | Document voided. |
| Value | Description |
|---|
not_shipped | No shipping order created. |
partially_shipped | One or more shipping orders created. |
shipped | All items included in shipping orders. |
| Value | Description |
|---|
not_delivered | Stock not yet adjusted for delivery. |
partially_delivered | Some items out of stock. |
delivered | All items marked as delivered. |
| Value | Description |
|---|
not_billed | No invoice generated. |
partially_billed | Partial invoices created. |
fully_billed | Total value reached in invoices. |
| Value | Description |
|---|
unpaid | No payment recorded yet. |
partially_paid | Partial payment received. |
paid | Total value fully paid. |
| Value | Description |
|---|
not_allocated | No stock reserved. |
partially_allocated | Some items reserved. |
allocated | All items reserved in stock. |
| Value | Description |
|---|
amount | Fixed discount amount. |
percentage | Percentage-based discount. |
| Value | Description |
|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |