TanqoryDocs

tanqoryExtShippingLabelRates

  • Query
  • Inventory and fulfillment

The services a shipping label can be bought with for a fulfillment order, with the same validation (and userErrors codes) as shippingLabelPurchase: the fulfillment order must be fulfillable by shipping and have a destination address, the date must not be in the past, the package dimensions must be positive and the total weight non-zero. totalWeight omitted = the empty package plus the fulfillable lines, as shippingLabelPurchase.

Arguments

ArgumentTypeRequiredDefaultDescription
customsValues[TanqoryExtShippingLabelCustomsValueInput!]Optional

Each line's customs value per unit, in the order's currency, as the label would declare it (omitted lines: the price paid). Quote with the same values the label is bought with.

fulfillmentOrderIdID!Required
insuredAmountDecimalOptional

Quote the services with this shipment value insured, in the order's currency (the price then includes the provider's insurance fee). Omitted = no insurance.

packageInfoPackageInfoInputOptional
shippingDatetimeDateTime!Required
totalWeightWeightInputOptional

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 TanqoryExtShippingLabelRates($fulfillmentOrderId: ID!, $shippingDatetime: DateTime!) {\n  tanqoryExtShippingLabelRates(fulfillmentOrderId: $fulfillmentOrderId, shippingDatetime: $shippingDatetime) {\n    purchasesOpen\n    userErrors {\n      code\n      field\n      message\n    }\n  }\n}","variables":{"fulfillmentOrderId":"gid://tanqory/Type/id","shippingDatetime":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10