Skip to content
gist.link ↗

purchaseOrders

Query Pay API — POST https://pay.api.gist.link/graphql

Cursor-paginated purchase orders (sort fields: created_at, number, total, expected_at, status). Any org member.

pay:query:purchaseOrders

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

type Query {
purchaseOrders(filter: PurchaseOrderFilter, sort: SortInput, first: Int, after: String): PurchaseOrderConnection!
}
Argument Type Required Description
filter PurchaseOrderFilter No —
sort SortInput No —
first Int No —
after String No —

PurchaseOrderConnection! — see the Pay types reference.

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