Filter

Overview

The Filter endpoint allows you to manage your Filters, by creating new Filters, or by requesting information about or updating existing Filters.

For more details on how to set up a Filter API request, please see the Filter API Technical Guide.

Filters can also be created from the Filters screen, or from the New Item screen (see Create a New Item: Filter for more details).

The Filter endpoint is:

GET Method

The Filter endpoint supports the following GET operation. This operation is intended to retrieve information about an existing Filter.

Retrieve a Filter

This endpoint allows you to retrieve information about a specified Filter by providing its Object Reference ID.

Click hereClick here to see a sample response message in JSON format.

{

  "filter_id": 37681,

  "filter_name": "Summer campaign audience",

  "cust_id": 394,

  "entity_id": 100,

  "type": "MULTIPART",

  "status_id": "NEW",

  "time_zone_id": "Central Standard Time",

  "filterParams": [

    {

      "filter_id": 37681,

      "param_id": 1,

      "param_name": "operator",

      "string_val": "AND"

    }

  ],

  "filterParts": [

    {

      "parent_filter_id": 37681,

      "child_filter_id": 37684,

      "seq": 1,

      "childFilter": {

        "filter_id": 37684,

        "filter_name": "Summer campaign audience",

        "cust_id": 394,

        "entity_id": 100,

        "type": "BIRTHDAY_FORMULA",

        "status_id": "NEW",

        "time_zone_id": "Central Standard Time",

        "filterParams": [

          {

            "filter_id": 37684,

            "param_id": 1,

            "param_name": "prop_id",

            "integer_val": 13779,

            "string_val": "13779"

          },

          {

            "filter_id": 37684,

            "param_id": 2,

            "param_name": "mode",

            "string_val": "datediff"

          },

          {

            "filter_id": 37684,

            "param_id": 3,

            "param_name": "datepart",

            "string_val": "month"

          },

          {

            "filter_id": 37684,

            "param_id": 4,

            "param_name": "diff_time",

            "string_val": "2017-08-01",

            "datetime_val": "2017-08-01T00:00:00"

          },

          {

            "filter_id": 37684,

            "param_id": 5,

            "param_name": "diff_count",

            "integer_val": 0,

            "string_val": "0"

          },

          {

            "filter_id": 37684,

            "param_id": 6,

            "param_name": "diff_count_operator",

            "string_val": "="

          }

        ]

      },

      "filterPartStat": {

        "parent_filter_id": 37681,

        "child_filter_id": 37684

      }

    },

    {

      "parent_filter_id": 37681,

      "child_filter_id": 37683,

      "seq": 2,

      "childFilter": {

        "filter_id": 37683,

        "filter_name": "Summer campaign audience",

        "cust_id": 394,

        "entity_id": 100,

        "type": "FORMULA",

        "status_id": "NEW",

        "time_zone_id": "Central Standard Time",

        "filterParams": [

          {

            "filter_id": 37683,

            "param_id": 1,

            "param_name": "prop_id",

            "integer_val": 11657,

            "string_val": "11657"

          },

          {

            "filter_id": 37683,

            "param_id": 2,

            "param_name": "operator",

            "string_val": "="

          },

          {

            "filter_id": 37683,

            "param_id": 3,

            "param_name": "value_1",

            "string_val": "F"

          }

        ]

      },

      "filterPartStat": {

        "parent_filter_id": 37681,

        "child_filter_id": 37683

      }

    },

    {

      "parent_filter_id": 37681,

      "child_filter_id": 37682,

      "seq": 3,

      "childFilter": {

        "filter_id": 37682,

        "filter_name": "Summer campaign audience",

        "cust_id": 394,

        "entity_id": 100,

        "type": "FORMULA",

        "status_id": "NEW",

        "time_zone_id": "Central Standard Time",

        "filterParams": [

          {

            "filter_id": 37682,

            "param_id": 1,

            "param_name": "prop_id",

            "integer_val": 10910,

            "string_val": "10910"

          },

          {

            "filter_id": 37682,

            "param_id": 2,

            "param_name": "operator",

            "string_val": ">="

          },

          {

            "filter_id": 37682,

            "param_id": 3,

            "param_name": "value_1",

            "string_val": "100.0000"

          }

        ]

      },

      "filterPartStat": {

        "parent_filter_id": 37681,

        "child_filter_id": 37682

      }

    }

  ],

  "filterStat": {

    "filter_id": 37681

  },

  "filterStatProps": [

    {

      "filter_id": 37681,

      "prop_id": 1155,

      "top_amount": 1000,

      "viewColumn": {

        "col_id": 1048,

        "view_id": 1002,

        "display_name": "Email Address Status ID",

        "display_seq": 3,

        "prop_id": 1155,

        "viewColPicks": []

      }

    }

  ],

  "obj": {

    "obj_id": 46435,

    "display_name": "Summer campaign audience",

    "type_id": "Filter",

    "ref_id": 37681,

    "parent_obj_id": 37249,

    "eligibility_status_id": "READY"

  }

}

 

POST Method

The Filter endpoint supports the following POST operations.  

Create a Filter

This endpoint allows you to create a new Filter by providing the following information:

Calculate a Filter

This endpoint allows you to execute a Filter. You must provide the Filter's Object Reference ID.

Please note that the response message to the POST request will not contain the Filter counts. You must submit a GET request to see the Filter counts. Depending on the complexity of the Filter logic, you may need to wait a few moments for the Filter to complete. In the GET response, if the "status_id" parameter is "RUNNING," then the Filter is not yet complete; simply wait and try the GET request again. If the "status_id" parameter  is "DONE," then the Filter is complete, and you can view the counts within the response message.

 

PUT Method

The Filter endpoint supports the following PUT operation. This operation is intended to update an existing Filter.

Update a Filter

This endpoint allows you to submit modifications to an existing Filter. The request message must include the Filter's Object Reference ID, and the desired changes. Using this endpoint, you can change the Filter name, and change the logical criteria that make up the Filter.  

 

DELETE Method

The Filter endpoint supports a DELETE operation that will delete the specified Filter. You must provide the Object Reference ID for the desired Filter.

Note: Deleted Filters are moved to the Recycle Bin.

 

Back to API Category - Campaign Management