Contract Shipping

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

Get Manifest – SOAP

Summary

Name:

Get Manifest Artifact ID

Reason to Call:

A mandatory call that must be made to create a manifest. You need a successful response from Get Manifest to confirm that a manifest has been successfully created. The response will include an artifact-id number that allows you to retrieve the manifest by a call to Get Artifact.

Input:

Mailed-by; manifest-id; locale (optional)

Output:

po-number and the artifact-id for the manifest label.

Error Example:

Invalid pointer to a manifest

Typical Prior Call:

Transmit Shipments, Get Manifests

Typical Next Call:

Get Artifact

Version history: Release notes
Get Manifest Artifact ID – Summary of Service

Get Manifest Artifact ID – 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: GetManifestArtifactId

SOAP Body

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

Get Manifest Artifact ID – Request Elements
Element Name Type Required / Optional Description

get-manifest-artifact-id-request

complex

required

The top level XML element for the request input information.

manifest-id

simple

required

(Alphanumeric String – up to 32 letters/digits)

An identification number representing the existing manifest for which information is being requested.

Note: Retrieve the manifest-id provided by previous calls to Transmit Shipments or Get Manifests. The output of those services will include a shipment-id element.

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.

Request – XML Diagram

Get Manifest Artifact ID – Structure of the XML Request

Get Manifest Artifact ID – Structure of the XML Request

Response Details

Response – Elements

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

Get Manifest Artifact ID – Response Elements
Element Name Type Description

get-manifest-artifact-id-response

complex

The top level XML element for the response.

It will either contain the results of a successful completion, or the error structure.

manifest

complex

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

customer-request-id

Simple

For Future Use.

po-number

simple

The purchase order number for the manifestt, except for an empty manifest where it is always set to EMPTY. (See Transmit Shipments for details).

artifact-id

simple

A unique identifier for the label (artifact) required as part of a request to Get Artifact to retrieve the label.

Response – XML Diagram

Get Manifest Artifact ID – Structure of the XML Response

Get Manifest Artifact ID – 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
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.
1653 Method of payment Account is not available. Please select another method of payment.
9153 The transmit process has not completed yet. Please try again later.
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 SOAP XML Request – Get Manifest Artifact ID

<get-manifest-artifact-id-request>
<mailed-by>1111111</mailed-by>
<manifest-id>347891314723499921</manifest-id>
</get-manifest-artifact-id-request>

Sample SOAP XML Response – Get Manifest Artifact ID

<Body>
<get-manifest-artifact-id-response>
<manifest>
<po-number>P906367477</po-number>
<artifact-id>444</artifact-id>
</manifest>
</get-manifest-artifact-id-response>
</Body>