Get a return label

GET /v1/returns/{id}

A return created with POST /v1/shipments/{id}/return.

Path parameters

  • id • Required string

Response in data

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • id • Required uuid
  • original_shipment_id • Required uuid
  • return_shipment_id • Required uuid
  • return_type • Required string
  • updated_at • Required timestamp

    When it last changed (ISO 8601, UTC).

  • notes string

    Free-text notes.

  • reason string
GET /v1/returns/{id}
curl "https://api.parcelhub.ca/v1/returns/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "created_at": "2026-10-31T15:04:05Z",
    "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "notes": "string",
    "original_shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "reason": "string",
    "return_shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "return_type": "string",
    "updated_at": "2026-10-31T15:04:05Z"
  },
  "request_id": "01JBX7Q2…"
}

List shipments

GET /v1/shipments

Purchased shipments, newest first. Filter by status, dates, source or a search (order number, tracking number, recipient name, company or city). Page with limit and offset.

Query parameters

  • status string

    Only shipments with this status.

  • limit integer

    Most results to return.

  • offset integer

    Results to skip, for paging.

  • from date

    Created on or after this day (YYYY-MM-DD, UTC).

  • to date

    Created on or before this day (YYYY-MM-DD, UTC).

  • is_return boolean

    true for return shipments only, false to leave them out.

  • archived boolean

    true for the Archived list. Archived shipments are left out otherwise.

  • source string

    Only shipments from this source: manual, csv, xlsx, api or a store platform such as shopify.

  • search string

    Matches order number, tracking number, or the recipient's name, company or city.

Response in data

  • items • Required array of objects
    Each item · 18
    • carrier • Required string

      Carrier code, as returned with each rate.

    • carrier_display_name • Required string

      Carrier name to show to people.

    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • currency • Required string

      Three-letter currency code, e.g. CAD.

    • final_rate_cents • Required integer

      What was charged: price − discount + tax + prepaid duties, in cents.

    • from_address • Required any
    • id • Required uuid
    • is_return • Required boolean
    • order_number • Required string
    • service • Required string
    • source • Required string

      Where the shipment came from. Leave out (it becomes manual) or name your integration, e.g. api.

    • status • Required string
    • to_address • Required any
    • tracking_available • Required boolean

      False for a service without tracking.

    • created_by_name string
    • return_of uuid
    • source_name string

      A name for that source, e.g. your app's name.

    • tracking_number string

      The carrier's tracking number.

  • total integer
GET /v1/shipments
curl "https://api.parcelhub.ca/v1/shipments" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "carrier": "ups",
        "carrier_display_name": "UPS",
        "created_at": "2026-10-31T15:04:05Z",
        "created_by_name": "string",
        "currency": "CAD",
        "final_rate_cents": 1299,
        "from_address": null,
        "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "is_return": false,
        "order_number": "PH-104233",
        "return_of": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "service": "string",
        "source": "manual",
        "source_name": "string",
        "status": "string",
        "to_address": null,
        "tracking_available": true,
        "tracking_number": "1Z999AA10123456784"
      }
    ],
    "total": 1
  },
  "request_id": "01JBX7Q2…"
}

Buy a label

POST /v1/shipments

Charges the account's wallet.

Buys a label for one of the rates from POST /v1/rates and charges the wallet. Send the same addresses and packages you quoted, the chosen carrier, service_code and service_name, and the quote_id. Shipments that cross a border need customs_declaration_id. Send an Idempotency-Key header (any unique string per purchase): retrying with the same key returns the first shipment instead of buying a second label. Returns 409 (error.message is insufficient_funds) when the wallet does not cover the price: top up and retry.

Confirm with the account owner before calling it.

Headers

  • Idempotency-Key string

    Any unique string per purchase. A retry with the same key returns the first result instead of buying again.

