API reference
Rates
Live quotes from every carrier, checkout totals and drop-off locations.
Get rates
POST /v1/rates
Live quotes from every carrier the account can use, cheapest first, with delivery estimates. The response has a quote_id; pass it when you buy so the purchase is linked to the quote. For a shipment that crosses a border, create a customs declaration first and pass customs_declaration_id so carriers can quote duties and international services. Nothing is charged.
Request body
from• Required objectShip-from address.
Fields · 11
city• Required stringCity.
country• Required stringTwo-letter country code, e.g.
CA,US.name• Required stringpostal_code• Required stringPostal or ZIP code.
state• Required stringProvince or state code, e.g.
ON,BC,NY.street• Required stringStreet address.
companystringCompany name.
emailstringEmail address.
is_residentialbooleanTrue for a home address. Some carriers charge more for residential delivery.
line2stringApartment, suite or unit.
phonestringPhone number. Carriers need one for the recipient on most international and express services.
packages• Required array of objectsOne entry per box.
Each item · 6
dimension_unit• Required stringinorcm.height• Required numberHeight, in
dimension_unit.length• Required numberLength, in
dimension_unit.weight• Required numberWeight of the box with its contents, in
weight_unit.weight_unit• Required stringlborkg.width• Required numberWidth, in
dimension_unit.
to• Required objectShip-to address.
Fields · 11
city• Required stringCity.
country• Required stringTwo-letter country code, e.g.
CA,US.name• Required stringpostal_code• Required stringPostal or ZIP code.
state• Required stringProvince or state code, e.g.
ON,BC,NY.street• Required stringStreet address.
companystringCompany name.
emailstringEmail address.
is_residentialbooleanTrue for a home address. Some carriers charge more for residential delivery.
line2stringApartment, suite or unit.
phonestringPhone number. Carriers need one for the recipient on most international and express services.
carriersarray of stringsOnly return rates from these carriers, e.g.
["canada_post"]or["gls", "canpar"]. Codes:canada_post,ups,fedex,purolator,canpar,gls,uniuni,dhl_express. Leave it out for every carrier.currencystringThree-letter currency code, e.g.
CAD.customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.ship_datedateDay the parcel will be handed to the carrier (
YYYY-MM-DD). Leave out for today; up to 7 days ahead.signature_optionstringSignature on delivery:
none,requiredoradult. Carriers charge extra for a signature.
Response in data
items• Required array of objectsEach item · 18
adult_signature_supported• Required booleanFalse when the carrier has no adult signature option;
adultbecomesrequired.amount_cents• Required integerAmount in cents.
carrier• Required stringThe carrier that delivers the parcel, e.g.
canada_post,ups,purolator.carrier_display_name• Required stringThe carrier's name to show, e.g. "Canada Post".
currency• Required stringThree-letter currency code, e.g.
CAD.service_code• Required stringService code, as returned with each rate. Treat it as opaque and send it back unchanged when you buy: it can carry routing details for that exact rate.
service_name• Required stringService name to show to people.
carrier_descriptionstringcarrier_logo_urlstringduties_centsintegerDestination duties and taxes prepaid with this label (DDP), when offered.
estimated_daysintegerEstimated business days in transit.
estimated_deliverytimestampEstimated delivery date and time.
pickup_supportedbooleanFalse when the carrier cannot pick this parcel up: drop it off instead.
promotionbooleanTrue for a discounted promotional rate shown without carrier branding.
published_centsintegerThe carrier's own list price for this service, when the carrier publishes one.
service_descriptionstringservice_logo_urlstringtracking_availablebooleanFalse for a service without tracking.
carriers_with_no_optionsarray of objectsEach item · 3
carrier• Required stringCarrier code, as returned with each rate.
carrier_display_name• Required stringCarrier name to show to people.
reason• Required string
quote_iduuidThe
quote_idfrom thePOST /v1/ratesresponse the chosen rate came from.
curl -X POST "https://api.parcelhub.ca/v1/rates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"carriers": [
"ups"
],
"currency": "CAD",
"from": {
"city": "Toronto",
"company": "Maple Goods Inc.",
"country": "CA",
"email": "[email protected]",
"is_residential": false,
"line2": "Suite 400",
"name": "Alex Martin",
"phone": "+1 416 555 0100",
"postal_code": "M5V 2T6",
"state": "ON",
"street": "123 King St W"
},
"packages": [
{
"dimension_unit": "cm",
"height": 10,
"length": 30,
"weight": 2.5,
"weight_unit": "kg",
"width": 20
}
],
"ship_date": "2026-11-03",
"signature_option": "none",
"to": {
"city": "Toronto",
"company": "Maple Goods Inc.",
"country": "CA",
"email": "[email protected]",
"is_residential": false,
"line2": "Suite 400",
"name": "Alex Martin",
"phone": "+1 416 555 0100",
"postal_code": "M5V 2T6",
"state": "ON",
"street": "123 King St W"
}
}'{
"ok": true,
"data": {
"carriers_with_no_options": [
{
"carrier": "ups",
"carrier_display_name": "UPS",
"reason": "string"
}
],
"items": [
{
"adult_signature_supported": true,
"amount_cents": 1299,
"carrier": "ups",
"carrier_description": "string",
"carrier_display_name": "UPS",
"carrier_logo_url": "https://…",
"currency": "CAD",
"duties_cents": 1299,
"estimated_days": 3,
"estimated_delivery": "2026-10-31T15:04:05Z",
"pickup_supported": true,
"promotion": true,
"published_cents": 1299,
"service_code": "string",
"service_description": "string",
"service_logo_url": "https://…",
"service_name": "UPS Standard",
"tracking_available": true
}
],
"quote_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Find drop-off locations
GET /v1/rates/dropoffs
The nearest carrier drop-off points (post offices, UPS, FedEx, Purolator and other counters) around an address, by carrier, with distance and opening hours where known.
Query parameters
address• Required stringThe address to search around, usually the ship-from address.
carriersstringComma-separated carrier codes, e.g.
canada_post,ups. Leave out for all.radiusKmnumberSearch radius in kilometres.
limitintegerMost results to return.
Response in data
See the example on the right.
curl "https://api.parcelhub.ca/v1/rates/dropoffs?address=123%20King%20St%20W%2C%20Toronto%20ON" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": null,
"request_id": "01JBX7Q2…"
}Quick estimate
POST /v1/rates/quick
A faster, lighter estimate across carriers, for showing a price before all details are known. Use POST /v1/rates before buying. Nothing is charged.
Request body
from• Required objectShip-from address.
Fields · 11
city• Required stringCity.
country• Required stringTwo-letter country code, e.g.
CA,US.name• Required stringpostal_code• Required stringPostal or ZIP code.
state• Required stringProvince or state code, e.g.
ON,BC,NY.street• Required stringStreet address.
companystringCompany name.
emailstringEmail address.
is_residentialbooleanTrue for a home address. Some carriers charge more for residential delivery.
line2stringApartment, suite or unit.
phonestringPhone number. Carriers need one for the recipient on most international and express services.
packages• Required array of objectsOne entry per box.
Each item · 6
dimension_unit• Required stringinorcm.height• Required numberHeight, in
dimension_unit.length• Required numberLength, in
dimension_unit.weight• Required numberWeight of the box with its contents, in
weight_unit.weight_unit• Required stringlborkg.width• Required numberWidth, in
dimension_unit.
to• Required objectShip-to address.
Fields · 11
city• Required stringCity.
country• Required stringTwo-letter country code, e.g.
CA,US.name• Required stringpostal_code• Required stringPostal or ZIP code.
state• Required stringProvince or state code, e.g.
ON,BC,NY.street• Required stringStreet address.
companystringCompany name.
emailstringEmail address.
is_residentialbooleanTrue for a home address. Some carriers charge more for residential delivery.
line2stringApartment, suite or unit.
phonestringPhone number. Carriers need one for the recipient on most international and express services.
carriersarray of stringsOnly return rates from these carriers, e.g.
["canada_post"]or["gls", "canpar"]. Codes:canada_post,ups,fedex,purolator,canpar,gls,uniuni,dhl_express. Leave it out for every carrier.currencystringThree-letter currency code, e.g.
CAD.customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.ship_datedateDay the parcel will be handed to the carrier (
YYYY-MM-DD). Leave out for today; up to 7 days ahead.signature_optionstringSignature on delivery:
none,requiredoradult. Carriers charge extra for a signature.
Response in data
items• Required array of objectsEach item · 18
adult_signature_supported• Required booleanFalse when the carrier has no adult signature option;
adultbecomesrequired.amount_cents• Required integerAmount in cents.
carrier• Required stringThe carrier that delivers the parcel, e.g.
canada_post,ups,purolator.carrier_display_name• Required stringThe carrier's name to show, e.g. "Canada Post".
currency• Required stringThree-letter currency code, e.g.
CAD.service_code• Required stringService code, as returned with each rate. Treat it as opaque and send it back unchanged when you buy: it can carry routing details for that exact rate.
service_name• Required stringService name to show to people.
carrier_descriptionstringcarrier_logo_urlstringduties_centsintegerDestination duties and taxes prepaid with this label (DDP), when offered.
estimated_daysintegerEstimated business days in transit.
estimated_deliverytimestampEstimated delivery date and time.
pickup_supportedbooleanFalse when the carrier cannot pick this parcel up: drop it off instead.
promotionbooleanTrue for a discounted promotional rate shown without carrier branding.
published_centsintegerThe carrier's own list price for this service, when the carrier publishes one.
service_descriptionstringservice_logo_urlstringtracking_availablebooleanFalse for a service without tracking.
carriers_with_no_optionsarray of objectsEach item · 3
carrier• Required stringCarrier code, as returned with each rate.
carrier_display_name• Required stringCarrier name to show to people.
reason• Required string
quote_iduuidThe
quote_idfrom thePOST /v1/ratesresponse the chosen rate came from.
curl -X POST "https://api.parcelhub.ca/v1/rates/quick" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"carriers": [
"ups"
],
"currency": "CAD",
"from": {
"city": "Toronto",
"company": "Maple Goods Inc.",
"country": "CA",
"email": "[email protected]",
"is_residential": false,
"line2": "Suite 400",
"name": "Alex Martin",
"phone": "+1 416 555 0100",
"postal_code": "M5V 2T6",
"state": "ON",
"street": "123 King St W"
},
"packages": [
{
"dimension_unit": "cm",
"height": 10,
"length": 30,
"weight": 2.5,
"weight_unit": "kg",
"width": 20
}
],
"ship_date": "2026-11-03",
"signature_option": "none",
"to": {
"city": "Toronto",
"company": "Maple Goods Inc.",
"country": "CA",
"email": "[email protected]",
"is_residential": false,
"line2": "Suite 400",
"name": "Alex Martin",
"phone": "+1 416 555 0100",
"postal_code": "M5V 2T6",
"state": "ON",
"street": "123 King St W"
}
}'{
"ok": true,
"data": {
"carriers_with_no_options": [
{
"carrier": "ups",
"carrier_display_name": "UPS",
"reason": "string"
}
],
"items": [
{
"adult_signature_supported": true,
"amount_cents": 1299,
"carrier": "ups",
"carrier_description": "string",
"carrier_display_name": "UPS",
"carrier_logo_url": "https://…",
"currency": "CAD",
"duties_cents": 1299,
"estimated_days": 3,
"estimated_delivery": "2026-10-31T15:04:05Z",
"pickup_supported": true,
"promotion": true,
"published_cents": 1299,
"service_code": "string",
"service_description": "string",
"service_logo_url": "https://…",
"service_name": "UPS Standard",
"tracking_available": true
}
],
"quote_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Prepaid duties availability
GET /v1/shipments/duties-availability
Whether prepaid duties and taxes (DDP: the recipient pays nothing on delivery) are offered right now, for US-bound parcels and for other countries.
Response in data
international• Required booleanus• Required boolean
curl "https://api.parcelhub.ca/v1/shipments/duties-availability" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"international": true,
"us": true
},
"request_id": "01JBX7Q2…"
}Checkout total
POST /v1/shipments/price-preview
The exact total for a chosen rate: sales tax for the route, any discount (a code you pass, or the best promotion already claimed on the account) and prepaid duties. Nothing is charged.
Request body
amount_cents• Required integerThe chosen rate's price before tax, in cents.
from_country• Required stringShip-from country code.
to_country• Required stringShip-to country code.
discount_codestringA discount code to apply.
duties_centsintegerThe chosen rate's prepaid duties (
duties_centson the rate), if any.to_statestringDestination province or state: Canadian sales tax follows it.
Response in data
discount_cents• Required integerDiscount applied, in cents.
duties_cents• Required integerDestination duties and taxes prepaid with this label (DDP), when offered.
subtotal_cents• Required integersystem_paid• Required booleantax_cents• Required integerSales tax, in cents.
tax_lines• Required array of objectsEach item · 3
amount_cents• Required integerAmount in cents.
rate_bps• Required integertax_type• Required string
tax_rate_bps• Required integertotal_cents• Required integerTotal, in cents.
tax_regionstring
curl -X POST "https://api.parcelhub.ca/v1/shipments/price-preview" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount_cents": 1299,
"discount_code": "string",
"duties_cents": 1299,
"from_country": "string",
"to_country": "string",
"to_state": "string"
}'{
"ok": true,
"data": {
"discount_cents": 1299,
"duties_cents": 1299,
"subtotal_cents": 1299,
"system_paid": true,
"tax_cents": 1299,
"tax_lines": [
{
"amount_cents": 1299,
"rate_bps": 1,
"tax_type": "string"
}
],
"tax_rate_bps": 1,
"tax_region": "string",
"total_cents": 1299
},
"request_id": "01JBX7Q2…"
}