Access sales orders, line items, allocation status, and shipping progress.
GraphQL
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
}
}
}
GraphQL
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 idInt Unique identifier. labelString Order number. statusOrderStatus Global workflow status. notesString Public notes for the PDF. internal_notesString Private office notes. total_unitsFloat Calculated sum of all items quantity. total_units_aggregateFloat Sum of units for filtered results. update_on_handBoolean True if this order impacts on-hand stock. update_stockBoolean True if this order updates stock levels. available_for_shippingBoolean True if items are in stock and ready to ship. dated_atDate Sales order date. created_atDate Creation date. shipping_atDate Estimated shipping date. location_labelString Origin warehouse name. need_reorderBoolean True if stock is insufficient to fulfill. shipping_statusShippingStatus Progress of shipping orders. delivery_statusDeliveryStatus Progress of actual delivery. return_statusReturnStatus Progress of associated returns. stock_allocation_statusStockAllocationStatus Stock reservation status. billing_statusBillingStatus Progress of associated invoices. payment_statusPaymentStatus Overall payment progress. committed_quantityFloat Quantity assigned to this order. uncommitted_quantityFloat Quantity pending assignment. reserved_quantityFloat Quantity reserved in inventory. shipped_quantityFloat Quantity documented in shipping orders. delivered_quantityFloat Quantity actually out of stock. returned_quantityFloat Quantity returned by customer. unreturned_quantityFloat Quantity remaining to be returned. billed_quantityFloat Quantity included in invoices. unbilled_quantityFloat Quantity still pending billing. paid_quantityFloat Quantity already paid for. unpaid_quantityFloat Quantity still pending payment. billed_amountFloat Value already invoiced. unbilled_amountFloat Value still pending invoice. paid_amountFloat Value already paid. unpaid_amountFloat Value still pending payment. exchange_rateFloat Currency exchange rate. tax_typeTaxType "Exclusive" or "Inclusive". subtotalFloat Net amount before taxes. total_without_taxFloat Total excluding tax. total_ecotaxFloat Specific environmental tax sum. totalFloat Final order total. external_referenceString External system reference. for_the_attention_ofString Recipient contact name. sourceString Origin of the order (e.g. "B2B Store"). default_discountFloat Global discount value. discount_typeDiscountType "percentage" or "amount". customerCustomer Associated customer. currencyCurrency Order currency. price_levelPriceLevel Applied price level. account_representativeAccountRepresentative Linked sales rep. seasonSeason Commercial season. payment_informationPaymentInformation Bank details for payment. billing_addressAddress Order billing address. shipping_addressAddress Documented delivery address. line_items[LineItemOrder] List of products ordered. total_taxes[DocumentTaxRate] List of taxes applied. estimates_countInt Number of source estimates. estimates[Estimate] Linked estimates history. invoices_countInt Number of linked invoices. invoices[Invoice] Associated invoices. shipping_orders_countInt Number of linked deliveries. shipping_orders[ShippingOrder] Linked shipping documents. product_returns_countInt 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_countInt Number of linked drop-shippings/purchases. purchases[Purchase] Procurement links. stock_adjustments_countInt Number of linked adjustments. stock_adjustments[StockAdjustment] Associated stock movements. email_histories[EmailHistory] Communication logs. files[File] Attachments. pdf_templatePdfTemplate Design used for PDF generation. has_batch_numbersBoolean True if order items use batch tracking. tracking_completedBoolean True if all tracking requirements are met. total_unitsFloat Total number of units in the order. total_weightDocumentWeight Total weight with unit (e.g. 12.5 kg). 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 idGroup by internal ID. yearGroup by year of dated_at. monthGroup by month of dated_at. dayGroup by day of dated_at.
Field Type Description amountFloat Numeric weight value. unitString Weight unit (e.g. kg, lb).
Value Description unpublishedDraft status (hidden). pending_validationAwaiting approval. activeConfirmed and in progress. completedOrder fully fulfilled and closed. archivedMoved to history. cancelledDocument voided.
Value Description not_shippedNo shipping order created. partially_shippedOne or more shipping orders created. shippedAll items included in shipping orders.
Value Description not_deliveredStock not yet adjusted for delivery. partially_deliveredSome items out of stock. deliveredAll items marked as delivered.
Value Description not_billedNo invoice generated. partially_billedPartial invoices created. fully_billedTotal value reached in invoices.
Value Description unpaidNo payment recorded yet. partially_paidPartial payment received. paidTotal value fully paid.
Value Description not_allocatedNo stock reserved. partially_allocatedSome items reserved. allocatedAll items reserved in stock.
Value Description amountFixed discount amount. percentagePercentage-based discount.
Value Description exclusiveTax calculated on top of the net price. inclusiveTax included in the displayed price.