Get Service Info
Get Service Info – SOAP
Summary
Name: | Get Service Info |
---|---|
Reason to Call: | To allow you to retrieve and display informational messages for your e-commerce platform customers to inform them about upcoming outages to Canada Post web services. |
Input: | locale |
Output: |
|
Version history: | Release notes |
Call Details
WSDL: | serviceinfo.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/serviceinfo/v2 |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/serviceinfo/v2 |
Namespace: | http://www.canadapost.ca/ws/soap/serviceinfo/v2 |
Operation: | GetServiceInfo |
SOAP Body
Get Service Info – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-service-info-request |
complex |
required |
The top level XML element for the request input information. |
locale |
simple |
optional |
Indicates your language preference for receiving error messages. EN = English If no value is provided, the default language is English. |
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Service Info. For the hierarchy of the response, see the XML diagram.
Get Service Info – Response Elements | ||
---|---|---|
Element Name | Type | Description |
info-messages |
Complex |
The overall structure for the response in XML format. |
info-message |
Complex |
Contains the details of a specific message. |
message-type |
Simple |
Type of message. Always SO (scheduled outage). |
message-text |
Simple |
Text of the message in the language you specified in the header. |
from-datetime |
Simple |
Start date and time of the outage in dateTime format (2013-06-07T21:00:00-05:00). Note: The message will be returned ahead of this time for advance notice. |
to-datetime |
Simple |
The expected end date and time for the scheduled outage in dateTime format (2013-06-08T03:00:00-05:00). Note: The message will continue to be returned beyond this time in the event that the outage extends beyond the expected end time. |
Response – Possible Error Responses
A correctly structured request may receive the following error responses.
If there is no pending message (i.e. there is no message or we are not within the date/time range a message is to be released to users), an HTTP error code of 200 (OK) is returned with an empty response, i.e., <info-messages></info-messages>.
If a component is missing or invalid in the request or a validation fails, an HTTP error code of 400 (Bad Request) is returned, with one of the following errors returned in the body of the XML response.
Code | Message |
---|---|
9182 |
The Message Type is invalid. |
Response – XML Diagram
Examples
Sample SOAP XML Request – Get Service Info
<get-service-info-request>
<locale>EN</locale>
</get-service-info-request>
Sample SOAP XML Response – Get Service Info
<info-messages xmlns="http://www.canadapost.ca/ws/shipment/v2">
<info-message>
<message-type>SO</message-type>
<message-text>Please note that we will be performing scheduled maintenance from Saturday, Oct. 12 at 9 p.m. to Sunday, Oct. 13 at 4 a.m. EDT. During this time, Canada Post web services will not be available.</message-text>
<from-datetime>2013-10-12T21:00:00-05:00</from-datetime>
<to-datetime>2013-10-13T04:00:00-05:00</to-datetime>
</info-message>
</info-messages>