Resource Definitions:Lists/ID/Contacts
From API Documentation
The lists/ID/contacts resource is a collection of all contact-to-list associations for the designated distribution list.
Example URI: http://api.rezora.com/v1/lists/ID/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"