orders Query
Description
Retrieves a paginated list of orders for the current user.
query orders($page: Int) {
orders(page: $page) {
_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
{
"page": 1
}
Response
{
"orders": [
{
"_id": "203586dd8e586f65d35764e4",
"id": "example",
"configRef": "7c4f82434fbcb9b27ea3138f",
"created": 1713251884835,
"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": "c3dc52e204eb1654ffad0a1d",
"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": 1754020932648,
"refundDate": 1714455264327
},
"shipping": {
"status": "example",
"date": 1739428346783,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "e8b143648d3af3161989d5d5",
"id": "56628e99dfc29877e610d867",
"quantity": 1.23,
"added": 1708109451132,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1755158073109,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
]
}
Arguments
| Name | Type | Description |
|---|---|---|
page | Int | Page number to retrieve. |
Returns
[Order!]!