GetAudience

Initial Build

2014.01

xWEB

Web Method

Response Type

XML Results

The GetAudience web method returns a list of records based on an Audience. Working with GetAudience is similar to GetDynamicQuery, since an Audience is a set of two or more queries. The way you pass ask-at-runtime parameters to GetAudience is the same as for GetDynamicQuery.

To get the list of ask-at-runtime parameters, and to get the structure of the result set, call GetAudienceDefinition (which is similar to GetDynamicQueryDefinition). To get a list of all audiences, call GetAudienceList.

Parameters

The request contains the following parameters:

Name Type Occurs Description
qrh_key key 1..1

Query header key. A unique key that represents the audience. A key can be obtained by using the GetAudienceList web method.

WithDescriptions boolean 0..1 Leave this parameter blank to return column names (the default behavior). Set this parameter to the value 1, to return column descriptions instead of names.
Parameters collection 0..1

A collection of one or more ask-at-runtime parameters. See GetDynamicQuery for more information.

currentPage key 0..1

Indicates the page to return. For the first page, use 0. See GetDynamicQuery for more information.

Response

The request returns the audience information for the specified query key. The results returned depend on the structure of the query.

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">

<soapenv:Header>

<ns:AuthorizationToken>

<!--Optional:-->

<ns:Token>?</ns:Token>

</ns:AuthorizationToken>

</soapenv:Header>

<soapenv:Body>

<ns:GetAudience>

<!--Optional:-->

<ns:qrh_key>?</ns:qrh_key>

<!--Optional:-->

<ns:WithDescriptions>?</ns:WithDescriptions>

<!--Optional:-->

<ns:Parameters>

<!--Zero or more repetitions:-->

<ns:Parameter>

<!--Optional:-->

<ns:Name>?</ns:Name>

<!--Optional:-->

<ns:Value>?</ns:Value>

</ns:Parameter>

</ns:Parameters>

<ns:currentPage>0</ns:currentPage>

</ns:GetAudience>

</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>?</Token>

</AuthorizationToken>

</soap:Header>

<soap:Body>

<GetAudienceResponse xmlns="http://www.avectra.com/2005/">

<GetAudienceResult>

<Results recordReturn="1">

<Result>

<CustomerKey>ef3e1b17-726d-430f-9668-5d7d2fdb7563</CustomerKey>

<TotalToDateAmount>4270.5000</TotalToDateAmount>

<YearToDateAmount>100.0000</YearToDateAmount>

<JoinDate>2/5/2013 12:00:00 AM</JoinDate>

<CustomerType>Individual</CustomerType>

<CustomerSortName>2185 Ravi001</CustomerSortName>

<RecurringDonor>0</RecurringDonor>

</Result>

</Results>

</GetAudienceResult>

</GetAudienceResponse>

</soap:Body>

</soap:Envelope>

   

JSON Method

POST /xWeb/JSON/GetAudience

Copy
DATA: JSON
{
    "GetAudience " : {
    "qrh_key": "{{qrhKeyAudience}}",
    "WithDescriptions":"",
    "currentPage":"0",
    "Parameters": [
        {
            "SomeParameter1":"SomeValue1"
        },
        {
            "SomeParameter2":"SomeValue2"
        }
    ]
    }
}

 

