Contract Shipping
Get Manifest – REST
Summary
Name: | Get Manifest |
---|---|
Reason to Call: |
|
Input: |
Invoke the link(s) returned from Transmit Shipments where rel="manifest" |
Output: | The following information for the specific manifest
|
Error Example: | 404 – not found |
Typical Prior Call: | |
Typical Next Call: | |
Version history: | Release notes |
Request Details
Request – Structure for Get Manifest
EndpointInvoke the link(s) returned from a prior call where rel=”manifest” (see Provided endpoints)
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
application/vnd.cpc.manifest-v8+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 Manifest service does not require any input XML data.
Response Details
Response – Elements
The following table describes the XML fields in the response.
For a detailed view of the hierarchy of the response, see the diagram below.
Get Manifest – Detailed View of Response Elements | ||
---|---|---|
Element Name | Type | Description |
manifest |
Complex |
This is the top level of the structure. |
customer-request-id |
Simple |
For Future Use. |
po-number |
Simple |
(Alphanumeric string up to 10 letters/digits) Contained within manifest. This is the PO number for the manifest, except for an empty manifest where it is always set to EMPTY. (See Transmit Shipments for details). |
links |
Complex |
Contained within manifest. This structure contains the links to the artifacts and the details of the specific manifest. |
link |
Complex |
Contained within manifest-links. May occur 1 … N times. However, at the current time, there are four links:
Each link allows you to retrieve different information about the manifest. For a description of link attributes, see Provided endpoints.
(Note: the XML element link is "Complex" because it contains a number of attributes. The link element does not contain any sub-elements) |
Response – XML Diagram
Note: the attribute "index" of the link element pictured below is not used in the Get Manifest service.
Response – Possible Error Responses
See HTTP status codes for general information regarding error handling.
Possible "400" error messages for this service include the following.
Code | Message |
---|---|
1182 | The transaction could not be authorized. Please select another credit card or an alternate method of payment and retransmit the order. |
1185 | The transaction could not be authorized. Please select another account or an alternate method of payment and retransmit the order. |
Possible "200" error messages for this service include the following.
Code | Message |
---|---|
1653 | Method of payment Account is not available. Please select another method of payment. |
Possible "202" error messages for this service include the following.
Code | Message |
---|---|
9153 | The transmit process has not completed yet. Please try again later. |
Possible "412" error messages for this service include the following.
Code | Message |
---|---|
9154 | A system error has occurred. Please try again later. If the problem persists, please contact the Canada Post help desk. * You will receive this error if you are attempting to use Get Manifest (Artifact ID) service but the previous Transmit Shipment attempt failed. Shipments are manifested asynchronously hence the error is returned on the following request. The common cause of transmit failure is missing default credit card. |
Examples
Sample REST XML Request – Get Manifest
GET https://XX/rs/1234567/1234567/manifest/123456789012345678
Accept:application/vnd.cpc.manifest-v8+xml
Authorization:Basic s7HD7gwsennesc==
Sample REST XML Response – Get Manifest
<manifest>
<po-number>P906367941</po-number>
<links>
<link rel="self" href="https://XX/rs/111111111/222222222/manifest/33333333" media-type="application/vnd.cpc.manifest-v8+xml"></link>
<link rel="details" href="https://XX/rs/111111111/222222222/manifest/666666666/details" media-type="application/vnd.cpc.manifest-v8+xml"></link>
</links>
</manifest>