API reference

Billing

Invoices (charges billed later, such as carrier adjustments) and receipts.

List invoices

GET /v1/invoices

Charges billed after the fact, such as a carrier's weight or size adjustment. These may be unpaid.

Response in data

  • items • Required array of objects
    Each item · 21
    • billing_status • Required string
    • carrier • Required string

      Carrier code, as returned with each rate.

    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • currency_code • Required string
    • discount_amount_cents • Required integer
    • duties_cents • Required integer

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

    • id • Required uuid
    • invoice_number • Required string
    • invoice_type • Required string
    • refund_amount_cents • Required integer
    • service • Required string
    • status • Required string
    • subtotal_cents • Required integer
    • tax_cents • Required integer

      Sales tax, in cents.

    • total_cents • Required integer

      Total, in cents.

    • invoice_for string
    • refund_reason string
    • refunded_at timestamp
    • shipment_id uuid
    • tax_type string
    • wallet_transaction_id uuid
GET /v1/invoices
curl "https://api.parcelhub.ca/v1/invoices" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "billing_status": "string",
        "carrier": "ups",
        "created_at": "2026-10-31T15:04:05Z",
        "currency_code": "CAD",
        "discount_amount_cents": 1299,
        "duties_cents": 1299,
        "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "invoice_for": "string",
        "invoice_number": "string",
        "invoice_type": "string",
        "refund_amount_cents": 1299,
        "refund_reason": "string",
        "refunded_at": "2026-10-31T15:04:05Z",
        "service": "string",
        "shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "status": "string",
        "subtotal_cents": 1299,
        "tax_cents": 1299,
        "tax_type": "string",
        "total_cents": 1299,
        "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
      }
    ]
  },
  "request_id": "01JBX7Q2…"
}

Get an invoice

GET /v1/invoices/{id}

One invoice with its line items.

Path parameters

  • id • Required string

Response in data

  • billing_status • Required string
  • carrier • Required string

    Carrier code, as returned with each rate.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency_code • Required string
  • discount_amount_cents • Required integer
  • duties_cents • Required integer

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

  • id • Required uuid
  • invoice_number • Required string
  • invoice_type • Required string
  • refund_amount_cents • Required integer
  • service • Required string
  • status • Required string
  • subtotal_cents • Required integer
  • tax_cents • Required integer

    Sales tax, in cents.

  • total_cents • Required integer

    Total, in cents.

  • invoice_for string
  • refund_reason string
  • refunded_at timestamp
  • shipment_id uuid
  • tax_type string
  • wallet_transaction_id uuid
GET /v1/invoices/{id}
curl "https://api.parcelhub.ca/v1/invoices/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "billing_status": "string",
    "carrier": "ups",
    "created_at": "2026-10-31T15:04:05Z",
    "currency_code": "CAD",
    "discount_amount_cents": 1299,
    "duties_cents": 1299,
    "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "invoice_for": "string",
    "invoice_number": "string",
    "invoice_type": "string",
    "refund_amount_cents": 1299,
    "refund_reason": "string",
    "refunded_at": "2026-10-31T15:04:05Z",
    "service": "string",
    "shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "status": "string",
    "subtotal_cents": 1299,
    "tax_cents": 1299,
    "tax_type": "string",
    "total_cents": 1299,
    "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
  },
  "request_id": "01JBX7Q2…"
}

Pay an invoice

POST /v1/invoices/{id}/pay

Charges the account's wallet.

Pays an unpaid invoice from the wallet. Returns 409 (error.message is insufficient_funds) when the balance does not cover it.

Confirm with the account owner before calling it.

Path parameters

  • id • Required string

Response in data

  • invoice • Required object
    Fields · 21
    • billing_status • Required string
    • carrier • Required string

      Carrier code, as returned with each rate.

    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • currency_code • Required string
    • discount_amount_cents • Required integer
    • duties_cents • Required integer

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

    • id • Required uuid
    • invoice_number • Required string
    • invoice_type • Required string
    • refund_amount_cents • Required integer
    • service • Required string
    • status • Required string
    • subtotal_cents • Required integer
    • tax_cents • Required integer

      Sales tax, in cents.

    • total_cents • Required integer

      Total, in cents.

    • invoice_for string
    • refund_reason string
    • refunded_at timestamp
    • shipment_id uuid
    • tax_type string
    • wallet_transaction_id uuid
  • new_available_cents • Required integer
  • wallet_transaction_id • Required uuid
