Skip to content
gist.link ↗

orders

Query Shop API — POST https://shop.api.gist.link/graphql

Cursor-paginated orders for the caller’s organization. ADMIN.

shop:query:orders

The calling IAM key must hold this permission (or a wildcard that covers it: shop:query:* or shop:*) and the access token must have been minted with audience=shop. See Permissions.

type Query {
orders(filter: OrderFilter, sort: SortInput, first: Int, after: String): OrderConnection!
}
Argument Type Required Description
filter OrderFilter No —
sort SortInput No —
first Int No —
after String No —

OrderConnection! — see the Shop types reference.

Terminal window
curl https://shop.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Orders($filter: OrderFilter, $sort: SortInput, $first: Int, $after: String) { orders(filter: $filter, sort: $sort, first: $first, after: $after) { totalCount edges { cursor node { id uuid email currency total status created_at updated_at } } } }",
"variables": {
"filter": {
"status": "example",
"search": "example"
},
"sort": {
"field": "example"
},
"first": 10,
"after": "cursor"
}
}
JSON