Resource Definitions:Lists
From API Documentation
(Created page with 'The lists resource is a collection of all distribution lists associated with your agent account. Each agent account has one special list, known as the Primary Sphere. This list …') |
(→GET) |
||
Line 13: | Line 13: | ||
* list_name | * list_name | ||
* list_date | * list_date | ||
- | * list_type '' | + | * list_type - ''possible values: 0, 1 (cannot update or delete)'' |
=== Example Responses === | === Example Responses === |
Revision as of 05:43, 22 July 2010
The lists resource is a collection of all distribution lists associated with your agent account.
Each agent account has one special list, known as the Primary Sphere. This list has a list_type value of 1, while all other lists have a list type value of 0. The Primary Sphere cannot be updated or deleted. The delete all functionality deletes all lists with a list_type value of 0, but leaves the Primary Sphere in tact.
Example URI: http://api.rezora.com/v1/lists
Available methods are:
Contents |
GET
Returns a list of distribution lists. Each list record includes the following fields:
- list_id
- list_name
- list_date
- list_type - possible values: 0, 1 (cannot update or delete)
Example Responses
XML Response
<?xml version="1.0" encoding="UTF-8"?> <lists version="1.0"> <list> <list_id>1234</list_id> <list_name>Current Prospects</list_name> <list_date>2010-07-21 16:28:52</list_date> <list_type>0</list_type> </list> ... </lists>
JSON Response
[ { "list_id":"1234", "list_name":"Current Prospects", "list_date":"2010-07-21 16:28:52", "list_type":"0" } ... ]
CSV Response
"list_id"|"list_name"|"list_date"|"list_type" "1234"|"Current Prospects"|"2010-07-21 16:28:52"|"0" ...
POST
Adds a new list, and returns the new list ID. You may include the following fields (required fields marked with a red asterisk (*)):
- list_name * (must be unique)
Example Request Data
XML Request
<?xml version="1.0" encoding="UTF-8"?> <data> <list_name>New Leads</list_name> </data>
JSON Request
{ "data":{ "list_name":"New Leads" } }
TEXT Request
list_name=New+Leads
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <lists version="1.0"> <list> <list_id>1235</list_id> </list> </lists>
JSON Response
[ { "list_id":"1235" } ]
CSV Response
"list_id" "1235"
DELETE
Permanently removes ALL distribution lists (except for the Primary Sphere), and returns a success code.
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <lists version="1.0"> <list> <status>200</status> </list> </lists>
JSON Response
[ { "status":"200" } ]
CSV Response
"status" "200"