Pickup

Cancel Pickup Request – SOAP

Summary

Name: Cancel Pickup Request
Reason to Call:

To cancel an existing pickup request

Important: To modify a pickup request, ensure you use the Update Pickup Request web service. If you accidentally cancel an on-demand pickup request at your default business address, you will not be able to recreate another request in that same timeslot again.

Input: Request ID
Output: Success flag
Typical Prior Call: Get Pickup Requests
Version history: Release notes
Cancel Pickup Request – Summary of Service

Cancel Pickup Request – Summary of Service

Call Details

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

SOAP Body

This section describes the XML input elements to Cancel Pickups. For the hierarchical structure, see the XML diagram.

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

cancel-pickup-request-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-id

Simple

Required

(35 alphanumeric)

Unique identifier for the request.

Request – XML Diagram

Cancel Pickup Request – Structure of the XML Request

Cancel Pickup Request – 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.

Cancel Pickup Request – Response Elements
Element Name Type Description

cancel-pickup-request-response

Complex

The overall XML structure.

cancel-pickup-success

Simple

True | False

A flag to indicate success of the operation.

Response – XML Diagram

Cancel Pickup Request - Structure of the XML Response

Cancel Pickup Request - 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.

You will receive a 404 error if the request-id is not valid (for example, if the pickup request has been cancelled).

Code Description

11004

Pickup cannot be cancelled as time has already past.

11005

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

11012

Request ID not found. Please verify.

See also Error messages and mitigation strategies.

Examples

Sample SOAP XML Request – Cancel Pickup Request

    <cancel-pickup-request-request> 
      <customer-number>1234567</customer-number> 
      <locale>EN</locale> 
      <request-id>0074698052</request-id> 
    </cancel-pickup-request-request>
    

Sample SOAP XML Response – Cancel Pickup Request

      <cancel-pickup-request-response>
        <cancel-pickup-success>True</cancel-pickup-success>
      </cancel-pickup-request-response>
    

XML Response – Sandbox (Development) Environment

The response is stubbed (static) in the development environment; you will always receive a successful response if you use one of the test request-ids (00110215 or 0074698052), and an error otherwise.