Skip to content
gist.link ↗

buyShippingLabel

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

Buy a shipping label (shipping purchaseLabel) for a rate from orderShippingRates and record it as a fulfillment (carrier, tracking, label). Order status -> fulfilled. ADMIN.

shop:mutation:buyShippingLabel

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 {
buyShippingLabel(orderId: String!, input: BuyShippingLabelInput!): Order!
}
Argument Type Required Description
orderId String! Yes —
input BuyShippingLabelInput! 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 BuyShippingLabel($orderId: String!, $input: BuyShippingLabelInput!) { buyShippingLabel(orderId: $orderId, input: $input) { id uuid email currency total status created_at updated_at } }",
"variables": {
"orderId": "example",
"input": {
"rateUuid": "example"
}
}
}
JSON