Request body

  • carrier • Required string

    The carrier of the chosen rate, exactly as POST /v1/rates returned it.

  • from • Required object

    Ship-from address.

    Fields · 11
    • city • Required string

      City.

    • country • Required string

      Two-letter country code, e.g. CA, US.

    • name • Required string
    • postal_code • Required string

      Postal or ZIP code.

    • state • Required string

      Province or state code, e.g. ON, BC, NY.

    • street • Required string

      Street address.

    • company string

      Company name.

    • email string

      Email address.

    • is_residential boolean

      True for a home address. Some carriers charge more for residential delivery.

    • line2 string

      Apartment, suite or unit.

    • phone string

      Phone number. Carriers need one for the recipient on most international and express services.

  • packages • Required array of objects

    One entry per box.

    Each item · 10
    • dimension_unit • Required string

      in or cm.

    • height • Required number

      Height, in dimension_unit.

    • items • Required array of objects

      What is in this box (optional for domestic shipments).

      Each item · 8
      • currency • Required string

        Three-letter currency code, e.g. CAD.

      • description • Required string

        What the item is.

      • quantity • Required integer

        How many.

      • unit_value_cents • Required integer

        Value of one unit, in cents.

      • customs_description string

        Description for customs, if different.

      • hs_code string

        Harmonized System code.

      • origin_country string

        Two-letter code of the country where the item was made.

      • sku string

        Your product code.

    • length • Required number

      Length, in dimension_unit.

    • weight • Required number

      Weight of the box with its contents, in weight_unit.

    • weight_unit • Required string

      lb or kg.

    • width • Required number

      Width, in dimension_unit.

    • box_id uuid

      A standard box from GET /v1/package-boxes, if one was used.

    • name string
    • preset_id uuid

      A saved box from GET /v1/package-presets, if one was used.

  • service_code • Required string

    The service_code of the chosen rate.

  • service_name • Required string

    The service_name of the chosen rate.

  • to • Required object

    Ship-to address.

    Fields · 11
    • city • Required string

      City.

    • country • Required string

      Two-letter country code, e.g. CA, US.

    • name • Required string
    • postal_code • Required string

      Postal or ZIP code.

    • state • Required string

      Province or state code, e.g. ON, BC, NY.

    • street • Required string

      Street address.

    • company string

      Company name.

    • email string

      Email address.

    • is_residential boolean

      True for a home address. Some carriers charge more for residential delivery.

    • line2 string

      Apartment, suite or unit.

    • phone string

      Phone number. Carriers need one for the recipient on most international and express services.

  • customs_declaration_id uuid

    A customs declaration from POST /v1/customs/declarations. Needed for shipments that cross a border.

  • delivery_instructions string

    Instructions for the driver.

  • discount_code string

    A discount code to apply.

  • email_notifications boolean

    Email tracking updates to the recipient.

  • label_size string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • quote_id uuid

    The quote_id from the POST /v1/rates response the chosen rate came from.

  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • ship_date date

    Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • source string

    Where the shipment came from. Leave out (it becomes manual) or name your integration, e.g. api.

  • source_name string

    A name for that source, e.g. your app's name.

Response in data

  • archived • Required boolean

    true to archive (the default), false to bring it back.

  • base_rate_cents • Required integer

    Label price before discount and tax, in cents.

  • carrier • Required string

    Carrier code, as returned with each rate.

  • carrier_display_name • Required string

    Carrier name to show to people.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency • Required string

    Three-letter currency code, e.g. CAD.

  • discount_cents • Required integer

    Discount applied, in cents.

  • duties_cents • Required integer

    Destination duties and taxes prepaid with this label (DDP), when offered.

  • email_notifications • Required boolean

    Email tracking updates to the recipient.

  • final_rate_cents • Required integer

    What was charged: price − discount + tax + prepaid duties, in cents.

  • from_address • Required any
  • has_customs_invoice • Required boolean
  • id • Required uuid
  • is_return • Required boolean
  • label_size • Required string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • order_number • Required string
  • packages • Required any

    One entry per box.

  • refund_pending • Required boolean
  • refund_withheld • Required boolean
  • refunded_cents • Required integer
  • service • Required string
  • status • Required string
  • tax_cents • Required integer

    Sales tax, in cents.

  • tax_rate_bps • Required integer
  • to_address • Required any
  • tracking_available • Required boolean

    False for a service without tracking.

  • updated_at • Required timestamp

    When it last changed (ISO 8601, UTC).

  • batch object
    Fields · 3
    • batch_number • Required string
    • id • Required uuid
    • name • Required string
  • cancelled_at timestamp
  • created_by_email string
  • created_by_name string
  • delivery_instructions string

    Instructions for the driver.

  • paid_at timestamp
  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • refund_held_until timestamp
  • return_of uuid
  • ship_date date

    Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • tax_jurisdiction string
  • tracking_number string

    The carrier's tracking number.

  • wallet_transaction_id uuid