Copy
SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
{
    "Results": {
        "@recordReturn": "34",
        "Result": [
            {
                "ind_cst_key": "c1ff9d86-b5b7-4b85-b041-01e1c6b07298",
                "ind_last_name": "A",
                "ind_first_name": "Jerry",
                "ind_mid_name": null,
                "cst_org_name_dn": "AA",
                "cst_eml_address_dn": "tomjerry@cm.com",
                "cst_no_email_flag": "0",
                "adr_line1": "2647 Thompson Drive",
                "adr_city_state_code": "Arkansas, AR  72212"
            },
            {
                "ind_cst_key": "29665b63-c16f-4cf4-bdd7-6fa10a022e3f",
                "ind_last_name": "Acame",
                "ind_first_name": "Bob",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "2312 sunny rd",
                "adr_city_state_code": "mclean, VA  22102"
            },
            {
                "ind_cst_key": "34337d90-9ba0-48f7-a70c-1903b45b05ed",
                "ind_last_name": "Adams",
                "ind_first_name": "Robert",
                "ind_mid_name": null,
                "cst_org_name_dn": "Acme Systems1adKSe",
                "cst_eml_address_dn": "test220@yopmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "4685  Hillview Drive",
                "adr_city_state_code": "JOHNSON CITY, NY  78636"
            },
            {
                "ind_cst_key": "2343ec4d-897c-419a-af8f-43c437d65016",
                "ind_last_name": "Address",
                "ind_first_name": "PRavin",
                "ind_mid_name": "K",
                "cst_org_name_dn": "Community Brands",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "1245 Alpine Avenue",
                "adr_city_state_code": "Boulder, CO  80304"
            },
            {
                "ind_cst_key": "771a0ef9-3075-4bbc-9257-f4b8b8a6720e",
                "ind_last_name": "Alberta2",
                "ind_first_name": "blue3",
                "ind_mid_name": null,
                "cst_org_name_dn": "Apple",
                "cst_eml_address_dn": "gilberto1112@gmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "444 Golf Course444 Ln",
                "adr_city_state_code": "Ellsworth, WI  54011"
            },
            {
                "ind_cst_key": "9c3c2863-f72e-4cd9-aedf-eb3e7dda9af0",
                "ind_last_name": "Alvarez",
                "ind_first_name": "Beverly",
                "ind_mid_name": "Sally",
                "cst_org_name_dn": "DELL Vendor",
                "cst_eml_address_dn": "Alvarez.B@gmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "7716 E. Virginia Drive",
                "adr_city_state_code": "Madisonville, ID  42431"
            },
            {
                "ind_cst_key": "fa3fef72-a355-4e6b-ac72-5307ac3b2c5e",
                "ind_last_name": "Applegate",
                "ind_first_name": "Eddy",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "400 Poydras ST Ste 900",
                "adr_city_state_code": "New Orleans, VA  70130"
            },
            {
                "ind_cst_key": "3d4c181a-ea79-4a33-b406-c114ef3787f1",
                "ind_last_name": "Baad",
                "ind_first_name": "Nikhil",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": "nik@gmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "Lakeshire drive st 109",
                "adr_city_state_code": "Dublin, OH  20101"
            },
            {
                "ind_cst_key": "50147daa-7c00-4f39-8122-9c6f7277c376",
                "ind_last_name": "David",
                "ind_first_name": "Susan",
                "ind_mid_name": null,
                "cst_org_name_dn": "org21",
                "cst_eml_address_dn": "mayank.sisodia@communitybrands.comqw",
                "cst_no_email_flag": "0",
                "adr_line1": "3885  Brooke Street",
                "adr_city_state_code": "Sugar Land, TX  77478"
            },
            {
                "ind_cst_key": "425149e4-4744-4fea-8b8d-1f5f10e954a1",
                "ind_last_name": "Evans",
                "ind_first_name": "Bob",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "2134 Sleepy Hollow Ct",
                "adr_city_state_code": "Vienna, VA  22108"
            },
            {
                "ind_cst_key": "c656791f-57ca-46b7-a1f1-42576d57b03e",
                "ind_last_name": "Hernandez",
                "ind_first_name": "Eva",
                "ind_mid_name": null,
                "cst_org_name_dn": "Cisco LOCAL Organization",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "7706 E. Virginia Drive",
                "adr_city_state_code": "Madisonville, KY  42431"
            },
            {
                "ind_cst_key": "6c231822-667d-4d7b-88fa-e7aa3efe3ae7",
                "ind_last_name": "Moltchanova",
                "ind_first_name": "Nataliia",
                "ind_mid_name": null,
                "cst_org_name_dn": "ABC Company",
                "cst_eml_address_dn": "nmoltchanova@gmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "220 Seneca St",
                "adr_city_state_code": "Lewiston, NY  14092"
            },
            {
                "ind_cst_key": "64e39743-2193-47e6-a1ce-ed2671997252",
                "ind_last_name": "Newman",
                "ind_first_name": "Amanda",
                "ind_mid_name": null,
                "cst_org_name_dn": "Audi Chantilly",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "fht 6 evr45",
                "adr_city_state_code": "ynubtheyt, VA  50892"
            },
            {
                "ind_cst_key": "0d2f0c7f-7a46-4eaa-8afb-fb05ff7e528c",
                "ind_last_name": "Newman",
                "ind_first_name": "Eric",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": "zzzericN@mail.comzzz",
                "cst_no_email_flag": "0",
                "adr_line1": "2131 Homey Ln",
                "adr_city_state_code": "Vienna, VA  22182-1234"
            },
            {
                "ind_cst_key": "a29233eb-1346-4afd-ae8e-78f30bbbbc07",
                "ind_last_name": "Novak",
                "ind_first_name": "Amy",
                "ind_mid_name": null,
                "cst_org_name_dn": "Acme Systems48fk9P",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "2133 Homey Ln",
                "adr_city_state_code": "Bethesda, MD  20817"
            },
            {
                "ind_cst_key": "4825022f-c50e-4890-ad8d-6a12b22953e8",
                "ind_last_name": "Ortega",
                "ind_first_name": "Eric",
                "ind_mid_name": null,
                "cst_org_name_dn": "DoubleTree by Hilton Hotel Orlando at SeaWorld",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "vtr rt56756",
                "adr_city_state_code": "ertwetw, VA  42766"
            },
            {
                "ind_cst_key": "d721599f-a7f7-41c3-b204-5ee52dd0e106",
                "ind_last_name": "Ourisman",
                "ind_first_name": "Don",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "4800 Bethesda Ave",
                "adr_city_state_code": "Bethesda, MD  20814"
            },
            {
                "ind_cst_key": "d66321d7-43c9-437e-82c0-761525b184d1",
                "ind_last_name": "Pratt",
                "ind_first_name": "Sebastian",
                "ind_mid_name": null,
                "cst_org_name_dn": "Bell LOCAL Organization",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "1",
                "adr_line1": "123, Eastern highway",
                "adr_city_state_code": "Hawaii, HI  78954"
            },
            {
                "ind_cst_key": "357295b5-3713-4038-ae7c-0573ae94815f",
                "ind_last_name": "Pravin",
                "ind_first_name": "ClassicUI",
                "ind_mid_name": null,
                "cst_org_name_dn": "Akshay Org",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "888 1st Ave",
                "adr_city_state_code": "Baker Lake, NU  X0C 0A0"
            },
            {
                "ind_cst_key": "76a801e6-37e4-4c32-8382-07a9be2a86b2",
                "ind_last_name": "rakteeeee",
                "ind_first_name": "pooja",
                "ind_mid_name": null,
                "cst_org_name_dn": "pooja org28",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "2071  Dawson Drive",
                "adr_city_state_code": "Little Rock, AR  72212"
            },
            {
                "ind_cst_key": "7d49f058-71b2-423f-a105-b94a58a6e293",
                "ind_last_name": "rakteeeeeee",
                "ind_first_name": "pooja",
                "ind_mid_name": null,
                "cst_org_name_dn": "pooja org28",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "xyz",
                "adr_city_state_code": "ny, NY  10003"
            },
            {
                "ind_cst_key": "40b83177-cb60-45e3-84b5-76a2cb7ea95c",
                "ind_last_name": "Richardson",
                "ind_first_name": "Bruce",
                "ind_mid_name": null,
                "cst_org_name_dn": "Bell Company",
                "cst_eml_address_dn": "hgg@ygk.com",
                "cst_no_email_flag": "0",
                "adr_line1": "31 Greenview St.",
                "adr_city_state_code": "Merrick, NJ  11566"
            },
            {
                "ind_cst_key": "e74d893f-d811-48ac-a7a9-dcdb2835d48c",
                "ind_last_name": "Ronaldo",
                "ind_first_name": "Cristiano",
                "ind_mid_name": null,
                "cst_org_name_dn": "ABC Company",
                "cst_eml_address_dn": "nikhil.baad@communitybrands.com",
                "cst_no_email_flag": "0",
                "adr_line1": "Lakshire drive st109",
                "adr_city_state_code": "Dublin, OH  20101"
            },
            {
                "ind_cst_key": "525cc43b-3769-4e62-815b-ce4114044f8c",
                "ind_last_name": "Scattorade",
                "ind_first_name": "Violet",
                "ind_mid_name": null,
                "cst_org_name_dn": "ABC Warehouse",
                "cst_eml_address_dn": "zzviolet@mail.comzz",
                "cst_no_email_flag": "0",
                "adr_line1": "222 Seneca Street",
                "adr_city_state_code": "Lewiston, NY  14092"
            },
            {
                "ind_cst_key": "6072ccfb-eef9-4b77-a5f3-e9dbda924aba",
                "ind_last_name": "Scattorade",
                "ind_first_name": "Sara",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "8500 River Rd",
                "adr_city_state_code": "Bethesda, MD  20817"
            },
            {
                "ind_cst_key": "d5d11bc2-2daa-45e5-a4f7-3c986b6b7ea9",
                "ind_last_name": "Scottorade",
                "ind_first_name": "Tina",
                "ind_mid_name": null,
                "cst_org_name_dn": "Wyndham Garden",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "7002 Arundel Mills Cir",
                "adr_city_state_code": "Hanover, MD  21706"
            },
            {
                "ind_cst_key": "7a392773-7470-41c1-b6e8-4436620d03fe",
                "ind_last_name": "Snowman",
                "ind_first_name": "Mandy",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "8500 River Rd",
                "adr_city_state_code": "Bethesda, MD  20815"
            },
            {
                "ind_cst_key": "7b217cbd-6ddb-44f9-afa8-1ec3c7385b5d",
                "ind_last_name": "Stark",
                "ind_first_name": "Tony",
                "ind_mid_name": null,
                "cst_org_name_dn": "Stark Industries",
                "cst_eml_address_dn": "zztony@mail.comzz",
                "cst_no_email_flag": "0",
                "adr_line1": "230 WDC",
                "adr_city_state_code": "Johns, FL  12345"
            },
            {
                "ind_cst_key": "7f3c7585-3786-4bb2-8f5b-5ef0aac4b1f9",
                "ind_last_name": "Stark2",
                "ind_first_name": "Tonyyyy",
                "ind_mid_name": null,
                "cst_org_name_dn": "Marvel Organization",
                "cst_eml_address_dn": "Tstark2@yopmail.com",
                "cst_no_email_flag": "0",
                "adr_line1": "10800 Pecan Park Blvd.,",
                "adr_city_state_code": "Austin, TX  78750"
            },
            {
                "ind_cst_key": "01ef468b-c023-4a6e-b6fb-94843caf5951",
                "ind_last_name": "Szarko",
                "ind_first_name": "Joanna",
                "ind_mid_name": "1630435362",
                "cst_org_name_dn": "Community Brands - McLean",
                "cst_eml_address_dn": "zzjoanna@communitybrands.comzz",
                "cst_no_email_flag": "0",
                "adr_line1": "7901 Jones Branch Dr",
                "adr_city_state_code": "Mclean, VA  22102-1234"
            },
            {
                "ind_cst_key": "7e3492d0-13eb-4d13-a292-d8267158d3fa",
                "ind_last_name": "Tuesday",
                "ind_first_name": "Thomas",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "7 Leesburg Pk",
                "adr_city_state_code": "Leesburg, VA  22169"
            },
            {
                "ind_cst_key": "c31306f7-456d-4056-bcc3-11f4c41cc9d0",
                "ind_last_name": "Wayde",
                "ind_first_name": "John",
                "ind_mid_name": null,
                "cst_org_name_dn": null,
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "8500 River Rd",
                "adr_city_state_code": "Bethesda, MD  20817"
            },
            {
                "ind_cst_key": "e2ed233b-dc95-4433-8352-23a07f915b25",
                "ind_last_name": "Williams",
                "ind_first_name": "Juan",
                "ind_mid_name": null,
                "cst_org_name_dn": "William David",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "86 Bear Hill St.",
                "adr_city_state_code": "Ronkonkoma, NY  11779"
            },
            {
                "ind_cst_key": "aafcc46e-d213-495b-8d90-90e7c5046c11",
                "ind_last_name": "Wyane",
                "ind_first_name": "Bruce",
                "ind_mid_name": null,
                "cst_org_name_dn": "Tower Corporation",
                "cst_eml_address_dn": null,
                "cst_no_email_flag": "0",
                "adr_line1": "909 Aviation Pkwy",
                "adr_city_state_code": "New York, NY  54260"
            }
        ]
    }
}