Contract Shipping
Request Shipment Refund – SOAP
Summary
Name: | Request Shipment Refund |
---|---|
Reason to Call: | To request a refund for a shipment that has been transmitted. Making this call indicates that the shipping label is spoiled and will not be used. Please note that before we issue a refund we will verify that the request is valid—for example, by ensuring that the label has not been used. If you want to cancel an entire manifest, please read about how to request a refund of an entire manifest or several shipments from a manifest. |
Input: | Your email address and the link returned from a prior call to Get Shipment or Get Shipments where rel=”refund” |
Output: | A service ticket ID |
Error Example: | A refund request has already been submitted for this shipment. Refunds take a few days to be processed. |
Typical Prior Call: | Get Shipments or Get Shipment |
Typical Next Call: | None |
Version history: | Release notes |
Call Details
WSDL: | shipment.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/shipment/v8 |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/shipment/v8 |
Namespace: | http://www.canadapost.ca/ws/soap/shipment/v8 |
Operation: | RequestRefundShipment |
SOAP Body
Request – Elements
This section describes the XML input elements to Request Shipment Refund. For the hierarchical structure, see the XML diagram.
Request Shipment Refund – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
request-shipment-refund-request |
Complex |
Required |
The overall XML structure for the request input information. |
mailed-by |
Simple |
Required |
(1-10 digit numeric) |
mobo |
Simple |
Optional |
(1 to 10 digit numeric) |
locale |
Simple |
Optional |
Indicates your language preference for receiving error messages. EN = English If no value is provided, the default language is English. |
platform-id |
Simple |
Optional |
Customer number of the platform. Applies to e-commerce platforms only. |
shipment-id |
Simple |
Optional |
(Alphanumeric string up to 32 letters/digits) |
Simple |
Required |
(Character string - up to 60 characters) |
Request – XML Diagram
Response Details
Response – Elements
The table below describes the XML elements in the response to Request Shipment Refund. For the hierarchy of the response, see the XML diagram.
Request Shipment Refund - Response Elements | ||
---|---|---|
Element Name | Type | Description |
request-shipment-refund-response |
Complex |
The top level element of the XML structure. |
shipment-refund-request-info |
Complex |
The structure containing the service ticket information. |
service-ticket-date |
Simple |
Date when the refund request was submitted. |
service-ticket-id |
Simple |
The service ticket ID number for your refund request. Please use this number in any communications with Canada Post regarding this refund request. Note: In the sandbox (development) environment, the same test value (0123456789) is always returned. |
Response – XML Diagram
Response – Possible Error Responses
An http return code of 404 (Not found) will be returned if the shipment ID is incorrect. Other possible error responses include the following:
Code | Description |
---|---|
7291 | Shipment has not been transmitted; you must use Void Shipment. |
7292 | A refund request has already been submitted for this shipment. Refunds take a few days to be processed. |
7296 | The request could not be completed. You can try again later. |
See also HTTP status codes and Error messages and mitigation strategies.
Examples
Sample SOAP XML Request – Request Shipment Refund
<request-shipment-refund-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<shipment-id>340531309186521749</shipment-id>
<email>name@example.ca</email>
</request-shipment-refund-request>
Sample SOAP XML Response – Request Shipment Refund
<request-shipment-refund-response>
<shipment-refund-request-info>
<service-ticket-date>2015-01-28</service-ticket-date>
<service-ticket-id>GT12345678RT</service-ticket-id>
</shipment-refund-request-info>
</request-shipment-refund-response>