Rating
Get Option – SOAP
Summary
Name: | Get Option |
---|---|
Reason to Call: | Used to retrieve details of a given option. |
Input: | Option code |
Output: | Option description, prerequisites and conflicts |
Typical prior call: | Get Service |
Version history: | Release notes |
Call Details
WSDL: | rating.wsdl |
---|---|
Endpoint (Development): | https://ct.soa-gw.canadapost.ca/rs/soap/rating/v4 |
Endpoint (Production): | https://soa-gw.canadapost.ca/rs/soap/rating/v4 |
Namespace: | http://www.canadapost.ca/ws/soap/ship/rate/v4 |
Operation: | GetOption |
SOAP Body
This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.
Get Option – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-option-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. |
option-code |
simple |
required |
Code associated with the option. |
Request – XML Diagram
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Option. For the hierarchy of the response, see the XML diagram.
Get Option – Response Elements | ||
---|---|---|
Element Name | type | Description |
get-option-request |
complex |
The top level XML element for the response. |
option |
complex |
Structure containing the option and its attributes. |
option-code |
simple |
The code for the shipping option whose attributes are being detailed. |
option-name |
simple |
The full name of the option in the language you requested. |
option-class |
simple |
FEAT | DI | NDI FEAT indicates that this option is a service feature. |
prints-on-label |
simple |
True | False |
qualifier-required |
simple |
True | False |
conflicting-options |
complex |
List of codes that cannot occur when this option is used. |
option-code |
simple |
An option that is mutually exclusive with the option specified in the option request. |
prerequisite-options |
complex |
List of codes that are required to support this option. |
option-code |
simple |
An option that must also be selected when the option specified in the option request is selected. |
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.
Examples
Sample SOAP XML Request – Get Option
<get-option-request>
<locale>EN</locale>
<option-code>D2PO</option-code>
</get-option-request>
Sample SOAP XML Response – Get Option
<get-option-response>
<option>
<option-code>D2PO</option-code>
<option-name>Deliver to Post Office</option-name>
<option-class>DI</option-class>
<prints-on-label>true</prints-on-label>
<qualifier-required>true</qualifier-required>
<conflicting-options>
<option-code>HFP</option-code>
<option-code>DNS</option-code>
<option-code>COD</option-code>
<option-code>LAD</option-code>
</conflicting-options>
</option>
</get-option-response>