Skip to content
gist.link ↗

invoices

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

Cursor-paginated invoices for the caller’s organization. Any org member.

pay:query:invoices

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 {
invoices(filter: InvoiceFilter, sort: SortInput, first: Int, after: String): InvoiceConnection!
}
Argument Type Required Description
filter InvoiceFilter No —
sort SortInput No —
first Int No —
after String No —

InvoiceConnection! — 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 Invoices($filter: InvoiceFilter, $sort: SortInput, $first: Int, $after: String) { invoices(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",
"customerId": "example",
"crmCompanyUuid": "01a01234-abcd-7000-9000-0123456789ab"
},
"sort": {
"field": "example"
},
"first": 10,
"after": "cursor"
}
}
JSON