Find a Post Office
Get Post Office Detail – SOAP
Summary
Name: | Get Post Office Detail |
---|---|
Reason to Call: | To retrieve additional information about a specific Post Office |
Input: | Office Identifier (office-id) |
Output: | Detailed information on the specified Post Office (hours of operation, etc.) |
Error Examples: | Invalid Office Id |
Typical Prior Call: | Get Nearest Post Office |
Version history: | Release notes |
Call Details
WSDL: | postoffice.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/postoffice |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/postoffice |
Namespace: | http://www.canadapost.ca/ws/soap/postoffice |
Operation: | GetPostOfficeDetail |
SOAP Body
This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.
Get Post Office Detail – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-post-office-detail-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. |
office-id |
simple |
required |
Office identifier for the Post Office for which information is sought. Leading zeroes are significant. |
Request – XML Diagram
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Post Office Detail. For the hierarchy of the response, see the
XML diagram.
Get Post Office Detail – Response Elements | ||
---|---|---|
Element Name | Type | Description |
get-post-office-detail-response |
complex |
The top level of the XML structure for the response. |
post-office-detail |
complex |
This structure represents the information about the requested Post Office. |
address |
complex |
This xml element structure represents the information on the address of the Post Office. |
city |
simple |
Municipality in which the Post Office is located. |
latitude |
simple |
The latitude of the Post Office. |
longitude |
simple |
The longitude of the Post Office. |
postal-code |
simple |
The Postal Code of the Post Office. |
province |
simple |
The province where the Post Office is located. |
office-address |
simple |
Street number and name for a Post Office. |
location |
simple |
The general location or area of a Post Office. This is used to distinguish among various Post Office locations that have similar names. |
name |
simple |
The franchise name assigned to Post Office, if it is a franchise. |
office-id |
simple |
The internal Canada Post assigned unique identification number for the Post Office. Note: leading zeroes are significant and should be included. |
bilingual-designation |
simple |
true | false
|
hours-list |
complex |
Contains information regarding the hours of operation of the Post Office. Occurs 1 … 7 times, with each occurrence representing the hours of operation of a single day of the week. |
day |
simple |
Indicates which day of the week the corresponding occurrence of hours-list represents. Day 1 is Sunday and Day 7 is Saturday |
time |
simple |
The opening and closing times of the Post Office. Occurs 1 .. 4 times. The first occurrence of time is the first opening time of the day. The second occurrence (if present) represents the first closing time of the day. (If absent, then the store remains open to the end of the day) The third occurrence (if present) represents a second opening of the day. The fourth occurrence (if present) represents the second closing time of the day. (If absent, then the store remains open to the end of the day). e.g., if there are 4 occurrences of the time with the values |
Response – XML Diagram
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> | <description> |
---|---|
e00010 | Invalid office-id |
Examples
Sample SOAP XML Request – Get Post Office Detail
<get-post-office-detail-request>
<locale>EN</locale>
<office-id>102978</office-id>
</get-post-office-detail-request>
Sample SOAP XML Response – Get Post Office Detail
<get-post-office-detail-response>
<post-office-detail>
<address>
<city>GATINEAU</city>
<latitude>45.5856</latitude>
<longitude>-75.4132</longitude>
<postal-code>J8L1N0</postal-code>
<province>QC</province>
<office-address>563 RUE BELANGER</office-address>
</address>
<location>BUCKINGHAM PO</location>
<name>DÉPANNEUR MAUZEROLL</name>
<office-id>0000319376</office-id>
<bilingual-designation>true</bilingual-designation>
<hours-list>
<day>1</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>2</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>3</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>4</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>5</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>6</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
<hours-list>
<day>7</day>
<time>08:00</time>
<time>00:00</time>
</hours-list>
</post-office-detail>
</get-post-office-detail-response>