Resource Definitions:Lists
From API Documentation
(→GET) |
|||
(3 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | The lists resource is a collection of all distribution lists associated with your agent account. | + | 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 | + | 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:''''' <nowiki>http://api.rezora.com/v1/lists</nowiki> | '''''Example URI:''''' <nowiki>http://api.rezora.com/v1/lists</nowiki> | ||
Line 56: | Line 56: | ||
Adds a new list, and returns the new list ID. You may include the following fields (required fields marked with a red asterisk ('''<span style="color: #f00;">*</span>''')): | Adds a new list, and returns the new list ID. You may include the following fields (required fields marked with a red asterisk ('''<span style="color: #f00;">*</span>''')): | ||
- | * list_name '''<span style="color: #f00;">*</span>''' '' | + | * list_name '''<span style="color: #f00;">*</span>''' - ''must be unique'' |
=== Example Request Data === | === Example Request Data === | ||
Line 145: | Line 145: | ||
</div> | </div> | ||
[[Category:Resource Definitions]] | [[Category:Resource Definitions]] | ||
+ | [[Category:Agent Resources]] |
Latest revision as of 15:13, 23 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"