Contract Shipping
Get MOBO Customer Information – REST
Summary
Name: | Get MOBO Customer Information |
---|---|
Reason to Call: | To retrieve details on allowed payers, methods of payment and other information about a mailed on behalf of customer to determine the proper customer number for charging shipping costs. |
Input: | The mailed-on-behalf-of customer number for which customer information is desired. |
Output: | Contract numbers, authorized payers and allowed methods of payment. |
Error Examples: | Customer number not valid |
Possible Prior Calls: | |
Possible Next Calls: | |
Version history: | Release notes |
The Get MOBO Customer Information service provides information about a mailed-on-behalf-of customer.
Request Details
Request – Structure for Get MOBO Customer Information
Endpoint
GET https://XX/rs/customer/{mailed by customer}/behalfof/{mobo} |
|
---|---|
Replace... | With... |
XX (Development) |
ct.soa-gw.canadapost.ca |
XX (Production) |
soa-gw.canadapost.ca |
{mailed by customer} |
your customer number |
{mobo} |
the mailed on behalf of customer number or repeat your customer number |
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
application/vnd.cpc.customer+xml (Note: */* in place of the header value will return an error) |
Authorization |
Basic {Base64 encoding of userid:password} |
Accept-language |
en-CA or fr-CA |
Body
None
Response Details
Response – Elements
Get MOBO Customer Information – REST – Detailed Review of Response Elements | ||
---|---|---|
Element Name | Type | Description |
behalf-of-customer |
Complex |
This is the overall structure for the response in XML. |
customer-number |
Simple |
Customer number. Contained in behalf-of-customer. (10 numeric characters) |
contracts |
Complex |
Structure that contains the contracts that the customer owns and which the Mailed-by customer specified in request type 1 has used and are still valid (i.e. there will be no invalid or expired contracts in this list). Contained in behalf-of-customer. |
contract-id |
Simple |
Contract Number (also called Agreement Number). (10 numeric characters) Contained in behalf-of-customer. |
authorized-payers |
Complex |
Structure that contains authorized payers and the methods of payment each of these payers can use. These payers can be used as payers for the customer-number specified in this response. Contained in behalf-of-customer. Note that if a payer has no method of payment, the payer can't be used to ship at this moment. (e.g. it can't be specified as a MoBo for a shipment) |
payer |
Complex |
Contained in authorized-payers. |
payer-number |
Simple |
Customer number of the payer. Contained in payer. (10 numeric characters) |
methods-of-payment |
Complex |
Structure that contains the methods of payment this payer can use. Contained in payer. |
method-of-payment |
Simple |
Can contain:
Contained in methods-of-payment. {10 character string} |
Response – XML Diagram
Response – Possible Error Responses
No error messages are expected for invocation of this link provided from the Get Customer Information request. If the link is constructed manually, the following error could occur.
Code | Message |
---|---|
9152 |
The customer number provided does not have the correct format. |
See HTTP status codes for general error handling information.
Examples
Sample REST XML Response – Get MOBO Customer Information
<contracts>
<contract-id>12345679</contract-id>
<authorized-payers>
<methods-of-payment>
<method-of-payment>creditCard</method-of-payment>