Resource Definitions:Lists/ID/Contacts
From API Documentation
(Difference between revisions)
(One intermediate revision not shown) | |||
Line 1: | Line 1: | ||
- | The lists/ID/contacts resource is a collection of all contact-to-list associations for the designated distribution list. | + | The ''lists/ID/contacts'' resource is a collection of all contact-to-list associations for the designated distribution list, where "ID" is the list's list_id number. |
'''''Example URI:''''' <nowiki>http://api.rezora.com/v1/lists/1234/contacts</nowiki> | '''''Example URI:''''' <nowiki>http://api.rezora.com/v1/lists/1234/contacts</nowiki> | ||
Line 144: | Line 144: | ||
</div> | </div> | ||
[[Category:Resource Definitions]] | [[Category:Resource Definitions]] | ||
+ | [[Category:Agent Resources]] |
Latest revision as of 15:14, 23 July 2010
The lists/ID/contacts resource is a collection of all contact-to-list associations for the designated distribution list, where "ID" is the list's list_id number.
Example URI: http://api.rezora.com/v1/lists/1234/contacts
Available methods are:
Contents |
GET
Returns a list of contact-to-list associations for the designated distribution list. Each association record includes the following fields:
- contacttolist_id
- contact_id
- list_id
- contacttolist_date
Example Responses
XML Response
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> <list_contacts version="1.0"> <list_contact> <contacttolist_id>1234567</contacttolist_id> <contact_id>123456</contact_id> <list_id>1234</list_id> <contacttolist_date>2010-07-21 16:46:01</contacttolist_date> </list_contact> ... </list_contacts>
JSON Response
[ { "contacttolist_id":"1234567", "contact_id":"123456", "list_id":"1234", "contacttolist_date":"2010-07-21 16:46:01" } ... ]
CSV Response
"contacttolist_id"|"contact_id"|"list_id"|"contacttolist_date" "1234567"|"123456"|"1234"|"2010-07-21 16:46:01" ...
POST
Adds a new contact-to-list association for the designated distribution list, and returns the new association ID. You may include the following fields (required fields marked with a red asterisk (*)):
- contact_id * - must be unique within this distribution list
Example Request Data
XML Request
<?xml version="1.0" encoding="UTF-8"?> <data> <contact_id>123457</contact_id> </data>
JSON Request
{ "data":{ "contact_id":"123457" } }
TEXT Request
contact_id=123457
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <list_contacts version="1.0"> <list_contact> <contacttolist_id>1234568</contacttolist_id> </list_contact> </list_contacts>
JSON Response
[ { "contacttolist_id":"1234568" } ]
CSV Response
"contacttolist_id" "1234568"
DELETE
Permanently removes ALL contact-to-list associations for the designated distribution list, and returns a success code.
Example Response Data
XML Response
<?xml version="1.0" encoding="UTF-8"?> <list_contacts version="1.0"> <list_contact> <status>200</status> </list_contact> </list_contacts>
JSON Response
[ { "status":"200" } ]
CSV Response
"status" "200"