Skip to main content

POST /rate

Create a rate request, fetch carrier rates synchronously, and return sanitized rate responses. By default all quoted carriers are returned; use shippingType to narrow which quotes are returned.

Scope: shipments:rate

Request body

Validated by the apiRateRequest request schema.

Required top-level fields

FieldTypeDescription
shippingOptionsobjectShipment options (see below)
shipperobjectOrigin address
recipientobjectDestination address
packagesobjectPackage details

shippingOptions (required)

FieldRequiredTypeNotes
shippingDateYesstringISO date, e.g. 2026-05-25 or 2026-05-25T14:00:00
shippingDateTimezoneNostringTimezone for shipping date
referencesNoobjectcustomer, order, invoice strings
insuranceNoobjectamount (number), currency (3-letter)
signatureNostringnone, required, adult
nonConveyableNoboolean
createReturnLabelNoboolean
saturdayDeliveryNoboolean
packingSlipTypeNostring
deliveryInstructionsNostring

Address (shipper / recipient)

FieldRequiredTypeNotes
personNameYesstring
addressLine1Yesstring
countryCodeYesstring2-letter ISO
provinceCodeNostring2–4 chars
companyName, phoneNumber, emailAddressNostring
addressLine2, city, provinceName, postalCodeNostring
residentialNoboolean
timezone, canadaPostId, idNostring
typeNostringshipping, broker, buyer

Nested objects use additionalProperties: false where defined in the schema.

packages (required)

FieldRequiredTypeNotes
unitOfMeasureYesstringimperial or metric
piecesYesarrayMin 1 piece

Each piece:

FieldRequiredType
quantityYesnumber (≥ 1)
weightYesnumber (≥ 0)
lengthYesnumber (≥ 0)
widthYesnumber (≥ 0)
heightYesnumber (≥ 0)
packagingTypeConditionalstring or object
itemCountNonumber
packagingType (per piece)

Describes the package type for carrier rating. Other carriers may ignore this field; FedEx requires it when the request can include FedEx quotes.

The public API accepts packagingType as a string or a full object. Strings are resolved to objects before schema validation (see String references below). After resolution, the same validation rules apply as for an inline object.

When required

packagingType must be present on every piece when shippingType is omitted or when shippingType.carrier is one of:

shippingType.carrierFedEx quoted?packagingType required?
(omit)Yes (default all)Yes
allYesYes
cheapestYesYes
fastestYesYes
federal-expressYesYes
{other carrier}NoNo

Validation error example: packages.pieces[0].packagingType is required for FedEx.

String references

Send packagingType as a string on the rate request; the API hydrates it before validation:

String valueInterpretationLookup
Packaging type code (e.g. GENERIC_BOX, FEDEX_PAK, CP_BOX_MEDIUM)Catalog / carrier default typeMatch code in default packaging types (GET /packaging-types entries that are not company Generic boxes)
UUID (e.g. e2aa23cd-b3cb-40fd-88d2-0c96c6b586c0)Company custom boxMatch id; must belong to your organization and have categoryName "Generic" (or be a shared default type with no companyId)

Unknown code or id → 400 packagingType not found: {reference}.

Use GET /packaging-types to discover available code and id values.

Object shape (inline or after resolution)

FieldRequiredTypeNotes
codeYesstringPackaging type code (see FedEx codes below)
isEnvelopeNobooleantrue for document/envelope shipments
nameNostringDisplay name (not sent to FedEx)
idNostringPackaging-type UUID

FedEx mapping

FedEx derives a single shipment-level packaging type from all pieces. Every piece in the shipment must use the same packaging category for specialized FedEx types (envelope, pak, box, tube); mixed types fall back to YOUR_PACKAGING (customer-supplied dimensions).

packagingType.codeFedEx API valueNotes
(any with isEnvelope: true)FEDEX_ENVELOPEOnly when total piece count is 1 (quantity summed across pieces). Dimensions are omitted; weight is normalized to 1 lb / 0.5 kg.
FEDEX_PAKFEDEX_PAKAlso accepts PUROLATOR_EXPRESS_PAK, UPS_PAD_PAK, UPS_PAK when all pieces use one of these codes
FEDEX_SMALL_BOXFEDEX_BOXAll pieces must share this code
FEDEX_MEDIUM_BOXFEDEX_BOXAll pieces must share this code
FEDEX_LARGE_BOXFEDEX_BOXAll pieces must share this code
FEDEX_EXTRA_LARGE_BOXFEDEX_BOXAll pieces must share this code
FEDEX_TUBEFEDEX_TUBEAll pieces must share this code
Any other code (e.g. GENERIC_BOX)YOUR_PACKAGINGUses length, width, height, and weight from each piece

