Contract Shipping
Get Shipment Receipt – SOAP
Summary
Name: | Get Shipment Receipt |
---|---|
Reason to Call: | Used to get settlement information in XML format for a shipment where no manifest is required that was paid by credit card or Supplier Account. The data in the response can be formatted to print a receipt. |
Input: | Mailed-by; shipment-id; locale (optional) |
Output: | The credit card or Supplier Account authorization details in XML format. |
Error Example: | Not found (which can also happen if shipment was not paid by credit card). |
Typical Prior Call: | Create Shipment or Get Shipment |
Typical Next Call: | Create Shipment (to continue creating shipments) |
Optional Next Call: | Get Artifact or Get Shipment Details (if those services have not already been called) |
Version history: | Release notes |
Call Details
WSDL: | shipment.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/shipment/v8 |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/shipment/v8 |
Namespace: | http://www.canadapost.ca/ws/soap/shipment/v8 |
Operation: | GetShipmentReceipt |
SOAP Body
This section describes the XML input elements to this service.
Get Shipment Receipt – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-shipment-receipt-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 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 Shipment or Get Shipment. The output of those services will include a shipment-id element. |
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Shipment Receipt.
Get Shipment Receipt – Response Elements | ||
---|---|---|
Element Name | Type | Description |
get-shipment-receipt-response |
Complex |
The top level XML element for the response. It will either contain the results of a successful completion, or the error structure. |
shipment-receipt |
Complex |
The XML structure for the receipt details. |
cc-receipt-details |
Complex |
This structure contains details required for a credit card receipt. |
merchant-name |
Simple |
Will have the value: "Canada Post" |
merchant-url |
Simple |
Will have the value: "www.canadapost.ca" |
name-on-card |
Simple |
The name on the default credit card stored by Canada Post. |
auth-code |
Simple |
The authorization code received from the credit card issuer. |
auth-timestamp |
Simple |
The date and time that the credit card company authorized the transaction. |
card-type |
Simple |
The type of credit card used for the purchase. |
charge-amount |
Simple |
The total amount charged to the credit card. |
currency |
Simple |
The currency of the transaction: CAD |
transaction-type |
Simple |
Will have the value: "Sale" |
supplier-account-receipt-details |
Complex |
This structure will be provided only if the shipment was paid by Supplier Account. |
merchant-name |
Simple |
Will have the value: "Canada Post". |
merchant-url |
Simple |
Will have the value: "www.canadapost.ca". |
auth-code |
Simple |
The authorization code received from the supplier. |
auth-timestamp |
Simple |
The date and time the supplier authorized the transaction. |
supplier-id |
Simple |
The supplier that authorized the transaction. Values are:
|
charge-amount |
Simple |
The total amount charged to the account. |
currency |
Simple |
The currency of the transaction; always CAD. |
transaction-type |
Simple |
Will have the value: "Sale". |
Response – XML Diagram
Response – Possible Error Response
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 Shipment Receipt
<get-shipment-receipt-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
<shipment-id>340531309186521749</shipment-id>
</get-shipment-Receipt-request>
Sample SOAP XML Response – Get Shipment Receipt
<get-shipment-receipt-response>
<shipment-receipt>
<cc-receipt-details>
<merchant-name>Canada Post Corporation</merchant-name>
<merchant-url>www.canadapost.ca</merchant-url>
<name-on-card>John Doe</name-on-card>
<auth-code>076838</auth-code>
<auth-timestamp>2013-06-17T08:27:20-05:00</auth-timestamp>
<card-type>VIS</card-type>
<charge-amount>21.99</charge-amount>
<currency>CAD</currency>
<transaction-type>Sale</transaction-type>
</cc-receipt-details>
</shipment-receipt>
</get-shipment-receipt-response>