Skip to content
gist.link ↗

updatePurchaseOrder

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

Update a DRAFT purchase order; lines, when present, REPLACES every line. ROLE_ADMIN or ROLE_PAY_MANAGER.

pay:mutation:updatePurchaseOrder

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 {
updatePurchaseOrder(id: String!, input: PurchaseOrderInput!): PurchaseOrder!
}
Argument Type Required Description
id String! Yes —
input PurchaseOrderInput! Yes —

PurchaseOrder! — 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 UpdatePurchaseOrder($id: String!, $input: PurchaseOrderInput!) { updatePurchaseOrder(id: $id, input: $input) { id uuid status currency total created_at updated_at } }",
"variables": {
"id": "example",
"input": {
"supplier_id": "example",
"currency": "example",
"shop_location_uuid": "example"
}
}
}
JSON