Contract Shipping

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

Get Manifests – SOAP

Summary

Name: Get Manifests
Reason to Call: To retrieve manifests within a given date range
Input:

A "start" and "end" date range

Output:

A list of manifests

Error Example: Invalid date range
Typical Prior Call: none
Typical Next Call: Get Manifest, Get Manifest Details, Get Shipments
Version history: Release notes
Get Manifests – Summary of Service

Get Manifests – Summary of Service

Call Details

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

SOAP Body

This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.

Get Manifests – Request Elements
Element Name Type Required / Optional Description

get-manifests-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 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
FR = French

If no value is provided, the default language is English.

start

simple

required

(Character string – 10 characters/digits in the form YYYY-MM-DD)

The start date of the date range.

end

simple

optional

(Character string – 10 characters/digits in the form YYYY-MM-DD)

The end date of the date range.

If the end date is not provided, it will default to the current date.

Request – XML Diagram

Get Manifests – Structure of the XML Request

Get Manifests – Structure of the XML Request

Response Details

Response – Elements

The following table describes the XML elements in the response to Get Manifests. For the hierarchy of the response, see the XML diagram.

Get Manifests – Response Elements
Element Name Type Description

get-manifests-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.

manifests

complex

The XML structure containing the results of a successful completion of the service.

manifest-id

simple

May occur 0 … N times.

An identification number representing a particular manifest. It can be used for subsequent calls to
Get Manifest, Get Manifest Details or Get Shipments.

Response – XML Diagram

Get Manifests – Structure of the XML Response

Get Manifests – Structure of the XML Response

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.

Code Message

9105

There is at least one missing parameter. Please add required parameters.

9116

The "start" date must be earlier than (or the same as) the "end" date.

Examples

Sample SOAP XML Request – Get Manifests

<get-manifests-request>
<mailed-by>1111111</mailed-by>
<start>2011-11-10</start>
</get-manifests-request>

Sample SOAP XML Response – Get Manifests

<get-manifests-response>
<manifests>
<manifest-id>347891314723499921</manifest-id>
</manifests>
</get-manifests-response>