Skip to content
gist.link ↗

cancelOrder

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

Cancel a pending order (payment not yet completed). ADMIN.

shop:mutation:cancelOrder

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

type Mutation {
cancelOrder(orderId: String!): Order!
}
Argument Type Required Description
orderId String! Yes —

Order! — 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": "mutation CancelOrder($orderId: String!) { cancelOrder(orderId: $orderId) { id uuid email currency total status created_at updated_at } }",
"variables": {
"orderId": "example"
}
}
JSON