Query order information
This guide describes how to get orders from the Traide GraphQL API.
Traide has two levels of order:
- A marketplace order (
NauticalOrder) is what the customer placed. Query it withnauticalOrderandnauticalOrders. - A seller order (
Order) is one seller's portion of a marketplace order. Query it withorderandorders. A marketplace order lists its seller orders insubOrders.
Orders are private data, so authenticate as a staff user or an app that can manage orders. See Authentication.
Retrieving a list of orders
To fetch a list of seller orders, run the orders query. The orders field is a paginated collection, see Pagination for more information.
{
orders(first: 2) {
edges {
node {
id
number
created
status
total {
gross {
baseAmount
currency
}
}
}
}
}
}
In this example, for each order, we return:
id: the unique order ID, most operations will require one.number: the order number shown to staff and customers.created: when the order was placed.status: the fulfillment status, for exampleUNFULFILLEDorFULFILLED.total: the order total.baseAmountis in the currency's smallest unit, for example cents for USD.
Filtering
Use the optional filter argument to narrow the results. Some of the available filters:
status: [OrderStatusFilter!]: for exampleUNFULFILLED,PARTIALLY_FULFILLED,FULFILLED,READY_TO_FULFILLorCANCELED.paymentStatus: [PaymentChargeStatusEnum!]: for exampleNOT_CHARGED,FULLY_CHARGEDorFULLY_REFUNDED.customer: String: the customer's name or email address.search: String: search across order fields.created: { gte: Date, lte: Date }: orders placed on or aftergteand on or beforelte.
Here is an example query that fetches the first 3 unfulfilled orders placed since January 1, 2026:
{
orders(
first: 3
filter: { status: [UNFULFILLED], created: { gte: "2026-01-01" } }
) {
edges {
node {
number
created
status
}
}
}
}
Sorting
Sort the results with the sortBy argument. It takes two required fields:
field: one ofNUMBER,CREATION_DATE,UPDATE_DATE,CUSTOMER,PAYMENT,PAYMENT_DATE,FULFILLMENT_STATUS,TOTAL,PO_NUMBERS,EXTERNAL_IDorEXTERNAL_SOURCE.direction:ASCfor ascending orDESCfor descending.
This example lists the newest orders first:
{
orders(first: 2, sortBy: { field: CREATION_DATE, direction: DESC }) {
edges {
node {
number
created
}
}
}
}
Retrieving a single order
To get a single seller order, use the order query with the order's id:
query {
order(id: "T3JkZXI6MTE1") {
id
number
status
paymentStatus
userEmail
seller {
companyName
}
}
}
Retrieving order lines
Each order has lines, one per product variant ordered:
query {
order(id: "T3JkZXI6MTE1") {
number
lines {
id
productName
variantName
productSku
quantity
quantityFulfilled
unitPrice {
gross {
baseAmount
currency
}
}
thumbnail(size: 100) {
url
alt
}
}
}
}
productNameandvariantName: the names at the time of the order.quantityandquantityFulfilled: how many were ordered, and how many have shipped.thumbnail: the line's product image. The optionalsizeargument sets the size in pixels.
Pricing
An order's money fields are TaxedMoney: subtotal, shippingPrice, total, discountedTotal and originalTotal. Each order line has unitPrice and totalPrice.
type TaxedMoney {
currency: String!
net: Money!
gross: Money!
tax: Money!
}
type Money {
currency: String!
baseAmount: BigInt!
}
net is before tax and gross after it; tax is the difference.
Marketplace orders
To see a customer's whole order across sellers, query the marketplace order and its seller orders:
{
nauticalOrders(first: 1, sortBy: { field: CREATION_DATE, direction: DESC }) {
edges {
node {
id
number
status
total {
gross {
baseAmount
currency
}
}
subOrders {
number
status
seller {
companyName
}
}
}
}
}
}