通过Lists 接口,可以检索系统中已定义的所有收件人列表.
参数 | 类型 | 描述 |
---|---|---|
apiKey | string | 你的API Key, 需要验证. 必填. |
seedLists | boolean | 如设为 ‘true’, 只有测试列表会被返回. 如果设为 ‘false’, 只有收件人列表会被返回. 选填. 默认为 false. |
https://api.esv2.com/v2/Api/Lists?apiKey=YOUR_API_KEY_HEREhttps://api.esv2.com/v2/Api/Lists?apiKey=YOUR_API_KEY_HERE&seedLists=true |
元素/属性 | 类型 | 描述 |
---|---|---|
Lists | array[complex] | List元素组成的数组. |
List子元素:
元素/属性 | 类型 | 描述 |
---|---|---|
Id | int | 列表ID. |
Name | string | 列表名称. |
FriendlyName | string | 收件人可见的列表名称. |
Language | string | 列表语言, 如 en-US. |
OptInMode | string | 收件人加入列表模式. 二选一:
|
GET https://api.esv2.com/v2/Api/Lists?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)
|
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: Wed, 26 Jun 2013 13:35:54 GMT Content-Length: 320<ApiResponse xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”> <Data> <Lists> <List> <Id>1</Id> <Name>clients</Name> <FriendlyName>My Clients</FriendlyName> <Language>en-US</Language> <OptInMode>DoubleOptIn</OptInMode> </List> <List> <Id>2</Id> <Name>friends</Name> <FriendlyName>My Friends</FriendlyName> <Language>ru-RU</Language> <OptInMode>SingleOptIn</OptInMode> </List> </Lists> </Data> </ApiResponse> |