Skip to content

Get subscriber segments

Segments collection allows retrieving a list of all subscriber segments defined in the system.

Request data format

Request URL parameters:

ParameterTypeNotes
apiKeystringYour API key, required for authentication. Required.

Examples:

https://api.esv2.com/v2/Api/Segments?apiKey=YOUR_API_KEY_HERE

Response

Response Data element:

Element/attributeTypeNotes
Segmentsarray[complex]Array of Segment elements.

Segment element children:

Element/attributeTypeNotes
IdintSegment identifier.
NamestringSegment name.
Tagsarray[string]Array of tags elements. 

Tag element children:

Element/attributeTypeNotes
TagstringName of message tag.

Examples

Request:

GET https://api.esv2.com/v2/Api/Segments?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

OK response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 06 Jun 2013 13:45:58 GMT
Content-Length: 298

<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Data>
    <Segments>
     <Segment>
       <Id>4</Id>
       <Name>Spent more than $250</Name>
       <Tags/>
     </Segment>
     <Segment>
       <Id>9</Id>
       <Name>Flying from Munich</Name>
       <Tags>
         <Tag>test2</Tag>
         <Tag>test1</Tag>
       </Tags>
     </Segment>
     <Segment>
       <Id>13</Id>
       <Name>name1</Name>
       <Tags>
           <Tag>tagTest</Tag>
       </Tags>
     </Segment>
    </Segments>
  </Data>
</ApiResponse>
On this page
To top