Deliver to Post Office Part 5: How to create a Deliver to Post Office shipping label using web services

Posted on March 05, 2014 by @ship_cpc in Shipping Solutions

This post, part of our series on Deliver to Post Office, shows e-commerce merchants who use a web service-based shipping system how to create Deliver to Post Office shipping labels.

In part 3 of this series, we described how to display valid Deliver to Post Office locations in your checkout. The focus of this post describes the next step in the process: how to add these details to your Create Shipment web service call and create a shipping label.

How to identify a Deliver to Post Office shipment in your Create Shipment request

The web service called Create Shipment is where you specify all the details about your shopper’s parcel, including identifying it as a Deliver to Post Office shipment. If you use non-contract shipping, use the Create Non-Contract Shipment web service instead.

Create Shipment includes request elements specifically related to Deliver to Post Office, which are listed and described in detail below.  For the full list of fields required for a Create Shipment request, refer to Contract Shipping or Non-Contract Shipping documentation.

Destination request elements

DTPO

See the full Create Shipment XML diagram: REST | SOAP.

Deliver to Post Office-related request element Description Why we need this information
Under destination:

 

  • name
  • client-voice-number
  • address-details
    • address-line-1
    • city
    • prov-state
    • country-code
    • postal-zip-code
Your shopper’s contact information.The address-details structure must contain the shopper’s address.

 

Do NOT use the address-details structure to provide the address of the selected post office.

To verify shoppers’ identity when they pick up their parcel.Their name and address must match what appears on the government-issued ID they present.

 

If shoppers do not pick up their parcel after 5 days, they will receive a voice message reminder.

Notification request elements

DTPO

See the full Create Shipment XML diagram: REST | SOAP.

Deliver to Post Office-related request element Description Why we need this information
Under notification:

 

  • email
  • on-shipment
  • on-exception
  • on-delivery

 

  • Enter the shopper’s email address in the email field.
  • Set on-delivery to true.
  • Set on-shipment and on-exception to true or false.
A barcode scan at the destination post office triggers an email to shoppers indicating that their item is ready for pickup.

Option request elements

DTPO

See the full Create Shipment XML diagram: REST | SOAP.

Deliver to Post Office-related request element Description Why we need this information
Under option

 

  • option-qualifier-2
  • option-code
In option-qualifier-2 enter the office-id of the destination post office. E.g., 0000102978
Note: leading zeroes are significant and must be included.In option-code enter D2PO
Note: the last character is the letter ‘O’ not a zero.
We use the office-id of the post office to look up the address and include it on the shipping label. There is no need for you to provide the address of the post office.

 

The option-code D2PO identifies the parcel as a Deliver to Post Office item. It is necessary to produce the correct shipping label.

View a sample Create Shipment request

Print your shipping label

Follow the standard procedure to print your shipping label:

  • Submit your Create Shipment request.
  • Make a call to Get Artifact to retrieve and print your shipping label. It will resemble the one shown below:

Deliver to Post Office shipping label

DTPO

 

Note: After you print your shipping label, perform a Transmit Shipments web service call followed by calls to Get Manifest and Get Artifact to retrieve and print your manifest to provide to Canada Post at pickup or drop-off time.

By correctly including in your Create Shipment request the elements listed above, you are playing a crucial role in ensuring that parcels are successfully delivered.

Part 1: Why offering more delivery options gives your e-commerce site a competitive edge
Part 2: How to implement Deliver to Post Office on your e-commerce site
Part 3: How to display valid Deliver to Post Office locations in your checkout
Part 4: How to create a Deliver to Post Office shipping label in EST 2.0
Part 5: How to create a Deliver to Post Office shipping label using web services
Part 6: How to create Deliver to Post Office shipping labels if you are a shipping system provider

Ask questions and share ideas in the Developer Program discussion forum

Looking for more tips and ideas? Join our Developer Program and enjoy full access to our discussion forum. Post questions and get answers in real-time from other members of the Developer Program and from Canada Post technical staff. Learn more.

Archive

Contact

Contact us about our e-commerce solutions for your business.

Contact Us

Or call:

1 (866) 282-7173

Mon – Fri (9 a.m. – 5 p.m. EST)

Developer Program

Integrate our web services directly into your e-commerce platform, website or custom applications using our APIs.

Join Now FREE