API reference
ParcelHub API
145 endpoints for rates, labels, tracking, pickups, customs, the wallet and connected stores. Every page here is generated from the live API, so fields and examples always match what it accepts.
- Base URL
https://api.parcelhub.ca/v1 - Authentication exchange an API key for a token at
POST /v1/api-clients/token, then sendAuthorization: Bearer <token>. See Quickstart. - Money integer cents:
1299is $12.99, in CAD unless acurrencysays otherwise. - Errors
{"ok": false, "error": {"code", "message"}}. See Errors & retries. - OpenAPI 3.1 download openapi.json for code generators and API clients.
Authenticate
curl -X POST https://api.parcelhub.ca/v1/api-clients/token \
-H "Content-Type: application/json" \
-d '{"client_id": "ph_client_…", "client_secret": "your-client-secret"}'
# then, on every call
curl https://api.parcelhub.ca/v1/shipments \
-H "Authorization: Bearer $TOKEN" Every response
{
"ok": true,
"data": { … },
"request_id": "01JBX7Q2…"
}Groups
Authentication 2 Exchange an API key for a short-lived access token.Account 8 Who the key acts as, the account's people, search and dashboard figures.Rates 5 Live quotes from every carrier, checkout totals and drop-off locations.Shipments 16 Buy labels, download them, track parcels, void labels and make return labels.Drafts 7 Shipments saved without buying, including orders imported from stores and files.Customs 2 Customs declarations for shipments that cross a border.Addresses 9 The address book: senders, recipients and the default ship-from / ship-to.Packages 13 Saved box sizes, saved customs items and the account's shipping defaults.Batches 9 Groups of purchased shipments, for example one day's orders, with merged labels.Pickups 18 Carrier pickups: options, quotes, booking, changes and cancellation.Wallet 12 The prepaid balance labels are paid from: balance, history, top-ups, saved cards and refunds.Billing 6 Invoices (charges billed later, such as carrier adjustments) and receipts.Stores 8 Connected online stores (Shopify, WooCommerce, Wix and others) and their orders.Returns 7 ReturnHub: returns received at the ParcelHub warehouse for this account.Support 7 Tickets with the ParcelHub support team.Notifications 10 In-app notifications and email / SMS preferences.Discounts 6 Discount codes, promotions and referrals.