Practical notes

  • Call GET /packaging-types for the full catalog. Use a code string for carrier/catalog types; use the id string for company custom boxes (categoryName "Generic").
  • GENERIC_BOX as a code resolves to the system default generic box. Custom company boxes share the GENERIC_BOX code but are referenced by id.
  • For multi-piece shipments with FedEx-branded boxes or tubes, send the same packagingType (code or resolved object) on each piece.
  • When quoting only a non-FedEx carrier (e.g. { "shippingType": { "carrier": "canada-post" } }), packagingType may be omitted.

Optional top-level fields

All optional blocks are defined in the apiRateRequest schema. The public API validates the body against that schema and passes each block through to carrier rating.

Unless noted, fields are passed through to every carrier that is quoted for the organization. Carriers ignore blocks they do not implement. Parcel examples below use FedEx and UPS Parcel.

FieldRequired forPrimary use
internationalOptionsCross-border customs/dutiesCustoms clearance, duties payer, documents-only, declared value
freightOptionsLTL/freight carriersAppointments, tailgate, two-person, after-hours (not parcel carriers)
commercialInvoiceInternational goods (non-documents)Line items, HS codes, customs value for rating/shipping/labels
buyerSome international / CI flowsSold-to / buyer address (FedEx soldTo)
brokerImport broker selectionCustoms broker (FedEx BROKER_SELECT_OPTION)
shippingNotificationOptionsEmail on transit updatesStored on quotation; UPS ship notification + tracker emails
billingOptionsThird-party billingRestrict which carrier accounts are quoted; third-party ship at label time
shippingTypeControlling quote results (public API)Filter bulk-rates output (default { "carrier": "all" })
sortOrdering multiple ratesControl rates[] order when multiple quotations are returned

internationalOptions

Customs and cross-border options. Most carriers only read this object when it is non-empty (FedEx builds customsClearanceDetail only if Object.keys(internationalOptions).length > 0). For international parcel rating you typically send internationalOptions together with commercialInvoice (goods) or documentsOnly: true (documents).

FieldTypeSchemaFedExUPS Parcel (rate / ship)Other carriers
documentsOnlybooleanoptionalisDocumentOnly; commodities use fixed “Corporate Correspondence” linesRate: DocumentsOnlyIndicator + placeholder InvoiceLineTotal; ship: same + skips full commercial invoice forms
declaredValueobjectoptionalNot mapped directly on rate (see commercialInvoice / package declared value)Rate & ship: InvoiceLineTotal (value + currency) when set; overrides documents-only total
declaredValue.valuenumberrequired if declaredValue presentMonetary value for invoice line total
declaredValue.currencystring3-letter, required if declaredValue presentISO currency on InvoiceLineTotal
billDutyTostringsender | recipient | thirdPartyRate: duties payment SENDER when any intl options exist. Ship/validate: SENDER, RECIPIENT, or THIRD_PARTY (+ optional account)Not mapped on UPS rate/ship in current codeDHL, Purolator Express, FedEx Freight (export purpose), etc.
dutyAccountNumberstringoptionalRequired for meaningful THIRD_PARTY duties payor on ship
recipientTaxIdstringoptionalNot referenced in carrier mappers today; stored on rate request
senderIsProducerbooleanoptionalNot referenced in carrier mappers today
businessRelationshipstringrelated | unrelatedNot referenced in FedEx mappersPurolator Express, DHL Express, FedEx Freight
exportTypestringpermanent | return | repair | returnRepairNot referenced in FedEx parcel mappersPurolator Express, DHL, FedEx Freight, generic CI PDF
brokerRequiredbooleanoptionalNot referenced in FedEx parcel mappersDay & Ross Freight REST
commercialInvoiceRequiredbooleanoptionalNot referenced in carrier mappers today
postShipmentDocumentUploadbooleanoptionalShip/validate: ELECTRONIC_TRADE_DOCUMENTS / post-upload ETD
requestEstimatedDutiesAndTaxesbooleanoptionalAdds FedEx edtRequestType: "ALL" on rate/ship customs block

