These endpoints allow you to create, edit, and delete searches. You can also retrieve the members matching any search created in your account. You can get more details on how to construct searches.
Retrieve a list of saved searches.
Parameters: |
|
---|---|
Returns : | An array of searches. |
Get the details for a saved search.
Returns : | A search. |
---|---|
Parameters: |
|
Raises : | Http404 if the search does not exist. |
Create a saved search.
The detail of a search is specified in a JSON structure that describes the clauses to be applied using groups of filter type, operator and value. Where the filter type is member_field, the referenced field should be specified by joining with a colon. For example:
["and",
["or",
["group", "eq", "my list"],
["group", "contains", "old"]
],
["not", ["member_field", "soup", "eq", "lentil"]],
["opened", 123249, "between", "2011-01-22, 2011-01-31"],
["clicked", 83927]
]
The following parameters are required:
Parameters: |
|
---|---|
Returns : | The ID of the new search |
Raises : | Http400 if the search is invalid |
Update a saved search.
No parameters are required, but either the name or criteria parameter must be present for an update to occur.
Parameters: |
|
---|---|
Returns : | True if the update was successful |
Raises : | Http404 if the search does not exist. |
Raises : | Http400 if the search criteria is invalid |
Delete a saved search. The member records referred to by the search are not affected.
Returns : | True if the search is deleted. |
---|---|
Raises : | Http404 if the search does not exist. |
Get the members matching the search.
Returns : | An array of members. |
---|---|
Raises : | Http404 if the search does not exist. |