WEBEmailGetEmailsByCustomer
| Initial Build | 2008.01 |
| xWeb | Web Method |
| Response Type | object |
This method returns a list of e-mail addresses for a customer.
Parameters
The request contains the following required parameter:
| Name | Type | Occurs | Description |
|---|---|---|---|
| CustomerKey | guid | 1..1 | The Customer Key. |
Response
XML Results
Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>2306bae2-4f6f-499c-8b8b-daffb79abb9b</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBEmailGetEmailsByCustomer>
<ns:CustomerKey>207d1a31-567e-4a97-ac21-a1923a092755</ns:CustomerKey>
</ns:WEBEmailGetEmailsByCustomer>
</soapenv:Body>
</soapenv:Envelope>
Sample Response
Shortened for brevity.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthorizationToken xmlns="http://www.avectra.com/2005/">
<Token>2306bae2-4f6f-499c-8b8b-daffb79abb9b</Token>
</AuthorizationToken>
</soap:Header>
<soap:Body>
<WEBEmailGetEmailsByCustomerResponse xmlns="http://www.avectra.com/2005/">
<WEBEmailGetEmailsByCustomerResult>
<Results recordReturn="2">
<Result>
<eml_key>25b22341-56d6-437a-a963-8e7e29305806</eml_key>
<eml_type>business</eml_type>
<eml_address>bsmith@avectra.com</eml_address>
</Result>
<Result>
<eml_key>CBDB6D01-1CC0-47A4-9941-02485C5E3F6C</eml_key>
<eml_type>personal</eml_type>
<eml_address>jj@hotmail.com</eml_address>
</Result>
</Results>
</WEBEmailGetEmailsByCustomerResult>
</WEBEmailGetEmailsByCustomerResponse>
</soap:Body>
</soap:Envelope>
JSON Method
Get a list of email addresses for a customer.
Use the eml_key in the WEBEmailGet to get the full details of the email record.
GET /JSON/WEBEmailGetEmailsByCustomer?CustomerKey=3ebe2b51-7f16-4ada-af2e-401425a45a24
POST /xweb/JSON/WEBEmailGetEmailsByCustomer
DATA: JSON
{
"WEBEmailGetEmailsByCustomer": {
"CustomerKey": "3ebe2b51-7f16-4ada-af2e-401425a45a24"
}
}
SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
{
"Results": {
"@recordReturn": "3",
"Result": [
{
"eml_key": "46538194-e963-4ffa-8c99-571e79594015",
"eml_type": "business",
"eml_address": "LizaGrimshaw3@otitest.com"
},
{
"eml_key": "356b309f-3aff-4cd7-b6b0-fe9cf34dd6db",
"eml_type": "business",
"eml_address": "LizaGrimshaw2@otitest.com"
},
{
"eml_key": "4b49603f-8b2f-4877-b429-80a69d039940",
"eml_type": "personal",
"eml_address": "LizaGrimshaw1@otitest.com"
}
]
}
}