Practical notes

  • International vs domestic: UPS treats signature differently for international (shipment-level DeliveryConfirmation) vs domestic (package-level DeliveryConfirmation); see shippingOptions.signature and UPS signature / packages mappers.
  • billDutyTo at rate time (FedEx): With any internationalOptions keys present, FedEx rate uses duties paymentType: "SENDER" regardless of billDutyTo; full duty billing follows on ship/validate.
  • Schema: internationalOptions has additionalProperties: false — only the fields above are accepted by the public API.

freightOptions

LTL and freight carrier accessorials. Ignored by FedEx Parcel and UPS Parcel (those carriers error on shippingOptions.nonConveyable but do not read freightOptions). Used by freight carriers such as FedEx Freight, GLS Freight, Purolator Freight, Day & Ross, Day & Ross REST.

FieldTypeValues / shapeCarrier usage
appointmentstringfree textDelivery appointment note / call-before-delivery (e.g. FedEx Freight CALL_BEFORE_DELIVERY, GLS/Purolator BOL text)
prebookedAppointmentobjectappointmentDate, appointmentTime (required)Scheduled delivery window (FedEx Freight, GLS Freight, Day & Ross)
pickupAppointmentobjectappointmentDate, appointmentTime (required)Pickup window (Day & Ross / Day & Ross REST)
tailgatestringpickup | delivery | bothLiftgate accessorials on rate/ship/BOL
twoPersonsstringpickup | delivery | bothTwo-person handling (Purolator Freight BOL, etc.)
afterHoursstringpickup | delivery | bothAfter-hours pickup/delivery flags on labels/BOL

Practical notes

  • Quote freight services only when the organization’s pricing plans include freight carriers; parcel-only requests can omit freightOptions.
  • appointment is often combined with shippingOptions.deliveryInstructions on label/BOL output.

commercialInvoice

Commercial invoice / customs line-item data. Schema requires at least one invoiceItems entry when the object is present. Item-level template flags (selectedTemplateId, shouldSaveAsTemplate, shouldUpdateTemplate) are accepted by validation but are not used by the public API.

FieldTypeSchemaFedExUPS ParcelNotes
generalNotestring | nullmax 255Stripped before ratingUI/note only for public API pipeline
customsValuenumber≥ 0Mapped via totalCustomsValue when object presentShip: part of intl value logic when no declaredValueTotal customs value
currencystring3-letterCommodity / customs currencyInvoice forms default CADRequired for meaningful intl quotes
unitOfMeasurestringimperial | metricCommodity weight unitsInvoice product weight LBS/KGSShould align with packages.unitOfMeasure
buyerRequiredbooleanoptionalNot referenced in FedEx parcel mappersAccepted by schema; not used by the public API
invoiceItemsarraymin 1 if object presentcommodities (all items on rate/ship; first item only on validate)Ship only: InternationalForms / Product list (rate does not send full CI)See line item table below

invoiceItems[] line

FieldRequiredFedEx commodityUPS ship (InternationalForms)
descriptionYesname, descriptionDescription
quantityYesquantityUnit.Number
valueYesunitPrice, customsValue (× qty)Unit.Value
weightYesweight per lineProductWeight
hsCodeNoharmonizedCodeCommodityCode if non-empty
countryOfManufactureNocountryOfManufactureOriginCountryCode
unitOfMeasureNo

Practical notes

  • Documents-only: Set internationalOptions.documentsOnly: true; FedEx synthesizes commodity lines; UPS uses documents indicator — commercialInvoice is usually omitted.
  • Public API vs internal app: The public schema does not include extra commercial-invoice fields some carriers use internally on ship (e.g. UPS invoiceNumber, incoterm, freightCharges). Those are rejected by apiRateRequest validation (additionalProperties: false on commercialInvoice).
  • Rate vs ship (UPS): Full InternationalForms are built at ship time from commercialInvoice; rate uses totals / declaredValue / documentsOnly only.

buyer

