Search v1.2

Powerful rules which can be used to segment your subscriber data.

What can I do with search?

Create and manage searches in order to target your subscribers more efficiently.

The result set can differ per sub-user if the user executing a search has limited visibility of lists due to restricted categories.

GET /search or /search/:id

AttributeTypeFilterSortDescription
id
intYesYesUnique ID of the resource.
expression
stringNoNoXML representing a subscriber search query. (docs coming soon).
description
string/nullNoNoA user-specified description of the search. Maximum length is 255 octets.
name
stringNoYesThe name of the search. Maximum length is 64 octets.
type
enumYesNoThe type of search: "audience" or "lookup". Defaults to "audience".
user_id
intYesNoID of the user who created the search.
cdate
decimalNoYesCreation timestamp.
mdate
decimalNoNoLast modification timestamp.

All users can see all rules.

Searches with the type 'lookup' are temporary searches that will be removed after one month if the corresponding searchexecute resultset expires. They are intended for one-time searchexecute lookups only. Searches with the type 'audience' are permanent unless explicitly deleted.

HEAD /search or /search/:id

AttributeTypePresenceDescription
id
intOptionalUnique ID of the resource.
type
enumOptionalThe type of search: "audience" or "lookup". Defaults to "audience".
user_id
intOptionalID of the user who created the search.

POST /search

AttributeTypePresenceDescription
expression
stringRequiredXML representing a subscriber search query. (docs coming soon).
description
string/nullOptionalA user-specified description of the search. Maximum length is 255 octets.
name
stringRequiredThe name of the search. Maximum length is 64 octets.
type
enumOptionalThe type of search: "audience" or "lookup". Defaults to "audience".

Searches with the type 'lookup' are temporary searches that will be removed after one month if the corresponding searchexecute resultset expires. They are intended for one-time searchexecute lookups only. Searches with the type 'audience' are permanent unless explicitly deleted.

PUT /search or /search/:id

AttributeTypePresenceDescription
id
intRequiredUnique ID of the resource.
expression
stringOptionalXML representing a subscriber search query. (docs coming soon).
description
string/nullOptionalA user-specified description of the search. Maximum length is 255 octets.
name
stringOptionalThe name of the search. Maximum length is 64 octets.

All users can edit all rules.

DELETE /search or /search/:id

AttributeTypePresenceDescription
id
intRequiredUnique ID of the resource.

Error codes

There are no error codes for this endpoint.

Examples

JSON response

{
    "id"          : 123456,
    "expression"  : "<?xml version="1.0" encoding="utf-8"?><and><search type="data"><gt><spf>number_of_visits</spf> [...]",
    "description" : "All subscribers who have completed five or more purchases, or have spent over $100",
    "name"        : "Engaged purchasers",
    "type"        : "audience",
    "user_id"     : 123,
    "cdate"       : 123456,
    "mdate"       : 123456
 }