order Query
Description
Retrieves a single order by ID with optional status filter.
query order($id: String!, $status: String) {
order(id: $id, status: $status) {
_id
id
configRef
created
origin
status
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
buyer {
_id
id
firstName
lastName
name
email
telephone
taxNumber
organisation
isSubscribed
}
billing {
status
paymentDate
refundDate
}
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
items {
_id
id
quantity
added
total
unavailable
}
messages {
content
subject
created
fromBuyer
}
paymentUrl
}
}
Variables
{
"id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
"status": "status"
}
Response
{
"order": {
"_id": "862639aaf98476d0e0b39e7d",
"id": "example",
"configRef": "29ae1c152d396feb0d3159ed",
"created": 1710775106653,
"origin": "example",
"status": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"buyer": {
"_id": "55e0188d8dcad0c8980be66e",
"id": 1.23,
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example",
"organisation": "example",
"isSubscribed": true
},
"billing": {
"status": "example",
"paymentDate": 1715533851924,
"refundDate": 1753159087071
},
"shipping": {
"status": "example",
"date": 1705048164772,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "b4754e59635c04076d9a13c5",
"id": "1b8b528db395c5c6ec0891d5",
"quantity": 1.23,
"added": 1711327003217,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1741272078495,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | String! | Order identifier string. |
status | String | Order status to filter by. |