WEBAddressGetAddressesByCustomer

Initial Build

2008.01

xWEB

Web Method

Response Type

string

This method returns a list of addresses for a customer.

To get more information about a single address, call WEBAddressGet and pass the value of the <cxa_key>.

Parameters

CustomerKey (string). The Customer Key of a customer.

Response

This method returns zero, one or more results each of which contains:

  • cxa_key (string). The primary key of a customer address. This is used to set properties in other web methods such as WEBAddressGet.
  • adt_code (string). The address type (Home, Work, and so on) of the address.
  • cxa_mailing_label (string). The complete address block.
  • cxa_mailing_label_html (string). The complete address block formatted for HTML with tags after each line.

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:WEBAddressGetAddressesByCustomer>
<ns:CustomerKey>207d1a31-567e-4a97-ac21-a1923a092755</ns:CustomerKey>
</ns:WEBAddressGetAddressesByCustomer>
</soapenv:Body>
</soapenv:Envelope>

Sample Response

<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>
<WEBAddressGetAddressesByCustomerResponse xmlns="http://www.avectra.com/2005/">
<WEBAddressGetAddressesByCustomerResult>
<Results recordReturn="2">
<Result>
<cxa_key>9fe461a4-ed24-49d8-be1d-36e0c378705e</cxa_key>
<adt_code>Work</adt_code>
<cxa_mailing_label>Robert Smith
7901 Jones Branch Dr
Mclean, VA 22102-3338</cxa_mailing_label>
<cxa_mailing_label_html>Robert Smith&lt;br>7901 Jones Branch Dr&lt;br>Mclean, VA 22102-3338</cxa_mailing_label_html>
</Result>
<Result>
<cxa_key>66d89b0b-eaae-4853-90c3-238d4531bd1a</cxa_key>
<adt_code>Home</adt_code>
<cxa_mailing_label>Robert Smith
2901 Maple Lane
Falls Church, VA 22302-1232</cxa_mailing_label>
<cxa_mailing_label_html>Robert Smith&lt;br>2901 Maple Lane&lt;br>Falls Church, VA 22302-1232</cxa_mailing_label_html>
</Result>
</Results>
</WEBAddressGetAddressesByCustomerResult>
</WEBAddressGetAddressesByCustomerResponse>
</soap:Body>
</soap:Envelope>
   

JSON Method

Get all addresses for a customer.

  • Gets the address type and the display and printing label.

  • Use the returned cxa_key in a follow-up WEBAddressGet call.

  •  

GET /JSONi/XWebREST/WEBAddressGetAddressesByCustomer?CustomerKey=3ebe2b51-7f16-4ada-af2e-401425a45a24

POST /xweb/JSON/WEBAddressGetAddressesByCustomer

Copy
DATA: JSON
{
    "WEBAddressGetAddressesByCustomer": {
        "CustomerKey": "3ebe2b51-7f16-4ada-af2e-401425a45a24"
    }
}

 

Copy
SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON{
    "Results": {
        "@recordReturn": "1",
        "Result": [
            {
                "cxa_key": "26ff8bc6-26c4-4177-8417-54b81a1b0ffb",
                "adt_code": "Mailing",
                "cxa_mailing_label": "Mrs. Liza Grimshaw, CPPB, VCO, VCA\r\nSupplier and Contracts Specialist \r\nMedical University of South Carolina\r\n1 Southpark Circle\r\nSuite 501\r\nCharleston, SC 29407",
                "cxa_mailing_label_html": "Mrs. Liza Grimshaw, CPPB, VCO, VCA<br>Supplier and Contracts Specialist <br>Medical University of South Carolina<br>1 Southpark Circle<br>Suite 501<br>Charleston, SC 29407"
            }
        ]
    }
}