Non-Contract Shipping
Get Non-Contract Shipment – SOAP
Summary
Name: | Get Non-Contract Shipment |
---|---|
Reason to Call: | To retrieve the tracking PIN and/or the artifact IDs associated with a previously created shipment. |
Input: | shipment-id |
Output: | The shipment tracking PIN, artifact-ids and shipment status for the specified shipment. |
Typical Prior Call: | Get Non-Contract Shipments |
Typical Next Call: | Get Artifact |
Version history: | Release notes |
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: | GetNonContractShipment |
SOAP Body
This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.
Get Non-Contract Shipment – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-non-contract-shipment-request |
complex |
required |
This is 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 zeros. |
locale |
simple |
optional |
Indicates your language preference for receiving error messages. EN = English If no value is provided, the default language is English. |
shipment-id |
simple |
required |
(Alphanumeric String – up to 32 letters/digits) An identification number representing the existing shipment for which information is being requested. Note: Retrieve the shipment-id provided by previous calls to Create Non-Contract Shipment. |
Request – XML Diagram
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Non-Contract Shipment. For the hierarchy of the response, see the XML diagram.
Get Non-Contract Shipment – Response Elements | ||
---|---|---|
Element Name | Type | Description |
get-non-contract-shipment-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. |
non-contract-shipment-info |
complex |
The XML structure containing the results of a successful completion of the service. |
shipment-id |
simple |
A unique identifier for the shipment. |
shipment-status |
simple |
Indicates the current status of the shipment, which will be one of the following:
|
tracking-pin |
simple |
The tracking PIN for the shipment. It can be used as input to other web service calls such as Get Tracking Details. |
artifacts |
complex |
This structure contains a set of artifacts (labels) related to this shipment. |
artifact |
complex |
This represents an individual artifact (label) for the shipment. May occur 1 .. N times (Note: the xml element artifact is designated as "Complex" because it contains a number of attributes; it does not contain any sub-elements. This element will include an attribute type="XXX" The possible values for this attribute are as follows:
|
artifact-id |
simple |
A unique identifier for the label (artifact) that can be used in the request to Get Artifact to retrieve the label. |
page-index |
simple |
Note: This element is always zero for PDF since PDF supports multiple pages. It is not required in requests to retrieve PDF documents. |
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.
Examples
Sample SOAP XML request – Get Non-Contract Shipment
<get-non-contract-shipment-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<shipment-id>406951321983787352</shipment-id>
</get-non-contract-shipment-request>
Sample SOAP XML response – Get Non-Contract Shipment
<get-non-contract-shipment-response>
<non-contract-shipment-info>
<shipment-id>406951321983787352</shipment-id>
<tracking-pin>11111118901234</tracking-pin>
<artifacts>
<artifacttype="label">
<artifact-id>20238</artifact-id>
<page-index>0</page-index>
</artifact>
</artifacts>
</non-contract-shipment-info>
</get-non-contract-shipment-response>