Skip to content
gist.link ↗

updateInvoice

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

Update a DRAFT invoice (line items are replaced wholesale). ROLE_ADMIN or ROLE_PAY_MANAGER.

pay:mutation:updateInvoice

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

type Mutation {
updateInvoice(id: String!, input: UpdateInvoiceInput!): Invoice!
}
Argument Type Required Description
id String! Yes —
input UpdateInvoiceInput! Yes —

Invoice! — 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": "mutation UpdateInvoice($id: String!, $input: UpdateInvoiceInput!) { updateInvoice(id: $id, input: $input) { id uuid status currency total created_at updated_at } }",
"variables": {
"id": "example",
"input": {
"customerId": "example",
"crmCompanyUuid": "01a01234-abcd-7000-9000-0123456789ab",
"crmContactUuid": "01a01234-abcd-7000-9000-0123456789ab"
}
}
}
JSON