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 (see below).

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)
packagingTypeNoobject
itemCountNonumber

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 (federal-express / mapRequest) and UPS Parcel (ups-parcel / rate/prepareRequest, ship/prepareRequest).

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" })

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).

FieldTypeSchemaFedEx (mapRequest / customs)UPS 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 rate workerUI/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: The public schema does not include extra commercial-invoice fields supported elsewhere (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 requestedShipment via mapAddress(..., "buyer") 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
shippingNotificationEmailstringemailTracker: when 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 org blacklist rules unless featureFlags.allowBlacklistedThirdPartyBillingAccounts
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 in FedEx/UPS/DHL/etc. processResponse 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: federal-express, ups-parcel, purolator-express, canada-post, dhl-express, dhl-express-rest, canpar-express, day-ross-commerce, day-ross-freight, nationex, purolator-freight, gls-parcel, gls-freight, eshipper.

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.
  • Other shippingType shapes (third_party, account_number) are outside apiRateRequest and are not validated on the public API unless present as extra root properties.

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
}
]
}
}

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" }
},
"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"
}
]
}
}

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.
  • rateResponseId from the chosen rate is required for Ship.

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
rate.charges[]margin, discounted, percentagechips, code, billingCode, name, type, retail, account
rate.totalsdiscounted tierretail and account tiers only (subtotal, tax, total each with amount + currency)
ratefxRate

Pricing shown to integrators is retail (list) and account (negotiated) only; margin details are not exposed.

Error responses

HTTPCondition
400Validation failed (schema messages joined with ; ), 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