Contract Shipping
Get Groups – SOAP
Summary
Name: | Get Groups |
---|---|
Reason to Call: | To confirm the full list of groups eligible for use in a Transmit Shipments request. |
Input: | Mailed-by; locale (optional) |
Output: | List of group IDs |
Error Example: | Invalid mailed-on-behalf-of customer |
Typical Next Call: | Transmit Shipments, Get Shipments |
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: | GetGroups |
SOAP Body
This section describes the XML input elements to this service. For the hierarchical structure, see the XML diagram.
Get Groups – Request Elements | |||
---|---|---|---|
Element Name | Type | Required / Optional | Description |
get-groups-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. |
Request – XML Diagram
Response Details
Response – Elements
The following table describes the XML elements in the response to Get Groups. For the hierarchy of the response, see the XML diagram.
Get Groups – Response Elements | ||
---|---|---|
Element Name | Type | Description |
get-groups-response |
complex |
The top level XML element for the response. It will either contain the results of a successful completion or the error structure. |
groups |
complex |
The XML structure containing the results of a successful completion of the service. |
group-id |
simple |
May occur 0 .. N times This is the name of the group specified by your system in a prior Create Shipment call. Groups may be empty of shipments due to a prior Transmit Shipments call since they can persist for up to 24 hours while empty. Performance limitations
System limitations
|
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 Groups
<get-groups-request>
<mailed-by>1111111</mailed-by>
<locale>EN</locale>
</get-groups-request>
Sample SOAP XML Response – Get Groups
<get-groups-response>
<groups>
<group-id>123456</group-id>
</groups>
</get-groups-response>