POST /v1/shipments
curl -X POST "https://api.parcelhub.ca/v1/shipments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "carrier": "ups",
  "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",
  "service_code": "service_code",
  "service_name": "UPS Standard",
  "ship_date": "2026-11-03",
  "signature_option": "none",
  "source": "manual",
  "source_name": "string",
  "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"
  }
}'
Response
{
  "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…"
}

Get a shipment

GET /v1/shipments/{id}

One shipment in full: addresses, packages, carrier and service, charges, tracking number and status.

Path parameters

  • id • Required string

Response in data

  • archived • Required boolean

    true to archive (the default), false to bring it back.

  • base_rate_cents • Required integer

    Label price before discount and tax, in cents.

  • carrier • Required string

    Carrier code, as returned with each rate.

  • carrier_display_name • Required string

    Carrier name to show to people.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency • Required string

    Three-letter currency code, e.g. CAD.

  • discount_cents • Required integer

    Discount applied, in cents.

  • duties_cents • Required integer

    Destination duties and taxes prepaid with this label (DDP), when offered.

  • email_notifications • Required boolean

    Email tracking updates to the recipient.

  • final_rate_cents • Required integer

    What was charged: price − discount + tax + prepaid duties, in cents.

  • from_address • Required any
  • has_customs_invoice • Required boolean
  • id • Required uuid
  • is_return • Required boolean
  • label_size • Required string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • order_number • Required string
  • packages • Required any

    One entry per box.

  • refund_pending • Required boolean
  • refund_withheld • Required boolean
  • refunded_cents • Required integer
  • service • Required string
  • status • Required string
  • tax_cents • Required integer

    Sales tax, in cents.

  • tax_rate_bps • Required integer
  • to_address • Required any
  • tracking_available • Required boolean

    False for a service without tracking.

  • updated_at • Required timestamp

    When it last changed (ISO 8601, UTC).

  • batch object
    Fields · 3
    • batch_number • Required string
    • id • Required uuid
    • name • Required string
  • cancelled_at timestamp
  • created_by_email string
  • created_by_name string
  • delivery_instructions string

    Instructions for the driver.

  • paid_at timestamp
  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • refund_held_until timestamp
  • return_of uuid
  • ship_date date

    Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • tax_jurisdiction string
  • tracking_number string

    The carrier's tracking number.

  • wallet_transaction_id uuid
GET /v1/shipments/{id}
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "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…"
}

Archive a shipment

POST /v1/shipments/{id}/archive

Moves a shipment to the Archived list, or back with archived: false. Nothing changes with the carrier.

Path parameters

  • id • Required string

Request body

  • archived boolean

    true to archive (the default), false to bring it back.

Response in data

  • archived • Required boolean

    true to archive (the default), false to bring it back.

  • base_rate_cents • Required integer

    Label price before discount and tax, in cents.

  • carrier • Required string

    Carrier code, as returned with each rate.

  • carrier_display_name • Required string

    Carrier name to show to people.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency • Required string

    Three-letter currency code, e.g. CAD.

  • discount_cents • Required integer

    Discount applied, in cents.

  • duties_cents • Required integer

    Destination duties and taxes prepaid with this label (DDP), when offered.

  • email_notifications • Required boolean

    Email tracking updates to the recipient.

  • final_rate_cents • Required integer

    What was charged: price − discount + tax + prepaid duties, in cents.

  • from_address • Required any
  • has_customs_invoice • Required boolean
  • id • Required uuid
  • is_return • Required boolean
  • label_size • Required string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • order_number • Required string
  • packages • Required any

    One entry per box.

  • refund_pending • Required boolean
  • refund_withheld • Required boolean
  • refunded_cents • Required integer
  • service • Required string
  • status • Required string
  • tax_cents • Required integer

    Sales tax, in cents.

  • tax_rate_bps • Required integer
  • to_address • Required any
  • tracking_available • Required boolean

    False for a service without tracking.

  • updated_at • Required timestamp

    When it last changed (ISO 8601, UTC).

  • batch object
    Fields · 3
    • batch_number • Required string
    • id • Required uuid
    • name • Required string
  • cancelled_at timestamp
  • created_by_email string
  • created_by_name string
  • delivery_instructions string

    Instructions for the driver.

  • paid_at timestamp
  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • refund_held_until timestamp
  • return_of uuid
  • ship_date date

    Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • tax_jurisdiction string
  • tracking_number string

    The carrier's tracking number.

  • wallet_transaction_id uuid
