Non-Contract Shipping

Code Samples for Non-Contract Shipping: Java (.zip) | PHP (.zip) | C# (.zip)

Request Non-Contract Shipment Refund – SOAP

Summary

Name: Request Non-Contract Shipment Refund
Reason to Call:

To request a refund for a shipment /label that you created in error. You can only request a refund for a shipment that has not been sent and has no scan events associated with the label.

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.

Input: Shipment-id and your email address.
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: Create Non-Contract Shipment, Get Non-Contract Shipments or Get Non-Contract Shipment
Typical Next Call: None
Version history: Release notes
Request Non-Contract Shipment Refund – Summary of Service

Request Non-Contract Shipment Refund – Summary of Service

Call Details

WSDL: ncshipment.wsdl
Endpoint (Development): https://ct.soa-gw.canadapost.ca/rs/soap/ncshipment/v4
Endpoint (Production): https://soa-gw.canadapost.ca/rs/soap/ncshipment/v4
Namespace: http://www.canadapost.ca/ws/soap/ncshipment/v4
Operation: RequestNonContractShipmentRefund

SOAP Body

This section describes the XML input elements to Request Non-Contract Shipment Refund. For the hierarchical structure, see the XML diagram.

Request Non-Contract Shipment Refund – Request Elements
Element Name Type Required / Optional Description

request-non-contract-shipment-refund-request

Complex

Required

The top level XML element for the request input information.

mailed-by

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

Indicates 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. Applies to e-commerce platforms only.

shipment-id

Simple

Optional

(Alphanumeric string up to 32 letters/digits)
The identification number for the shipment you are requesting a refund for.
Note: The output of Create Non-Contract Shipment, Get Non-Contract Shipment or Get Non-Contract Shipments includes a shipment-id element.

email

Simple

Required

(Character string - up to 60 characters)
Must be a valid email address, i.e. pattern of (['_A-Za-z0-9\-\+]+)(\.['_A-Za-z0-9\-\+]+)*@([A-Za-z0-9-]+)(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,5})

Request – XML Diagram

Request Non-Contract Shipment Refund – Structure of XML Request
Request Non-Contract Shipment Refund Shipment Refund – Structure of XML Request

Response Details

Response – Elements

The table below describes the XML elements in the response to Request Non-Contract Shipment Refund. For the hierarchy of the response, see the XML diagram.

Request Non-Contract Shipment Refund - Response Elements
Element Name Type Description

request-non-contract-shipment-refund-response

Complex

The top level element of the XML structure.

non-contract-shipment-refund-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

Request Non-Contract Shipment Refund – Structure of XML Response
Request Non-Contract Shipment Refund – Structure of XML Response

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
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 Error Handling and Error messages and mitigation strategies.

Sample SOAP XML Request – Request Non-Contract Shipment Refund

<request-non-contract-shipment-refund-request;>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<shipment-id>340531309186521749</shipment-id>
<email>name@example.ca</email>
</request-non-contract-shipment-refund-request>

Sample SOAP XML Response – Request Non-Contract Shipment Refund

<request-non-contract-shipment-refund-response>
<non-contract-shipment-refund-info>
<service-ticket-date>2015-01-28</service-ticket-date>
<service-ticket-id>GT12345678RT</service-ticket-id>
</non-contract-shipment-refund-info>
</request-non-contract-shipment-refund-response>