Track parcels

Provide real-time status updates and visibility for every shipment

Required API products

Getting started

Before integrating our shipping APIs, make sure you complete the following prerequisites and setup steps. For a more detailed overview, refer to the QuickStart guide.

Prerequisites

Please note: To use our APIs, you must first have a valid Canada Post business account, which provides a customer number. Commercial customers typically have a formal commercial contract, which also provides a contract number and is billed to a credit account. Solutions for Small Business™ customers can access the API using their small business account number. Returns services are generally billed to the credit card on file in your profile or business account.

Once you have an account, here are the next steps to use the API:

  1. Create a canadapost.ca user ID.
  2. Join the Canada Post Developer Portal.
  3. Get your production and test API credentials (API Key and API Secret).

API endpoints

Production environment

https://api.canadapost-postescanada.ca/prod/devportal-portaildesdeveloppeurs /tracking/v1/pins/{pinNumber}/summaries

Required headers

Header nameRequired statusDescription/Purpose
Content-Type

Mandatory

Example value/Format

Unique per service group. Refer to API documentation for details.

This is the JSON version of the body you’re sending in the POST.

Please note: */* in place of the header value will return an error.

Accept

Mandatory

Example value/Format

Unique per service group. Refer to API documentation for details or use "media-type" from the provided link returned in the response.

This is the JSON version of the response you’re expecting to receive.

Please note: */* in place of the header value will return an error.

Authorization

Mandatory

Example value/Format

Bearer

Carries the access token to authenticate the request.

Details:

  • The word Bearer is a literal value that must be present.
  • The value of the token is an output of the authorization service call preceding the actual resource service call (for example, Rating/Tracking/Shipping.)
  • You must refresh the token when it expires (see the Authentication guide for full details.)
Accept-Language

Optional

Example value/Format

"en-CA" or "fr-CA"

This indicates the preferred language for any human-readable error messages that may be generated.

Available tracking services

We offer both domestic and international tracking services. Below is a categorized list of commonly supported services, including the service codes required for all API requests.

Domestic services

(within Canada)

Service nameAPI service codeBenefits
Regular Parcel™DOM.RPCost-effective ground shipping.
Expedited Parcel™DOM.EPFaster delivery with tracking.
Xpresspost™DOM.XPGuaranteed next-day or 2-day delivery in major urban centres.
Priority™DOM.PCFastest delivery option with tracking and signature.
Library MaterialsDOM.LIBSpecial, economical service for shipping library materials (books, and so on).

Services to the U.S.

(shipping to the United States)

Service nameAPI service codeBenefits
Expedited Parcel™ – USAUSA.EPDelivery in as little as 4 business days for larger parcels. Tracking included.
Xpresspost™ – USAUSA.XPDelivery in 2 to 3 business days. Guaranteed service with tracking.
Tracked Packet™ – USAUSA.TPCost-effective option for small and lightweight items. Includes tracking.

International services

Service nameAPI service codeBenefits
Xpresspost™ – InternationalINT.XPGuaranteed, fast delivery in as little as 4 business days to major markets. Includes tracking.
Tracked Packet™ – InternationalINT.TPCost-effective option for small and lightweight items to select countries. Includes tracking.
International Parcel – AirINT.IP.AIRStandard air service for larger parcels. Includes tracking for many destinations. Tracking information available only for events within Canada.
International Parcel – SurfaceINT.IP.SURFStandard ground/sea service for larger parcels. Long transit times (1 to 3 months). Tracking information available only for events within Canada.

Sample requests

Search by Tracking ID details

GET https://api-stg.canadapost-postescanada.ca/prod/devportal-portaildesdeveloppeurs/tracking/v1/pins/{PIN}/details

Search by Delivery Notice Card details

GET https://api-stg.canadapost-postescanada.ca/prod/devportal-portaildesdeveloppeurs/tracking/v1/dncs/{DNC}/details

Search by Reference Number details

GET https://api.canadapost-postescanada.ca/prod/devportal-portaildesdeveloppeurs/tracking/v1/refs/summaries?customer-number={customerNumber}&reference-number=ABC123456789&destination-postal-code=M9W1J1&mailing-date-from=2026-02-25&mailing-date-to=2026-02-26

Use cases

The following are typical scenarios that customers might encounter when integrating with our Tracking API. Each use case is further illustrated using a call diagram, giving further clarity on the flow of data or requests and the parameters needed to make these calls.

Tracking and customer pickup

  1. Use the Get Tracking Summary and Get Tracking Details calls to allow customers to track orders from your store.
  2. Use the Get Delivery Confirmation Certificate call to allow customer service staff to view delivery confirmation certificates.

Example 1

Track orders from your website

Calls to Get Tracking Summary and Get Tracking Details allow customers to track their orders directly from your website.

A flowchart that illustrates the typical flow of interactions between a customer application and the Canada Post API for tracking packages. A text description of the flowchart is available on the page.

The flowchart illustrates the typical flow of interactions between a customer application and the Canada Post API for tracking packages. The customer application sends a tracking number to the API which returns this data to the application, displays the most recent tracking event, and all subsequent delivery details.

View larger image

Example 2

View delivery confirmation certificate

Your customer service staff can get the same tracking information as described in the Track orders from your website process. They can also view the delivery confirmation certificate.

A flowchart that illustrates the method for confirming package delivery using a delivery confirmation certificate. A text description of the flowchart is available on the page.

This flowchart illustrates the method for confirming package delivery using a delivery confirmation certificate. The app obtains a package PIN, requests the delivery confirmation certificate from the Canada Post API, and then retrieves and displays the PDF certificate as proof of delivery.

View larger image

Testing and troubleshooting

Developers must decide when to expose an error message directly to the end-user versus implementing a mitigation strategy to prevent the error.

Common errors and how to fix them

Before troubleshooting, review our list of common errors and their codes. Each entry includes the specific HTTP status code and the recommended mitigation action.

Example: A 9112 error ("Service not available") may indicate a configuration problem. The mitigation is to check the available services for the selected origin or destination.

API error response structure

API error responses typically return a 400 Bad Request (for input validation errors) or a 500 Internal Server Error (for unexpected issues). The response body will contain a structured error object with the following key elements:

  • code: The specific alphanumeric error code (for example, 9111).
  • message: A plain text description of the error.

Developer support

If you've implemented the recommended mitigation strategies and are still experiencing issues, please contact our developer support team.

Related links