POST /v1/shipments/{id}/archive
curl -X POST "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/archive" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "archived": true
}'
Response
{
  "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…"
}

Void a label

POST /v1/shipments/{id}/cancel

Voids an unused label with the carrier and refunds it to the wallet. Some carriers refund only after they confirm the label was not used. Cannot be undone.

Path parameters

  • id • Required string

Request body

  • reason string

    Why the label is being voided.

Response in data

  • archived • Required boolean

    true to archive (the default), false to bring it back.

  • base_rate_cents • Required integer

    Label price before discount and tax, in cents.

  • carrier • Required string

    Carrier code, as returned with each rate.

  • carrier_display_name • Required string

    Carrier name to show to people.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency • Required string

    Three-letter currency code, e.g. CAD.

  • discount_cents • Required integer

    Discount applied, in cents.

  • duties_cents • Required integer

    Destination duties and taxes prepaid with this label (DDP), when offered.

  • email_notifications • Required boolean

    Email tracking updates to the recipient.

  • final_rate_cents • Required integer

    What was charged: price − discount + tax + prepaid duties, in cents.

  • from_address • Required any
  • has_customs_invoice • Required boolean
  • id • Required uuid
  • is_return • Required boolean
  • label_size • Required string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • order_number • Required string
  • packages • Required any

    One entry per box.

  • refund_pending • Required boolean
  • refund_withheld • Required boolean
  • refunded_cents • Required integer
  • service • Required string
  • status • Required string
  • tax_cents • Required integer

    Sales tax, in cents.

  • tax_rate_bps • Required integer
  • to_address • Required any
  • tracking_available • Required boolean

    False for a service without tracking.

  • updated_at • Required timestamp

    When it last changed (ISO 8601, UTC).

  • batch object
    Fields · 3
    • batch_number • Required string
    • id • Required uuid
    • name • Required string
  • cancelled_at timestamp
  • created_by_email string
  • created_by_name string
  • delivery_instructions string

    Instructions for the driver.

  • paid_at timestamp
  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • refund_held_until timestamp
  • return_of uuid
  • ship_date date

    Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • tax_jurisdiction string
  • tracking_number string

    The carrier's tracking number.

  • wallet_transaction_id uuid
POST /v1/shipments/{id}/cancel
curl -X POST "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/cancel" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "string"
}'
Response
{
  "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 comments

GET /v1/shipments/{id}/comments

Notes on a shipment, from the account and from ParcelHub support.

Path parameters

  • id • Required string

Response in data

  • items • Required array of objects
    Each item · 9
    • author_kind • Required string
    • author_name • Required string
    • body • Required string
    • can_delete • Required boolean
    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • id • Required uuid
    • is_internal • Required boolean
    • metadata • Required any
    • source string

      Where the shipment came from. Leave out (it becomes manual) or name your integration, e.g. api.

GET /v1/shipments/{id}/comments
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/comments" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "author_kind": "string",
        "author_name": "string",
        "body": "string",
        "can_delete": true,
        "created_at": "2026-10-31T15:04:05Z",
        "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "is_internal": false,
        "metadata": null,
        "source": "manual"
      }
    ]
  },
  "request_id": "01JBX7Q2…"
}

Add a comment

