Code Samples – REST

Get code samples for Canada Post web services APIs. Download all the code samples in your language of choice, or just the ones for select web services.

number

Read Getting Started to find out how to sign up, get your API keys and more.

number

For essential information common to all our web services, read the Fundamentals of Canada Post Web Services:  REST  |  SOAP

Java code samples

Service Description

All Canada Post Web services

Download the code samples for all web services.

Ratings web service

Find out what shipping services are available and how much they cost.

Contract Shipping web service

Create shipments (for Canada Post commercial customers).

Non-Contract Shipping web service

Create shipments (for Canada Post general business and VentureOne™ customers).

Tracking web service

Track a parcel and confirm its delivery.

Find a Post Office web service

Get a list of Post Offices near a given location.

Pickup web service

Request parcel pickups.

Returns web service

Create shipping labels for authorized and open returns.

Merchant registration web service

For e-commerce platforms registering merchants for Canada Post shipping.

Service Info web service

Discover and display information about scheduled web service outages.

PHP code samples

Service Description

All Canada Post Web services

Download the code samples for all web services.

Ratings web service

Find out what shipping services are available and how much they cost.

Contract Shipping web service

Create shipments (for Canada Post commercial customers).

Non-Contract Shipping web service

Create shipments (for Canada Post general business and VentureOne™ customers).

Tracking web service

Track a parcel and confirm its delivery.

Find a Post Office web service

Get a list of Post Offices near a given location.

Pickup web service

Request parcel pickups.

Returns web service

Create shipping labels for authorized and open returns.

Merchant registration web service

For e-commerce platforms registering merchants for Canada Post shipping.

Service Info web service

Discover and display information about scheduled web service outages.

C# code samples

Service Description

All Canada Post Web services

Download the code samples for all web services.

Ratings web service

Find out what shipping services are available and how much they cost.

Contract Shipping web service

Create shipments (for Canada Post commercial customers).

Non-Contract Shipping web service

Create shipments (for Canada Post general business and VentureOne™ customers).

Tracking web service

Track a parcel and confirm its delivery.

Find a Post Office web service

Get a list of Post Offices near a given location.

Pickup web service

Request parcel pickups.

Returns web service

Create shipping labels for authorized and open returns.

Merchant registration web service

For e-commerce platforms registering merchants for Canada Post shipping.

Service Info web service

Discover and display information about scheduled web service outages.