Skip to content
gist.link ↗

orderShippingRates

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

Live label rates for a paid order from the shipping service: ship-from = fromLocationUuid (a settings ship-from location) or, when omitted, shipping’s default origin (settings default ship-from → first ships_from location → business address); ship-to = the order’s snapshot (plus the matching CRM address uuid when the buyer’s CRM contact has it saved); parcels from the order, filtered to the customer’s chosen carrier unless allCarriers. The rate matching the customer’s carrier + service level is flagged recommended. ADMIN.

shop:query:orderShippingRates

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

type Query {
orderShippingRates(orderId: String!, allCarriers: Boolean, fromLocationUuid: String): OrderShippingRates!
}
Argument Type Required Description
orderId String! Yes —
allCarriers Boolean No —
fromLocationUuid String No —

OrderShippingRates! — 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": "query OrderShippingRates($orderId: String!, $allCarriers: Boolean, $fromLocationUuid: String) { orderShippingRates(orderId: $orderId, allCarriers: $allCarriers, fromLocationUuid: $fromLocationUuid) { shipment_uuid recommended_rate_uuid messages } }",
"variables": {
"orderId": "example",
"allCarriers": true,
"fromLocationUuid": "example"
}
}
JSON