POST /v1/shipments/{id}/comments

Adds a note to a shipment. ParcelHub support can see it.

Path parameters

  • id • Required string

Request body

  • body • Required string

    The note.

Response in data

  • author_kind • Required string
  • author_name • Required string
  • body • Required string
  • can_delete • Required boolean
  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • id • Required uuid
  • is_internal • Required boolean
  • metadata • Required any
  • source string

    Where the shipment came from. Leave out (it becomes manual) or name your integration, e.g. api.

POST /v1/shipments/{id}/comments
curl -X POST "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/comments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "string"
}'
Response
{
  "ok": true,
  "data": {
    "author_kind": "string",
    "author_name": "string",
    "body": "string",
    "can_delete": true,
    "created_at": "2026-10-31T15:04:05Z",
    "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "is_internal": false,
    "metadata": null,
    "source": "manual"
  },
  "request_id": "01JBX7Q2…"
}

Delete a comment

DELETE /v1/shipments/{id}/comments/{comment_id}

Deletes a note the account wrote.

Path parameters

  • id • Required string
  • comment_id • Required string

Response in data

See the example on the right.

DELETE /v1/shipments/{id}/comments/{comment_id}
curl -X DELETE "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/comments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": null,
  "request_id": "01JBX7Q2…"
}

Download the commercial invoice

GET /v1/shipments/{id}/customs-invoice

A download link for the commercial invoice the carrier made for a cross-border label, valid for about 15 minutes.

Path parameters

  • id • Required string

Response in data

  • filename • Required string
  • url • Required string
GET /v1/shipments/{id}/customs-invoice
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/customs-invoice" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "filename": "string",
    "url": "https://…"
  },
  "request_id": "01JBX7Q2…"
}

Download the label

GET /v1/shipments/{id}/label

A download link for the label PDF, valid for about 15 minutes. For a shipment with several boxes, box returns one box's label.

Path parameters

  • id • Required string

Query parameters

  • box integer

    Box number (from 1) to get only that box's label.

Response in data

  • url • Required string
  • tracking_number string

    The carrier's tracking number.

GET /v1/shipments/{id}/label
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/label" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "tracking_number": "1Z999AA10123456784",
    "url": "https://…"
  },
  "request_id": "01JBX7Q2…"
}

Buy a return label

POST /v1/shipments/{id}/return

Charges the account's wallet.

Buys a return label for an existing shipment and charges the wallet. By default it goes from the original recipient back to the sender with the same packages; any field you send replaces the original. Send an Idempotency-Key header, as when buying a label.

Confirm with the account owner before calling it.

Path parameters

  • id • Required string

Headers

  • Idempotency-Key string

    Any unique string per purchase. A retry with the same key returns the first result instead of buying again.