Optional party address (same field shape as shipper / recipient in schema: personName, addressLine1, countryCode, etc.; type may be shipping, broker, or buyer).

CarrierUsage
FedExsoldTo on the shipment via buyer address on rate, ship, and validate
UPS ParcelNot mapped to a dedicated buyer block; UPS ship InternationalForms SoldTo uses recipient contact today
OthersPassed through on rate request; carrier-specific

Send when FedEx or customs workflows require a distinct sold-to/importer distinct from recipient.


broker

Optional customs broker address (same address shape as buyer).

CarrierUsage
FedExcustomsClearanceDetail.brokers (IMPORT broker from broker address); enables BROKER_SELECT_OPTION in shipmentSpecialServices when broker is non-empty
UPS ParcelNot mapped in current UPS parcel code
Day & Ross Freight RESTinternationalOptions.brokerRequired controls broker behavior (not the broker address block alone)

shippingNotificationOptions

Email notifications tied to the quotation. Applied asynchronously when shipment status changes (not during the synchronous rate call).

FieldTypeSchemaBehavior
shippingNotificationStatusesstring[]pending, intransit, delivered, cancelledUPS ship: when array includes intransit and email is set, adds UPS Notification on shipment create
shippingNotificationEmailstringemailWhen status becomes intransit and email is set, sends a status email

Practical notes

  • Only intransit is wired end-to-end today for UPS ship + tracker emails.
  • unsubscribe is not in the public API schema (additionalProperties: false on this object).

billingOptions

Not defined in apiRateRequest schema but allowed at the root of the JSON body (root schema has no additionalProperties: false).

FieldTypeWhen used
typestring"thirdParty" triggers third-party billing flow
thirdPartyShipperNumberstringBill-to account number; must pass organization blacklist rules
carrierCodestringWith type: "thirdParty", limits quoting to that carrier’s pricing plans
soldToobject (address)UPS ship only: maps to UPS SoldTo (not validated by apiRateRequest)

Practical notes

  • Third-party rates are flagged when type === "thirdParty" and thirdPartyShipperNumber is set.
  • Ship uses stored billingOptions from the rate request (public API ship does not accept billing in the body; org must be account billing).
  • Blacklisted third-party accounts return 400 from rate validation when not allowed.

shippingType

Controls which quote(s) the public API returns after rating. Default when omitted: { "carrier": "all" } (every successful carrier quote).

carrier valueserviceResult
(omit)Treated as { "carrier": "all" }
allignoredArray of all carrier rates
cheapestignoredSingle cheapest rate (by lowest total price)
fastestignoredSingle rate with earliest commitment date/time
{carrierCode}omittedCheapest rate for that carrier only (e.g. federal-express, ups-parcel)
any{serviceCode}First rate whose service.code matches service (case-insensitive) across all carriers
{carrierCode}{serviceCode}If service is set, selection is by service code only (the carrier filter is not applied)

Valid carrier codes for filtering include those returned by GET /carriers (e.g. federal-express, ups-parcel, purolator-express, canada-post, dhl-express, canpar-express, day-ross-freight, nationex, purolator-freight, gls-parcel, gls-freight). Use GET /carrier-services for service codes.

Example — all carriers (default):

{ "shippingType": { "carrier": "all" } }

Example — cheapest FedEx service only:

{ "shippingType": { "carrier": "federal-express" } }

Example — one service by code (any carrier that returns it):

{ "shippingType": { "carrier": "ups-parcel", "service": "11" } }

Practical notes

  • shippingType affects which quotes are returned in the synchronous rate response; it does not change per-carrier request mapping.
  • Internal UI/Workato may use richer shippingType shapes (third_party, account_number); those are outside apiRateRequest and are not validated on the public API unless present as extra root properties.

sort

Optional. When shippingType.carrier is "all" (the default) and multiple carrier quotations are returned, rates[] is sorted server-side before the response is sent.

Omit sort entirely to use the default: { "by": "price", "dir": "asc" } (cheapest discounted total first).

Shape:

"sort": {
"by": "price",
"dir": "asc"
}
FieldRequiredValuesDefault
byYes, when sort is providedprice, date, valueprice (when sort is omitted)
dirNoasc, descasc (when by is set)

Invalid by or dir values return 400.

What by means

