Table of Contents:
Table of Contents minLevel 2
Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used.
Methods Summary
This API controller is for managing asynchronous contact searches.
...
Create new Contacts Manager Report- Create a new contact search using POST api/contact_search You need to set a title for this new search, and the filters used for contacts segmentation.
Check the report status - Check the contact search status using GET api/contact_search/<Contact search report ID> When contact search is created, its always created in status "Pending" (1), in order to know when the contact search is ready, use this method and verify that the status is "Completed" (2).
Retrieve the report - Use this method GET /api/contact_search/<Contact search report ID>/export to export the report
GET /api/contact_search/<Contact search report ID>
Description
This method fetches a contact search (without results) and it can also be used for checking the contact search status.
...
Key | Description |
---|---|
status | Contact search status, 1 = Pending, 2 = Completed |
status_desc | Contact search status description (Pending / Completed) |
GET /api/contact_search/<Contact search report ID>/export
Description
This method exports a contact search report in CSV format, just like in the UI of the platform.
GET /api/contact_search
Description
This method fetches a collection of contact searches (without the results).
...
Optional int
limit
Optional int
POST /api/contact_search
Description
This method creates a new contact search.
...
Code Block |
---|
{ "title":"All contacts from specific segment", "filters":{ "type":"Active", "criteria":[ { "type":"segment", "operand": [ 123456 ], // segment ID "condition": "and" } ] } } |
Request Example - Creates contact activity report
...
Code Block |
---|
{ "metadata": { "error": false }, "payload": { "list_id": 12345, "title": "All Members: Email is not empty", "include_behavior": false, "filters": { "type": "Active", "criteria": [ { "type": "string", "operator": "notempty", "operand": [ "" ], "case_sensitive": 0, "condition": "and", "field_id": "123456", "field_name": "email" } ], "user_type": "all" }, "combined_as_and": true, "account_id": 1234, "status": 1, "desc": "Pending", "id": 82169, // This is ID of the search report that was created "created": 1470930202, "modified": 1470930202 } } |
DELETE /api/contact_search/<Contact search report ID>
Description
This method deletes a contact search.
...