Request body

  • carrier string

    Carrier code, as returned with each rate.

  • delivery_instructions string

    Instructions for the driver.

  • discount_code string

    A discount code to apply.

  • email_notifications boolean

    Email tracking updates to the recipient.

  • from object

    Ship-from address.

    Fields · 11
    • city • Required string

      City.

    • country • Required string

      Two-letter country code, e.g. CA, US.

    • name • Required string
    • postal_code • Required string

      Postal or ZIP code.

    • state • Required string

      Province or state code, e.g. ON, BC, NY.

    • street • Required string

      Street address.

    • company string

      Company name.

    • email string

      Email address.

    • is_residential boolean

      True for a home address. Some carriers charge more for residential delivery.

    • line2 string

      Apartment, suite or unit.

    • phone string

      Phone number. Carriers need one for the recipient on most international and express services.

  • label_size string

    thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

  • notes string

    Notes for the return.

  • packages array of objects

    One entry per box.

    Each item · 10
    • dimension_unit • Required string

      in or cm.

    • height • Required number

      Height, in dimension_unit.

    • items • Required array of objects

      What is in this box (optional for domestic shipments).

      Each item · 8
      • currency • Required string

        Three-letter currency code, e.g. CAD.

      • description • Required string

        What the item is.

      • quantity • Required integer

        How many.

      • unit_value_cents • Required integer

        Value of one unit, in cents.

      • customs_description string

        Description for customs, if different.

      • hs_code string

        Harmonized System code.

      • origin_country string

        Two-letter code of the country where the item was made.

      • sku string

        Your product code.

    • length • Required number

      Length, in dimension_unit.

    • weight • Required number

      Weight of the box with its contents, in weight_unit.

    • weight_unit • Required string

      lb or kg.

    • width • Required number

      Width, in dimension_unit.

    • box_id uuid

      A standard box from GET /v1/package-boxes, if one was used.

    • name string
    • preset_id uuid

      A saved box from GET /v1/package-presets, if one was used.

  • reason string

    damaged, wrong_item, not_as_described, refused, no_longer_needed or other.

  • reference_number string

    Your reference, e.g. an order number. Printed on the label where the carrier allows.

  • return_type string

    print_label (default).

  • service_code string

    Service 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 string

    Service name to show to people.

  • signature_option string

    Signature on delivery: none, required or adult. Carriers charge extra for a signature.

  • to object

    Ship-to address.

    Fields · 11
    • city • Required string

      City.

    • country • Required string

      Two-letter country code, e.g. CA, US.

    • name • Required string
    • postal_code • Required string

      Postal or ZIP code.

    • state • Required string

      Province or state code, e.g. ON, BC, NY.

    • street • Required string

      Street address.

    • company string

      Company name.

    • email string

      Email address.

    • is_residential boolean

      True for a home address. Some carriers charge more for residential delivery.

    • line2 string

      Apartment, suite or unit.

    • phone string

      Phone number. Carriers need one for the recipient on most international and express services.

Response in data

  • return • Required object
    Fields · 8
    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • id • Required uuid
    • original_shipment_id • Required uuid
    • return_shipment_id • Required uuid
    • return_type • Required string
    • updated_at • Required timestamp

      When it last changed (ISO 8601, UTC).

    • notes string

      Free-text notes.

    • reason string
  • shipment • Required object
    Fields · 41
    • archived • Required boolean

      true to archive (the default), false to bring it back.

    • base_rate_cents • Required integer

      Label price before discount and tax, in cents.

    • carrier • Required string

      Carrier code, as returned with each rate.

    • carrier_display_name • Required string

      Carrier name to show to people.

    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • currency • Required string

      Three-letter currency code, e.g. CAD.

    • discount_cents • Required integer

      Discount applied, in cents.

    • duties_cents • Required integer

      Destination duties and taxes prepaid with this label (DDP), when offered.

    • email_notifications • Required boolean

      Email tracking updates to the recipient.

    • final_rate_cents • Required integer

      What was charged: price − discount + tax + prepaid duties, in cents.

    • from_address • Required any
    • has_customs_invoice • Required boolean
    • id • Required uuid
    • is_return • Required boolean
    • label_size • Required string

      thermal (4×6 in) or standard (8.5×11 in). Defaults to the account's shipping preference.

    • order_number • Required string
    • packages • Required any

      One entry per box.

    • refund_pending • Required boolean
    • refund_withheld • Required boolean
    • refunded_cents • Required integer
    • service • Required string
    • status • Required string
    • tax_cents • Required integer

      Sales tax, in cents.

    • tax_rate_bps • Required integer
    • to_address • Required any
    • tracking_available • Required boolean

      False for a service without tracking.

    • updated_at • Required timestamp

      When it last changed (ISO 8601, UTC).

    • batch object
      Fields · 3
      • batch_number • Required string
      • id • Required uuid
      • name • Required string
    • cancelled_at timestamp
    • created_by_email string
    • created_by_name string
    • delivery_instructions string

      Instructions for the driver.

    • paid_at timestamp
    • reference_number string

      Your reference, e.g. an order number. Printed on the label where the carrier allows.

    • refund_held_until timestamp
    • return_of uuid
    • ship_date date

      Day the parcel will be handed to the carrier (YYYY-MM-DD). Leave out for today; up to 7 days ahead.

    • signature_option string

      Signature on delivery: none, required or adult. Carriers charge extra for a signature.

    • tax_jurisdiction string
    • tracking_number string

      The carrier's tracking number.

    • wallet_transaction_id uuid
