Pickup
Get Pickup Request Details – REST
Summary
Name: | Get Pickup Request Details |
---|---|
Reason to Call: | To get all available details for a given pickup request. |
Input: | Invoke the link returned from a prior call where the rel value = “details” |
Output: | Details of pickup request. |
Typical Prior Call: | Create Pickup Request or Get Pickup Requests |
Typical Next Call: | N/A |
Version history: | Release notes |
Request Details
Request – Structure for Get Pickup Request Details
Endpoint
Invoke the link returned from a prior call to Create Pickup Request or Get Pickup Requests where rel= “details” (see Provided endpoints)
HTTP HeadersHTTP Header Variable |
Value |
---|---|
Accept |
application/vnd.cpc.pickuprequest+xml (Note: */* in place of the header value will return an error) |
Authorization |
Basic {Base64 encoding of userid:password} |
Accept-language |
en-CA or fr-CA |
None
Request – Elements
The Get Pickup Request Details service does not require any input XML data.
Response Details
Response – Elements
The table below describes the XML fields in the response. For the hierarchy of the response, see the XML diagram.
Get Pickup Request Details – Response Elements | ||
---|---|---|
Element Name | Type | Description |
pickup-request-detailed-info |
Complex |
The top level XML element that contains the information about the pickup request. |
pickup-request-header |
Complex |
Basic information about the request. |
request-id |
Simple |
The ID number for the pickup request. |
request-status |
Simple |
Status of the request. Possible values are as follows:
|
pickup-type |
Simple |
The type of pickup you requested: OnDemand. |
request-date |
Simple |
Date the pickup request was created. |
next-pickup-date |
Simple |
Date when the next on-demand pickup was requested for. |
pickup-request-details |
Complex |
Detailed information about the request. |
pickup-location |
Complex |
Structure containing the address where the pickup is to occur. |
business-address-flag |
Simple |
True indicates that the pickup is at your business location. False indicates pickup is at a third-party location. |
alternate-address |
Complex |
Structure containing the address details for pickup at a third-party location. |
company |
Simple |
Company name of the organization requesting the pickup. |
address-line-1 |
Simple |
Street address of your pickup location |
city |
Simple |
City of pickup location. |
province |
Simple |
Province of pickup location. |
postal-code |
Simple |
Postal Code of pickup location. |
contact-info |
Complex |
Structure containing the contact for questions or inquiries. |
contact-name |
Simple |
Contact name for the pickup. |
Simple |
Email address to receive status updates regarding your pickup request. Note: If you have had a long-standing scheduled pickup arrangement in place, this element may have previously been optional. It is now required and you will need to provide it if you update your pickup request. |
|
contact-phone |
Simple |
Contact phone number for the pickup. |
telephone-ext |
Simple |
Telephone extension. |
receive-email-updates-flag |
Simple |
True indicates that you wish to receive status updates about the request. |
location-details |
Complex |
Structure containing characteristics of the physical location where pickup is to occur. |
five-ton-flag |
Simple |
True identifies that a 5-ton truck is needed. |
loading-dock-flag |
Simple |
True identifies that there is a loading dock at the location. |
pickup-instructions |
Simple |
Instructions for the driver |
items-characteristics |
Complex |
Structure to identify that items for pickup have special processing needs. Only applicable to on-demand pickups. |
priority-flag |
Simple |
Identifies that Priority items could be available for pickup. |
returns-flag |
Simple |
{true, false} |
heavy-item-flag |
Simple |
Identifies that some the items to pick up may have a weight greater than 23 kg (50 lbs.) |
pickup-volume |
Simple |
(Character string up to 40 characters) |
pickup-times |
Complex |
Structure containing the date and time range in which the pickup is to be done. |
on-demand-pickup-time |
Complex |
Structure containing the details for an on-demand pickup request. |
date |
Simple |
Date you would like the on-demand pickup. |
preferred-time |
Simple |
The preferred time for the on-demand pickup. |
closing-time |
Simple |
The latest time for the on-demand pickup. |
scheduled-pickup-times |
Complex |
Not used. Request a scheduled pickup using our online tool. |
Response – XML Diagram
Response – Possible Error Responses
No errors are expected for invocation of this link, but you will receive a 404 error if you invoke Get Pickup Request Details more than 90 days after the link was provided.
Code | Description |
---|---|
11005 |
Customer number not valid. Please correct or contact Canada Post for details. |
11012 |
Request ID not found. Please verify. |
See also HTTP status codes and Error messages and mitigation strategies.
Examples
Sample REST XML Request – Get Pickup Request Details
GET https://ENV/enab/1234567/pickuprequest/1212121212/details
Accept application/vnd.cpc.pickuprequest+xml
Authorization:Basic s7HD7gwsennesc==
Sample REST XML Response – Get Pickup Request Details
<pickup-request-detailed-info>
<pickup-request-header>
<request-id>0074698052</request-id>
<request-status>Active</request-status>
<pickup-type>OnDemand</pickup-type>
<request-date>2015-01-01</request-date>
</pickup-request-header>
<pickup-request-details>
<pickup-location>
<business-address-flag>false</business-address-flag>
<alternate-address>
<company>Jim Duggan</company>
<address-line-1>2271 Herring Cove</address-line-1>
<city>Halifax</city><province>NS</province>
<postal-code>B3L2C2</postal-code>
</alternate-address>
</pickup-location>
<contact-info>
<contact-name>John Doe</contact-name>
<email>john.doe@canadapost.ca</email>
<contact-phone>800-555-1212</contact-phone>
<receive-email-updates-flag>true</receive-email-updates-flag>
</contact-info>
<location-details>
<five-ton-flag>false</five-ton-flag>
<loading-dock-flag>true</loading-dock-flag>
<pickup-instructions>Door at Back</pickup-instructions>
</location-details>
<items-characteristics>
<pww-flag>true</pww-flag>
<priority-flag>false</priority-flag>
<returns-flag>true</returns-flag>
<heavy-item-flag>true</heavy-item-flag>
<items-characteristics>
<pickup-volume>50</pickup-volume>
<pickup-times>
<on-demand-pickup-time>
<date>2015-01-28</date>
<preferred-time>15:00</preferred-time>
<closing-time>17:00</closing-time>
</on-demand-pickup-time>
</pickup-times>
</pickup-request-details>
</pickup-request-detailed-info>