Non-Contract Shipping
Get Non-Contract Shipment – REST
Summary
Name: | Get Non-Contract Shipment |
---|---|
Reason to Call: | This call is used to get the links related to a shipment such as the artifact (label), details or receipt. |
Input: | Invoke the link returned from a prior call indentified by the rel="ncShipment". |
Output: | The shipment tracking PIN, and links to the shipment artifacts (labels). The shipment status is also provided. |
Typical Prior Call: | Get Non-Contract Shipments |
Typical Next Call: | Get Artifact |
Version history: | Release notes |
Request Details
Request – Structure for Get Non-Contract Shipment
Endpoint
Invoke the link from one of these prior calls:
Create Non-Contract Shipment where rel="self"
Get Non-Contract Shipments where rel="ncShipment"
POST https://XX/rs/{mailed by customer}/ncshipment/{shipment-id} |
|
---|---|
Replace... | With... |
XX (Development) |
ct.soa-gw.canadapost.ca |
XX (Production) |
soa-gw.canadapost.ca |
{mailed by customer} |
your customer number* |
{shipment id} |
the appropriate shipment ID* |
*The system will replace {mailed by customer} with your customer number and {shipment id} with the appropriate shipment id.
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
application/vnd.cpc.ncshipment-v4+xml (Note: */* in place of the header value will return an error) |
Content-Type |
application/vnd.cpc.ncshipment-v4+xml (Note: */* in place of the header value will return an error) |
Authorization |
Basic {Base64 encoding of userid:password} |
Accept-language |
en-CA or fr-CA |
Body
none
Request – Elements
The Get Non-Contract Shipment service does not require any XML input data.
Response Details
Response – XML Elements
The Get Non-Contract Shipment response is identical to the response of the Create Non-Contract Shipment service.
Response – XML Diagram
The Get Non-Contract Shipment XML diagram is identical to the XML diagram for Create Non-Contract Shipment.
Response – Possible Error Responses
No errors are expected for invocation of this link, but you will receive a 404 error if you invoke Get Non-Contract Shipment more than 90 days after the shipment was first created.
For more information, see HTTP status codes.
Examples
Sample REST XML Request – Get Non-Contract Shipment
There is no XML related to this REST request. Use the link provided by a prior request or see the soapUI project files for request examples.
Sample REST XML Response – Get Non-Contract Shipment
<non-contract-shipment-info>
<shipment-id>406951321983787352</shipment-id>
<tracking-pin>11111118901234</tracking-pin>
<links>
<link rel="self" href="https://XX/rs/111111111/2222222222/ncshipment/406951321983744444"media-type="application/vnd.cpc.ncshipment-v4+xml"></link>
<link rel="details" href="https://XX/rs/111111111/2222222222/ncshipment/406951321983744444/details"media-type="application/vnd.cpc.ncshipment-v4+xml"></link>
<link rel="receipt" href="https://XX/rs/111111111/2222222222/ncshipment/406951321983744444/receipt"media-type="application/vnd.cpc.ncshipment-v4+xml"></link>
<link rel="label" href="https://XX/rs/ers/artifact/76108cb5192002d5/20238/0"media-type="application/pdf"index="0"></link>
</links>
</non-contract-shipment-info>