Stannp | Direct Mail Marketing Platform
package icon
Choose the right postage when sending on the API Are you sending personal information, or marketing content? Before you send your mail, know the key difference between First-Class and USPS Marketing Mail. Read our blog to find out more.

Create a filter selection

Creates an auto filter for a group.

[POST]
https://api-us1.stannp.com/v1/selections/new

Parameters

ParameterDetailsDescription
group_id
int required
Mandatory. The ID of the group to associate this selection with.
name
str optional
Name your filter.
filters
str optional
A specially formatted string to represent your filters. eg: total_spent:::more_than:::300 The format is based on the following: [column_name]:::[string_operator]:::[value] The string operators available are: matches, contains, begins, ends, before, after, less_than, more_than, is_not. You can chain multiple filters together like this: total_spent:::more_than:::300:::AND:::country:::matches:::GB

Request Example

        curl "https://api-us1.stannp.com/v1/selections/new" \
  -u {API_KEY}: \
  -d "group_id=1" \
  -d "name=update" \
  -d "filters=Steve"
    

Response Example

{
  "success": true,
  "data": [
    {
      "id": "1234"
    }
  ]
}