bySorts byascdesc
priceDiscounted total (rate.totals.discounted.total.amount)Cheapest firstMost expensive first
dateDelivery commitment (commitment.commitDate + commitment.commitTime)Earliest firstLatest first
valueSavings ratio (retailTotal - discountedTotal) / retailTotal (computed server-side)Smallest savings % firstLargest savings % first

Rates without a commitment are placed at the end when sorting by date.

Sorting applies only when two or more rates are returned; a single rate is unchanged.

Example — fastest delivery first:

"sort": { "by": "date", "dir": "asc" }

Example — best relative deal first:

"sort": { "by": "value", "dir": "desc" }

dir may be omitted; it defaults to asc when by is set.


Not optional, but often used together with the fields above:

FieldFedEx parcelUPS parcel
insurancetotalDeclaredValue + per-package declared valuePer-package DeclaredValue (amount split by piece count)
signatureSIGNATURE_OPTION / DIRECT / ADULT / NO_SIGNATURE_REQUIREDDomestic: package DeliveryConfirmation; international: shipment-level (see internationalOptions)
saturdayDeliveryApplied when rated service includes SATURDAY_DELIVERY surcharge
createReturnLabelShip/validate only (not rate): return shipment services
nonConveyableRejected at FedEx/UPS rate prepareRejected at UPS/FedEx rate prepare
references, deliveryInstructions, etc.References on ship; delivery instructions on recipient addressShip references / delivery instructions

Example request

{
"shippingOptions": {
"shippingDate": "2026-05-25"
},
"shipper": {
"personName": "Jane Shipper",
"addressLine1": "100 Main St",
"city": "Montreal",
"provinceCode": "QC",
"postalCode": "H2X 1Y4",
"countryCode": "CA",
"phoneNumber": "5145550100"
},
"recipient": {
"personName": "John Recipient",
"addressLine1": "200 King St W",
"city": "Toronto",
"provinceCode": "ON",
"postalCode": "M5H 1J1",
"countryCode": "CA",
"phoneNumber": "4165550200"
},
"packages": {
"unitOfMeasure": "imperial",
"pieces": [
{
"quantity": 1,
"weight": 5,
"length": 10,
"width": 8,
"height": 6,
"packagingType": "GENERIC_BOX"
}
]
}
}

packagingType is included because the default shippingType (all) quotes FedEx. Omit it only when limiting the request to a single non-FedEx carrier.

Example — company custom box by id:

{
"shippingOptions": {
"shippingDate": "2026-05-25"
},
"shipper": {
"personName": "Jane Shipper",
"addressLine1": "100 Main St",
"city": "Montreal",
"provinceCode": "QC",
"postalCode": "H2X 1Y4",
"countryCode": "CA",
"phoneNumber": "5145550100"
},
"recipient": {
"personName": "John Recipient",
"addressLine1": "200 King St W",
"city": "Toronto",
"provinceCode": "ON",
"postalCode": "M5H 1J1",
"countryCode": "CA",
"phoneNumber": "4165550200"
},
"packages": {
"unitOfMeasure": "metric",
"pieces": [
{
"quantity": 1,
"weight": 2,
"length": 2,
"width": 2,
"height": 2,
"packagingType": "e2aa23cd-b3cb-40fd-88d2-0c96c6b586c0"
}
]
}
}

Use the id from GET /packaging-types for a categoryName "Generic" entry.

Example — FedEx pak only:

{
"shippingOptions": {
"shippingDate": "2026-05-25"
},
"shippingType": {
"carrier": "federal-express"
},
"shipper": {
"personName": "Jane Shipper",
"addressLine1": "100 Main St",
"city": "Montreal",
"provinceCode": "QC",
"postalCode": "H2X 1Y4",
"countryCode": "CA",
"phoneNumber": "5145550100"
},
"recipient": {
"personName": "John Recipient",
"addressLine1": "200 King St W",
"city": "Toronto",
"provinceCode": "ON",
"postalCode": "M5H 1J1",
"countryCode": "CA",
"phoneNumber": "4165550200"
},
"packages": {
"unitOfMeasure": "imperial",
"pieces": [
{
"quantity": 1,
"weight": 2,
"length": 12,
"width": 9,
"height": 1,
"packagingType": "FEDEX_PAK"
}
]
}
}

