Skip to main content

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": "e8fd2e70d7a60eeb285358a6",
"id": "example",
"configRef": "d8b5c5b36567715d3b694403",
"created": 1740885189782,
"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": "d44bdae6a1def8bf07be968d",
"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": 1752962979547,
"refundDate": 1735608280189
},
"shipping": {
"status": "example",
"date": 1767660497502,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "c640451ae6d9b90ed2a6fe92",
"id": "73efb1d681a21e9169a0f9a5",
"quantity": 1.23,
"added": 1752027888182,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1741399343042,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
]
}

Arguments

NameTypeDescription
pageIntPage number to retrieve.

Returns

[Order!]!