Pickup

Get Pickup Requests – SOAP

Summary

Name: Get Pickup Requests
Reason to Call: To retrieve information about existing open pickup requests
Input: No XML input data required
Output: Request ID, status and dates for all open pickup requests
Version history: Release notes
Get Pickup Requests – Summary of Service

Get Pickup Requests – Summary of Service

Call Details

WSDL: shipment.wsdl
Endpoint (Development): https://ct.soa-gw.canadapost.ca/enab/soap/pickup
Endpoint (Production): https://soa-gw.canadapost.ca/enab/soap/pickup
Namespace: http://www.canadapost.ca/ws/pickuprequest
Operation: GetPickupRequests

SOAP Body

This section describes the XML input elements to Get Pickup Requests. For the hierarchical structure, see the XML diagram.

Get Pickup Requests – Request Elements
Element Name Type Required/Optional Description/Size/Format

get-pickup-requests-request

Complex

Required

The top level XML element for the request input information.

customer-number

Simple

Required

(1-10 digit numeric)
The 10-digit customer number of the mailed-by customer.
If the number provided has fewer than 10 digits, the system will add leading zeroes.

locale

Simple

Optional

Your language preference for receiving error messages.
EN = English
FR = French
If no value is provided, the default language is English.

platform-id

Simple

Optional

Customer number of the platform. For e-commerce platforms only.

Request – XML Diagram

Get Pickup Requests – Structure of the XML Request

Get Pickup Requests – Structure of the XML Request

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 Requests – Response Elements
Element Name Type Description

get-pickup-requests-response

Complex

The XML structure that contains the information about the pickup request. It will either contain the results of a successful completion or the error message structure.

pickup-requests

complex

Structure returned on a successful completion.

pickup-request

complex

The top level structure for each pickup request. All open/active requests plus recent history (up to 20 pickups) will be returned.

pickup-request-header

Complex

Structure containing basic information about the pickup request.

request-id

Simple

The ID number for the pickup request.

request-status

Simple

Status of the request; possible values are:

  • New
  • Pending
  • Cancelled
  • Active
  • Missed Pickup

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.

Response – XML Diagram

Get Pickup Requests - Structure of the XML Response
Get Pickup Requests - Structure of the XML Response

Response – Possible Error Responses

The response to error conditions for this web service follows the standard SOAP error response approach used for all Canada Post web services. For more information, see SOAP Fundamentals of Canada Post Web Services.

An HTTP return code of 404 (Not found) is returned if no pickup request is found.

Code Description

11005

Customer number not valid. Please correct or contact Canada Post for details.

See also Error messages and mitigation strategies.

Examples

Sample SOAP XML Request – Get Pickup Requests

<get-pickup-requests-request>
<customer-number>1234567</customer-number>
<locale>EN</locale>
</get-pickup-requests-request>

Sample SOAP XML Response – Get Pickup Requests

<get-pickup-requests-response>
  <pickup-requests>
    </pickup-request>
      <pickup-request-header>
        <request-id>0074698052</request-id>
        <request-status>Active</request-status>
        <pickup-type>Scheduled</pickup-type>
        <request-date>2014-09-09</request-date>
      </pickup-request-header>
    </pickup-request>
  </pickup-requests>
</get-pickup-requests-response>

Development (Sandbox) Environment XML Response – Get Pickup Requests

The response is stubbed (static) in the development environment, so you will always receive the response below, regardless of the data in your request.

<get-pickup-requests-response>
  <pickup-request>
    <pickup-request-header>
      <request-id>00110215</request-id>
      <request-status>Active</request-status>
      <pickup-type>Scheduled</pickup-type>
      <request-date>2015-01-01</request-date>
    </pickup-request-header>
  </pickup-request>
  <pickup-request>
    <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>
</get-pickup-requests-response>