API reference
Drafts
Shipments saved without buying, including orders imported from stores and files.
Check for imported orders
POST /v1/imports/lookup
Which of the given order ids this account has already imported, so an import can skip them.
Request body
order_ids• Required array of stringsOrder ids to check.
Response in data
items• Required array of objectsEach item · 8
imported_at• Required timestamporder_id• Required stringstatus• Required stringdraft_iduuidshipment_iduuidsourcestringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.stepstringtracking_numberstringThe carrier's tracking number.
curl -X POST "https://api.parcelhub.ca/v1/imports/lookup" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"order_ids": [
"3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
]
}'{
"ok": true,
"data": {
"items": [
{
"draft_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"imported_at": "2026-10-31T15:04:05Z",
"order_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"source": "manual",
"status": "string",
"step": "string",
"tracking_number": "1Z999AA10123456784"
}
]
},
"request_id": "01JBX7Q2…"
}Save a draft
POST /v1/shipments/draft
Saves a shipment without buying it. A draft can hold a chosen rate, and be bought later with POST /v1/shipments/draft/{id}/process.
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.
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.
batch_iduuidA batch from
GET /v1/batches.delivery_instructionsstringInstructions for the driver.
email_notificationsbooleanEmail tracking updates to the recipient.
packagesarray of objectsOne entry per box.
Each item · 10
dimension_unit• Required stringinorcm.height• Required numberHeight, in
dimension_unit.items• Required array of objectsWhat is in this box (optional for domestic shipments).
Each item · 8
currency• Required stringThree-letter currency code, e.g.
CAD.description• Required stringWhat the item is.
quantity• Required integerHow many.
unit_value_cents• Required integerValue of one unit, in cents.
customs_descriptionstringDescription for customs, if different.
hs_codestringHarmonized System code.
origin_countrystringTwo-letter code of the country where the item was made.
skustringYour product code.
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.box_iduuidA standard box from
GET /v1/package-boxes, if one was used.namestringpreset_iduuidA saved box from
GET /v1/package-presets, if one was used.
reference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
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
created_at• Required timestampWhen it was created (ISO 8601, UTC).
email_notifications• Required booleanEmail tracking updates to the recipient.
from• Required stringShip-from address.
id• Required uuidlabel_size• Required stringthermal(4×6 in) orstandard(8.5×11 in). Defaults to the account's shipping preference.packages• Required stringOne entry per box.
step• Required stringto• Required stringShip-to address.
updated_at• Required timestampWhen it last changed (ISO 8601, UTC).
customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.delivery_instructionsstringInstructions for the driver.
discount_codestringA discount code to apply.
expires_attimestampprocessed_attimestampreference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
selected_amount_centsintegerselected_carrierstringselected_currencystringselected_service_codestringselected_service_namestringship_datedateDay the parcel will be handed to the carrier (
YYYY-MM-DD). Leave out for today; up to 7 days ahead.shipment_iduuidsignature_optionstringSignature on delivery:
none,requiredoradult. Carriers charge extra for a signature.
curl -X POST "https://api.parcelhub.ca/v1/shipments/draft" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"delivery_instructions": "string",
"email_notifications": true,
"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,
"items": [
{}
],
"length": 30,
"name": "Alex Martin",
"weight": 2.5,
"weight_unit": "kg",
"width": 20
}
],
"reference_number": "string",
"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": {
"created_at": "2026-10-31T15:04:05Z",
"customs_declaration_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"delivery_instructions": "string",
"discount_code": "string",
"email_notifications": true,
"expires_at": "2026-10-31T15:04:05Z",
"from": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"label_size": "thermal",
"packages": "string",
"processed_at": "2026-10-31T15:04:05Z",
"reference_number": "string",
"selected_amount_cents": 1299,
"selected_carrier": "string",
"selected_currency": "string",
"selected_service_code": "string",
"selected_service_name": "string",
"ship_date": "2026-11-03",
"shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"signature_option": "none",
"step": "string",
"to": "string",
"updated_at": "2026-10-31T15:04:05Z"
},
"request_id": "01JBX7Q2…"
}Get a draft
GET /v1/shipments/draft/{id}
One draft: addresses, packages, add-ons and the selected rate, if any.
Path parameters
id• Required string
Response in data
created_at• Required timestampWhen it was created (ISO 8601, UTC).
email_notifications• Required booleanEmail tracking updates to the recipient.
from• Required stringShip-from address.
id• Required uuidlabel_size• Required stringthermal(4×6 in) orstandard(8.5×11 in). Defaults to the account's shipping preference.packages• Required stringOne entry per box.
step• Required stringto• Required stringShip-to address.
updated_at• Required timestampWhen it last changed (ISO 8601, UTC).
customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.delivery_instructionsstringInstructions for the driver.
discount_codestringA discount code to apply.
expires_attimestampprocessed_attimestampreference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
selected_amount_centsintegerselected_carrierstringselected_currencystringselected_service_codestringselected_service_namestringship_datedateDay the parcel will be handed to the carrier (
YYYY-MM-DD). Leave out for today; up to 7 days ahead.shipment_iduuidsignature_optionstringSignature on delivery:
none,requiredoradult. Carriers charge extra for a signature.
curl "https://api.parcelhub.ca/v1/shipments/draft/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"created_at": "2026-10-31T15:04:05Z",
"customs_declaration_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"delivery_instructions": "string",
"discount_code": "string",
"email_notifications": true,
"expires_at": "2026-10-31T15:04:05Z",
"from": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"label_size": "thermal",
"packages": "string",
"processed_at": "2026-10-31T15:04:05Z",
"reference_number": "string",
"selected_amount_cents": 1299,
"selected_carrier": "string",
"selected_currency": "string",
"selected_service_code": "string",
"selected_service_name": "string",
"ship_date": "2026-11-03",
"shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"signature_option": "none",
"step": "string",
"to": "string",
"updated_at": "2026-10-31T15:04:05Z"
},
"request_id": "01JBX7Q2…"
}Update a draft
PATCH /v1/shipments/draft/{id}
Changes a draft. Fields you leave out stay as they are; null clears a field that can be cleared. To choose a rate, send the selected_* fields and the quote_id from POST /v1/rates.
Path parameters
id• Required string
Request body
customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.delivery_instructionsstringInstructions for the driver.
discount_codestringA discount code to apply.
email_notificationsbooleanEmail tracking updates to the recipient.
fromobjectShip-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.
label_sizestringthermal(4×6 in) orstandard(8.5×11 in). Defaults to the account's shipping preference.packagesarray of objectsOne entry per box.
Each item · 10
dimension_unit• Required stringinorcm.height• Required numberHeight, in
dimension_unit.items• Required array of objectsWhat is in this box (optional for domestic shipments).
Each item · 8
currency• Required stringThree-letter currency code, e.g.
CAD.description• Required stringWhat the item is.
quantity• Required integerHow many.
unit_value_cents• Required integerValue of one unit, in cents.
customs_descriptionstringDescription for customs, if different.
hs_codestringHarmonized System code.
origin_countrystringTwo-letter code of the country where the item was made.
skustringYour product code.
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.box_iduuidA standard box from
GET /v1/package-boxes, if one was used.namestringpreset_iduuidA saved box from
GET /v1/package-presets, if one was used.
quote_iduuidThe
quote_idfrom thePOST /v1/ratesresponse the chosen rate came from.reference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
selected_amount_centsintegerThe chosen rate's
amount_cents.selected_carrierstringThe chosen rate's
carrier.selected_currencystringThe chosen rate's
currency.selected_duties_centsintegerThe chosen rate's
duties_cents, if any.selected_service_codestringThe chosen rate's
service_code.selected_service_namestringThe chosen rate's
service_name.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.toobjectShip-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.
Response in data
created_at• Required timestampWhen it was created (ISO 8601, UTC).
email_notifications• Required booleanEmail tracking updates to the recipient.
from• Required stringShip-from address.
id• Required uuidlabel_size• Required stringthermal(4×6 in) orstandard(8.5×11 in). Defaults to the account's shipping preference.packages• Required stringOne entry per box.
step• Required stringto• Required stringShip-to address.
updated_at• Required timestampWhen it last changed (ISO 8601, UTC).
customs_declaration_iduuidA customs declaration from
POST /v1/customs/declarations. Needed for shipments that cross a border.delivery_instructionsstringInstructions for the driver.
discount_codestringA discount code to apply.
expires_attimestampprocessed_attimestampreference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
selected_amount_centsintegerselected_carrierstringselected_currencystringselected_service_codestringselected_service_namestringship_datedateDay the parcel will be handed to the carrier (
YYYY-MM-DD). Leave out for today; up to 7 days ahead.shipment_iduuidsignature_optionstringSignature on delivery:
none,requiredoradult. Carriers charge extra for a signature.
curl -X PATCH "https://api.parcelhub.ca/v1/shipments/draft/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"delivery_instructions": "string",
"discount_code": "string",
"email_notifications": true,
"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"
},
"label_size": "thermal",
"packages": [
{
"dimension_unit": "cm",
"height": 10,
"items": [
{}
],
"length": 30,
"name": "Alex Martin",
"weight": 2.5,
"weight_unit": "kg",
"width": 20
}
],
"reference_number": "string",
"selected_amount_cents": 1299,
"selected_carrier": "carrier",
"selected_currency": "currency",
"selected_duties_cents": 1299,
"selected_service_code": "service_code",
"selected_service_name": "service_name",
"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": {
"created_at": "2026-10-31T15:04:05Z",
"customs_declaration_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"delivery_instructions": "string",
"discount_code": "string",
"email_notifications": true,
"expires_at": "2026-10-31T15:04:05Z",
"from": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"label_size": "thermal",
"packages": "string",
"processed_at": "2026-10-31T15:04:05Z",
"reference_number": "string",
"selected_amount_cents": 1299,
"selected_carrier": "string",
"selected_currency": "string",
"selected_service_code": "string",
"selected_service_name": "string",
"ship_date": "2026-11-03",
"shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"signature_option": "none",
"step": "string",
"to": "string",
"updated_at": "2026-10-31T15:04:05Z"
},
"request_id": "01JBX7Q2…"
}Delete a draft
DELETE /v1/shipments/draft/{id}
Deletes an unpurchased draft.
Path parameters
id• Required string
Response in data
See the example on the right.
curl -X DELETE "https://api.parcelhub.ca/v1/shipments/draft/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": null,
"request_id": "01JBX7Q2…"
}Buy a draft
POST /v1/shipments/draft/{id}/process
Buys the label for the rate selected on the draft and charges the wallet. The draft becomes a shipment.
Confirm with the account owner before calling it.
Path parameters
id• Required string
Response in data
archived• Required booleantrueto archive (the default),falseto bring it back.base_rate_cents• Required integerLabel price before discount and tax, in cents.
carrier• Required stringCarrier code, as returned with each rate.
carrier_display_name• Required stringCarrier name to show to people.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
currency• Required stringThree-letter currency code, e.g.
CAD.discount_cents• Required integerDiscount applied, in cents.
duties_cents• Required integerDestination duties and taxes prepaid with this label (DDP), when offered.
email_notifications• Required booleanEmail tracking updates to the recipient.
final_rate_cents• Required integerWhat was charged: price − discount + tax + prepaid duties, in cents.
from_address• Required anyhas_customs_invoice• Required booleanid• Required uuidis_return• Required booleanlabel_size• Required stringthermal(4×6 in) orstandard(8.5×11 in). Defaults to the account's shipping preference.order_number• Required stringpackages• Required anyOne entry per box.
refund_pending• Required booleanrefund_withheld• Required booleanrefunded_cents• Required integerservice• Required stringstatus• Required stringtax_cents• Required integerSales tax, in cents.
tax_rate_bps• Required integerto_address• Required anytracking_available• Required booleanFalse for a service without tracking.
updated_at• Required timestampWhen it last changed (ISO 8601, UTC).
batchobjectFields · 3
batch_number• Required stringid• Required uuidname• Required string
cancelled_attimestampcreated_by_emailstringcreated_by_namestringdelivery_instructionsstringInstructions for the driver.
paid_attimestampreference_numberstringYour reference, e.g. an order number. Printed on the label where the carrier allows.
refund_held_untiltimestampreturn_ofuuidship_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.tax_jurisdictionstringtracking_numberstringThe carrier's tracking number.
wallet_transaction_iduuid
curl -X POST "https://api.parcelhub.ca/v1/shipments/draft/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/process" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"archived": true,
"base_rate_cents": 1299,
"batch": {
"batch_number": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin"
},
"cancelled_at": "2026-10-31T15:04:05Z",
"carrier": "ups",
"carrier_display_name": "UPS",
"created_at": "2026-10-31T15:04:05Z",
"created_by_email": "[email protected]",
"created_by_name": "string",
"currency": "CAD",
"delivery_instructions": "string",
"discount_cents": 1299,
"duties_cents": 1299,
"email_notifications": true,
"final_rate_cents": 1299,
"from_address": null,
"has_customs_invoice": false,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"is_return": false,
"label_size": "thermal",
"order_number": "PH-104233",
"packages": null,
"paid_at": "2026-10-31T15:04:05Z",
"reference_number": "string",
"refund_held_until": "2026-10-31T15:04:05Z",
"refund_pending": true,
"refund_withheld": true,
"refunded_cents": 1299,
"return_of": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"service": "string",
"ship_date": "2026-11-03",
"signature_option": "none",
"status": "string",
"tax_cents": 1299,
"tax_jurisdiction": "string",
"tax_rate_bps": 1,
"to_address": null,
"tracking_available": true,
"tracking_number": "1Z999AA10123456784",
"updated_at": "2026-10-31T15:04:05Z",
"wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}List drafts
GET /v1/shipments/drafts
Unpurchased shipments, newest first: saved forms and orders imported from stores or files.
Query parameters
limitintegerMost results to return.
offsetintegerResults to skip, for paging.
batch_idstringOnly drafts for this batch, or
nonefor drafts without a batch.
Response in data
batches• Required array of objectsEach item · 4
count• Required integerbatch_iduuidA batch from
GET /v1/batches.namestringstatusstring
items• Required array of objectsEach item · 17
created_at• Required timestampWhen it was created (ISO 8601, UTC).
id• Required uuidpackage_count• Required integerstep• Required stringupdated_at• Required timestampWhen it last changed (ISO 8601, UTC).
batch_iduuidA batch from
GET /v1/batches.batch_namestringbatch_statusstringexpires_attimestampselected_amount_centsintegerselected_carrierstringselected_currencystringselected_service_namestringshipment_iduuidto_citystringto_countrystringShip-to country code.
to_namestring
total• Required integer
curl "https://api.parcelhub.ca/v1/shipments/drafts" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"batches": [
{
"batch_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"count": 1,
"name": "Alex Martin",
"status": "string"
}
],
"items": [
{
"batch_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"batch_name": "string",
"batch_status": "string",
"created_at": "2026-10-31T15:04:05Z",
"expires_at": "2026-10-31T15:04:05Z",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"package_count": 1,
"selected_amount_cents": 1299,
"selected_carrier": "string",
"selected_currency": "string",
"selected_service_name": "string",
"shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"step": "string",
"to_city": "string",
"to_country": "string",
"to_name": "string",
"updated_at": "2026-10-31T15:04:05Z"
}
],
"total": 1
},
"request_id": "01JBX7Q2…"
}