获取收件人细分

Get subscriber segments 获取收件人细分

Segments 接口允许检索系统中已定义的所有收件人细分

请求数据格式
请求URL参数:
参数 类型 描述
apiKey string 你的API Key, 需要验证. 必填
示例:
应答
应答Data元素:
元素/属性 类型 描述
Segments array[complex] Segment元素组成的数组.
Segment子元素:
元素/属性 类型 描述
Id int 收件人细分标识ID.
Name string 收件人细分名称.
Tags array[string] 标签元素数组.

标签子元素:

元素/属性 类型 描述
Tag string 消息标签名称.

示例

请求
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应答
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>