Skip to main content

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": "d1c7962cba7c3d5f411f7101",
"id": "example",
"configRef": "ef63a6c38fa7968725d7ac20",
"created": 1740605122860,
"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": "4ae37c2e4571e2412837b82a",
"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": 1722268826878,
"refundDate": 1741834039947
},
"shipping": {
"status": "example",
"date": 1761664540773,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "f7a7bd89bd5f0416bf72e2a4",
"id": "1a6c450ad7f7e9ba4d9af4ef",
"quantity": 1.23,
"added": 1726383100420,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1746190740066,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
}

Arguments

NameTypeDescription
idString!Order identifier string.
statusStringOrder status to filter by.

Returns

Order