POST /v1/shipments/{id}/return
curl -X POST "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/return" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "carrier": "ups",
  "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",
  "notes": "string",
  "packages": [
    {
      "dimension_unit": "cm",
      "height": 10,
      "items": [
        {}
      ],
      "length": 30,
      "name": "Alex Martin",
      "weight": 2.5,
      "weight_unit": "kg",
      "width": 20
    }
  ],
  "reason": "damaged",
  "reference_number": "string",
  "return_type": "print_label",
  "service_code": "string",
  "service_name": "UPS Standard",
  "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"
  }
}'
Response
{
  "ok": true,
  "data": {
    "return": {
      "created_at": "2026-10-31T15:04:05Z",
      "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
      "notes": "string",
      "original_shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
      "reason": "string",
      "return_shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
      "return_type": "string",
      "updated_at": "2026-10-31T15:04:05Z"
    },
    "shipment": {
      "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…"
}

Timeline

GET /v1/shipments/{id}/timeline

Everything that happened to the shipment on ParcelHub: purchase, label, pickup, tracking milestones, refunds and charges.

Path parameters

  • id • Required string

Response in data

  • items • Required array of objects
    Each item · 4
    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • event_type • Required string
    • message • Required string
    • severity • Required string
GET /v1/shipments/{id}/timeline
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/timeline" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "created_at": "2026-10-31T15:04:05Z",
        "event_type": "string",
        "message": "string",
        "severity": "string"
      }
    ]
  },
  "request_id": "01JBX7Q2…"
}

Tracking

GET /v1/shipments/{id}/tracking

Tracking events from the carrier, newest first, with the current status.

Path parameters

  • id • Required string

Response in data

  • items • Required array of objects
    Each item · 5
    • event_code • Required string
    • event_description • Required string
    • occurred_at • Required timestamp
    • source • Required string

      Where the shipment came from. Leave out (it becomes manual) or name your integration, e.g. api.

    • location string
GET /v1/shipments/{id}/tracking
curl "https://api.parcelhub.ca/v1/shipments/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/tracking" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "event_code": "string",
        "event_description": "string",
        "location": "string",
        "occurred_at": "2026-10-31T15:04:05Z",
        "source": "manual"
      }
    ]
  },
  "request_id": "01JBX7Q2…"
}

Shipment counts

GET /v1/shipments/counts

How many shipments are in each list (in transit, delivered, exceptions, drafts…).

Response in data

  • all • Required integer
  • archived • Required integer

    true to archive (the default), false to bring it back.

  • delivered • Required integer
  • drafts • Required integer
  • exception • Required integer
  • in_transit • Required integer
  • ready • Required integer
  • voided • Required integer
GET /v1/shipments/counts
curl "https://api.parcelhub.ca/v1/shipments/counts" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "all": 1,
    "archived": 1,
    "delivered": 1,
    "drafts": 1,
    "exception": 1,
    "in_transit": 1,
    "ready": 1,
    "voided": 1
  },
  "request_id": "01JBX7Q2…"
}

List shipment ids

GET /v1/shipments/ids

Only the ids of the shipments a GET /v1/shipments query would return, in the same order. Takes the same filters.

Query parameters

  • status string

    Only shipments with this status.

  • limit integer

    Most results to return.

  • offset integer

    Results to skip, for paging.

  • from date

    Created on or after this day (YYYY-MM-DD, UTC).

  • to date

    Created on or before this day (YYYY-MM-DD, UTC).

  • is_return boolean

    true for return shipments only, false to leave them out.

  • archived boolean

    true for the Archived list. Archived shipments are left out otherwise.

  • source string

    Only shipments from this source: manual, csv, xlsx, api or a store platform such as shopify.

  • search string

    Matches order number, tracking number, or the recipient's name, company or city.

Response in data

  • ids • Required array of uuids
  • total • Required integer
GET /v1/shipments/ids
curl "https://api.parcelhub.ca/v1/shipments/ids" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "ids": [
      "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
    ],
    "total": 1
  },
  "request_id": "01JBX7Q2…"
}