API reference
Batches
Groups of purchased shipments, for example one day's orders, with merged labels.
List batches
GET /v1/batches
Batches on the account, newest first.
Query parameters
statusstringlimitintegerMost results to return.
Response in data
items• Required array of objectsEach item · 14
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl "https://api.parcelhub.ca/v1/batches" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
}
]
},
"request_id": "01JBX7Q2…"
}Create a batch
POST /v1/batches
Starts a new, open batch.
Request body
name• Required stringbranch_iduuidLeave out.
notesstringNotes for the batch.
sourcestringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.source_namestringA name for that source, e.g. your app's name.
store_iduuidLeave out.
Response in data
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl -X POST "https://api.parcelhub.ca/v1/batches" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Alex Martin",
"notes": "string",
"source": "manual",
"source_name": "string"
}'{
"ok": true,
"data": {
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Get a batch
GET /v1/batches/{id}
One batch with its totals.
Path parameters
id• Required string
Response in data
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Update a batch
PATCH /v1/batches/{id}
Renames a batch, changes its notes, or closes it (status: "closed"). A closed batch takes no new shipments.
Path parameters
id• Required string
Request body
namestringnotesstringFree-text notes.
statusstringopenorclosed.
Response in data
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl -X PATCH "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Alex Martin",
"notes": "string",
"status": "open"
}'{
"ok": true,
"data": {
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Batch drafts
GET /v1/batches/{id}/drafts
Drafts waiting to join this batch: they join when their label is bought.
Path parameters
id• Required string
Response in data
items• Required array of objectsEach item · 8
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).
to_citystringto_countrystringShip-to country code.
to_namestring
curl "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/drafts" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"created_at": "2026-10-31T15:04:05Z",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"package_count": 1,
"step": "string",
"to_city": "string",
"to_country": "string",
"to_name": "string",
"updated_at": "2026-10-31T15:04:05Z"
}
]
},
"request_id": "01JBX7Q2…"
}Download all labels
GET /v1/batches/{id}/labels
One merged PDF of every label in the batch (short-lived link). skipped lists shipments whose label could not be included.
Path parameters
id• Required string
Response in data
skipped• Required array of uuidsurl• Required string
curl "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/labels" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"skipped": [
"3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
],
"url": "https://…"
},
"request_id": "01JBX7Q2…"
}Batch shipments
GET /v1/batches/{id}/shipments
Purchased shipments in a batch.
Path parameters
id• Required string
Response in data
items• Required array of objectsEach item · 10
carrier• Required stringCarrier code, as returned with each rate.
createdAt• Required timestampcurrency• Required stringThree-letter currency code, e.g.
CAD.finalRateCents• Required integerid• Required uuidorderNumber• Required stringservice• Required stringstatus• Required stringtoAddress• Required anytrackingNumberstring
curl "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/shipments" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"carrier": "ups",
"createdAt": "2026-10-31T15:04:05Z",
"currency": "CAD",
"finalRateCents": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"orderNumber": "string",
"service": "string",
"status": "string",
"toAddress": null,
"trackingNumber": "string"
}
]
},
"request_id": "01JBX7Q2…"
}Add to a batch
POST /v1/batches/{id}/shipments
Adds one or more purchased shipments to an open batch.
Path parameters
id• Required string
Request body
shipment_iduuidOne shipment to add.
shipment_idsarray of uuidsSeveral shipments to add.
Response in data
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl -X POST "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/shipments" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"ok": true,
"data": {
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Remove from a batch
DELETE /v1/batches/{id}/shipments
Takes shipments out of a batch. The shipments and their labels are not changed.
Path parameters
id• Required string
Request body
shipment_iduuidOne shipment to remove.
shipment_idsarray of uuidsSeveral shipments to remove.
Response in data
batchNumber• Required stringcreatedAt• Required timestampdraftCount• Required integerid• Required uuidname• Required stringshipmentCount• Required integersource• Required stringWhere the shipment came from. Leave out (it becomes
manual) or name your integration, e.g.api.status• Required stringupdatedAt• Required timestampuserId• Required uuidbranchIduuidnotesstringFree-text notes.
sourceNamestringstoreIduuid
curl -X DELETE "https://api.parcelhub.ca/v1/batches/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/shipments" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"ok": true,
"data": {
"batchNumber": "string",
"branchId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"createdAt": "2026-10-31T15:04:05Z",
"draftCount": 1,
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"name": "Alex Martin",
"notes": "string",
"shipmentCount": 1,
"source": "manual",
"sourceName": "string",
"status": "string",
"storeId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"updatedAt": "2026-10-31T15:04:05Z",
"userId": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}