Example — inline object (unchanged):

"packagingType": {
"code": "GENERIC_BOX",
"isEnvelope": false
}

Success response (200)

Each item in rates is a sanitized rate record with non-public fields removed (see Rate response shape below). Example:

{
"data": {
"requestId": "uuid-rate-request-id",
"rates": [
{
"carrier": {
"code": "ups-parcel",
"fullName": { "en": "UPS Parcel" },
"shortName": { "en": "UPS Parcel" }
},
"service": {
"code": "CA-01",
"fullName": { "en": "UPS Express", "fr": "UPS Express" },
"shortName": { "en": "Express", "fr": "Express" },
"billingCode": "",
"chips": [],
"isDisabled": false
},
"commitment": {
"commitDate": "2026-06-03",
"commitTime": "10:30",
"timezoneCode": "UTC",
"guaranteed": true
},
"rate": {
"charges": [
{
"code": "BasePrice",
"type": "base",
"name": { "en": "Base Rate" },
"retail": { "amount": 56, "currency": "CAD" },
"account": { "amount": 55.44, "currency": "CAD" }
}
],
"totals": {
"retail": {
"subtotal": { "amount": 76.3, "currency": "CAD" },
"tax": { "amount": 2.83, "currency": "CAD" },
"total": { "amount": 79.13, "currency": "CAD" }
},
"discounted": {
"subtotal": { "amount": 72.0, "currency": "CAD" },
"tax": { "amount": 2.7, "currency": "CAD" },
"total": { "amount": 74.7, "currency": "CAD" }
},
"account": {
"subtotal": { "amount": 75.54, "currency": "CAD" },
"tax": { "amount": 2.8, "currency": "CAD" },
"total": { "amount": 78.34, "currency": "CAD" }
}
},
"fxRate": 1
},
"rateRequestId": "uuid-rate-request-id",
"rateResponseId": "uuid-use-for-ship",
"entityType": "rateResponse",
"createdDate": "2026-06-01T17:07:54.862Z",
"isBestPrice": true,
"isBestChoice": false,
"isFastDelivery": false
}
]
}
}

Notes:

  • rates is built from the rating response. By default (no shippingType in the request) the public API quotes with { "carrier": "all" } and returns every quoted rate, each with its own rateResponseId. Send { "shippingType": { "carrier": "cheapest" } } to get a single cheapest rate only.
  • When multiple rates are returned, rates[] is sorted server-side before the response (default: cheapest discounted total first). With default sort, rates[0] is the cheapest option when multiple carriers quote. Use optional sort to change ordering (see above).
  • Each rate includes boolean badge flags (isBestPrice, isBestChoice, isFastDelivery) as display hints. Badges are computed independently of the active sort and do not reorder the list.
  • rateResponseId from the chosen rate is required for Ship.
  • Tracking links are returned on Ship (metadata.trackingUrl), not on rate items.

Badge flags

When one or more rates are returned, each rate includes:

FieldRuleRelated sort.by
isBestPriceLowest rate.totals.discounted.total.amount among returned ratesprice
isBestChoiceHighest discount ratio (retail - discounted) / retailvalue
isFastDeliveryEarliest commitment.commitDate + commitment.commitTimedate

Rate response shape

The public API returns a subset of the full rate response document.

AreaRemoved from public APIKept
Top-levelcarrierAccount (includes credentials such as oauthToken), pk, sk, isThirdParty, and other non-public fieldscarrier, service, commitment, rate, rateRequestId, rateResponseId, entityType, createdDate, isBestPrice, isBestChoice, isFastDelivery
rate.charges[]margin, discounted, percentagechips, code, billingCode, name, type, retail, account
rate.totalsretail, discounted, and account tiers (subtotal, tax, total each with amount + currency)
ratefxRate

The discounted tier is the customer-facing price used for default sort and badge computation. Account is the negotiated carrier price. Margin details are not exposed.

Error responses

HTTPCondition
400Validation failed (schema messages joined with ; ), invalid sort.by / sort.dir, unknown packagingType code/id, or organization has no userId
401Missing/invalid/expired API key, wrong integration type
403Missing shipments:rate scope
422No rates returned for the shipment (NO_RATES)
500Internal error