Returns
Get Open Return Template – SOAP
Summary
Name: | Get Open Return Template |
---|---|
Reason to Call: | To retrieve information related to a previously created Open Return Template. Get Open Return Template is not typically used during normal operations but may be useful for recovery from a communication or other error. Note: Any template that has been depleted (i.e., all of its artifacts have been retrieved) will be deleted and will not be accessible by this service. |
Input: | template-id |
Output: | The output of Get Open Return Template is identical to that of Create Open Return Template. |
Typical Next Call: | Retrieve Next Open Return Artifact. |
Version history: | Release notes |
Call Details
WSDL: | openreturn.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/return |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/return |
Namespace: | http://www.canadapost.ca/ws/soap/return |
Operation: | GetOpenReturnTemplate |
SOAP Body
This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.
Get Open Return Template – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-open-return-template-request |
complex |
required |
The top level element for the request. |
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 zeros. |
mobo |
simple |
optional |
(1-10 digit numeric) The 10-digit customer number of the mailed-on-behalf-of customer. If this element is missing, it will default to the mailed-by customer number. If the number provided has fewer than 10 digits, the system will add leading zeros. |
locale |
simple |
optional |
Indicates your language preference for receiving error messages. EN = English If no value is provided, the default language is English. |
template-id |
simple |
required |
The identifier of the previously created template for which the artifact is being retrieved. |
Request – XML Diagram
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Open Return Template. For the hierarchy of the response, see the XML diagram.
Get Open Return Template – Response Elements | ||
---|---|---|
Element Name | Type | Description |
get-open-return-template-response |
complex |
The top level XML element for the response. It will either contain the results of a successful completion or the error message structure. |
open-return |
complex |
This structure contains the results of a successful completion of the service. |
artifacts-remaining |
simple |
The number of artifacts remaining that can be drawn down. It is initially set to the number of labels in the request. |
template-id |
simple |
An identification number representing the template that was just created. |
Response – XML Diagram
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.
Possible error messages for this service include the following:
HTTP Status Code | Application Error | Message |
---|---|---|
500 | N/A | Detailed schema validation error is provided. |
Examples
Sample SOAP XML Request – Get Open Return Template
<get-open-return-template-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<template-id>349641323786705649</template-id>
</get-open-return-template-request>
Sample SOAP XML Response – Get Open Return Template
<get-open-return-template-response>
<open-return-info>
<artifacts-remaining>10</artifacts-remaining>
<template-id>349641323786705649</template-id>
</open-return-info>
</get-open-return-template-response>