POST /v1/invoices/{id}/pay
curl -X POST "https://api.parcelhub.ca/v1/invoices/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/pay" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "invoice": {
      "billing_status": "string",
      "carrier": "ups",
      "created_at": "2026-10-31T15:04:05Z",
      "currency_code": "CAD",
      "discount_amount_cents": 1299,
      "duties_cents": 1299,
      "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
      "invoice_for": "string",
      "invoice_number": "string",
      "invoice_type": "string",
      "refund_amount_cents": 1299,
      "refund_reason": "string",
      "refunded_at": "2026-10-31T15:04:05Z",
      "service": "string",
      "shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
      "status": "string",
      "subtotal_cents": 1299,
      "tax_cents": 1299,
      "tax_type": "string",
      "total_cents": 1299,
      "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
    },
    "new_available_cents": 1299,
    "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
  },
  "request_id": "01JBX7Q2…"
}

Download an invoice

GET /v1/invoices/{id}/pdf

A short-lived download link for the invoice or receipt PDF.

Path parameters

  • id • Required string

Response in data

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

List receipts

GET /v1/receipts

Settled top-ups, label purchases and refunds.

Response in data

  • items • Required array of objects
    Each item · 21
    • billing_status • Required string
    • carrier • Required string

      Carrier code, as returned with each rate.

    • created_at • Required timestamp

      When it was created (ISO 8601, UTC).

    • currency_code • Required string
    • discount_amount_cents • Required integer
    • duties_cents • Required integer

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

    • id • Required uuid
    • invoice_number • Required string
    • invoice_type • Required string
    • refund_amount_cents • Required integer
    • service • Required string
    • status • Required string
    • subtotal_cents • Required integer
    • tax_cents • Required integer

      Sales tax, in cents.

    • total_cents • Required integer

      Total, in cents.

    • invoice_for string
    • refund_reason string
    • refunded_at timestamp
    • shipment_id uuid
    • tax_type string
    • wallet_transaction_id uuid
GET /v1/receipts
curl "https://api.parcelhub.ca/v1/receipts" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "items": [
      {
        "billing_status": "string",
        "carrier": "ups",
        "created_at": "2026-10-31T15:04:05Z",
        "currency_code": "CAD",
        "discount_amount_cents": 1299,
        "duties_cents": 1299,
        "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "invoice_for": "string",
        "invoice_number": "string",
        "invoice_type": "string",
        "refund_amount_cents": 1299,
        "refund_reason": "string",
        "refunded_at": "2026-10-31T15:04:05Z",
        "service": "string",
        "shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
        "status": "string",
        "subtotal_cents": 1299,
        "tax_cents": 1299,
        "tax_type": "string",
        "total_cents": 1299,
        "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
      }
    ]
  },
  "request_id": "01JBX7Q2…"
}

Get a receipt

GET /v1/receipts/{id}

One receipt with its line items.

Path parameters

  • id • Required string

Response in data

  • billing_status • Required string
  • carrier • Required string

    Carrier code, as returned with each rate.

  • created_at • Required timestamp

    When it was created (ISO 8601, UTC).

  • currency_code • Required string
  • discount_amount_cents • Required integer
  • duties_cents • Required integer

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

  • id • Required uuid
  • invoice_number • Required string
  • invoice_type • Required string
  • refund_amount_cents • Required integer
  • service • Required string
  • status • Required string
  • subtotal_cents • Required integer
  • tax_cents • Required integer

    Sales tax, in cents.

  • total_cents • Required integer

    Total, in cents.

  • invoice_for string
  • refund_reason string
  • refunded_at timestamp
  • shipment_id uuid
  • tax_type string
  • wallet_transaction_id uuid
GET /v1/receipts/{id}
curl "https://api.parcelhub.ca/v1/receipts/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "ok": true,
  "data": {
    "billing_status": "string",
    "carrier": "ups",
    "created_at": "2026-10-31T15:04:05Z",
    "currency_code": "CAD",
    "discount_amount_cents": 1299,
    "duties_cents": 1299,
    "id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "invoice_for": "string",
    "invoice_number": "string",
    "invoice_type": "string",
    "refund_amount_cents": 1299,
    "refund_reason": "string",
    "refunded_at": "2026-10-31T15:04:05Z",
    "service": "string",
    "shipment_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
    "status": "string",
    "subtotal_cents": 1299,
    "tax_cents": 1299,
    "tax_type": "string",
    "total_cents": 1299,
    "wallet_transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
  },
  "request_id": "01JBX7Q2…"
}