TanqoryDocs

tanqoryExtShippingRateQuote

  • Query
  • Inventory and fulfillment

The services a shipping label could be bought with for a parcel that is not an order yet (the shipping rate calculator), from the same label provider as shippingLabelPurchase: from originLocationId (an active location of the store, its address and the store as sender), to destination, in packageId (omitted = the store's default package; a store without packages is quoted in the provider's standard box), at weight (the packed parcel's total weight), in the store's currency, shipped today. Nothing is stored. userErrors use the shippingLabelPurchase codes: NOT_FOUND (originLocationId is not an active location of this store, or packageId is not a package of this store), INVALID_PACKAGE_DIMENSIONS (the package has a dimension that is not greater than zero), TOTAL_WEIGHT_ZERO, RATES_NOT_FOUND (the provider offers no service for this parcel, field destination).

Arguments

ArgumentTypeRequiredDefault
destinationTanqoryExtShippingRateQuoteAddressInput!Required
originLocationIdID!Required
packageIdIDOptional
weightWeightInput!Required

Returns

TanqoryExtShippingLabelRates! The shipping services offered for one label, or why none can be offered.

FieldTypeDescription
noRatesReasonTanqoryExtShippingLabelNoRatesReason

What the carrier said when it offered no service (with RATES_NOT_FOUND), so the merchant knows what to fix. Null when services are offered, when the input was refused before the carrier was asked, or when the carrier gave no reason.

purchasesOpenBoolean!

Whether a label can be bought here now. False on a deployment that takes real money while its label carrier is still a practice one (a sandbox or test environment): the rates are shown, and shippingLabelPurchase answers TANQORY_EXT_LABELS_NOT_OPEN.

rates[TanqoryExtShippingLabelRate!]!

The services, in the provider's order (the first is the default selection of shippingLabelPurchase).

userErrors[ShippingLabelPurchaseUserError!]!

Why no rate can be offered (the shippingLabelPurchase codes).

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
  -H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"query TanqoryExtShippingRateQuote($destination: TanqoryExtShippingRateQuoteAddressInput!, $originLocationId: ID!, $weight: WeightInput!) {\n  tanqoryExtShippingRateQuote(destination: $destination, originLocationId: $originLocationId, weight: $weight) {\n    purchasesOpen\n    userErrors {\n      code\n      field\n      message\n    }\n  }\n}","variables":{"destination":{"countryCode":"AC"},"originLocationId":"gid://tanqory/Type/id","weight":{"unit":"GRAMS","value":1}}}'

Built from commit c0b3fb3fdef7 · API version 2026-10