Filters data

These endpoints contain data with demographic filters and metric filters. You might want to provide them if you want to filter in part of the datapoints from the timelines.

Demographic filters

This endpoint contains the demographic filters that your company is able to use.

The sector and custom_sector optional parameters are mutually exclusive. Either none or just one of them should be used.

URL
https://api.brandindex.com/v0/filters/demos
Required parameters
region - the region for which the demographic filters should be listed.
Optional parameters
sector - the sector for which the demographic filters should be listed.
custom_sector - the custom sector for which the demographic filters should be listed.
HTTP methods
GET
HTTP statuses
200 - request successful
400 - if required parameters are missing.
404 - if the region was not found.
Response body example

{
  "data":{
    "foo_demo_filter":{
      "1":"First value",
      "2":"Second value"
    },
    "bar_demo_filter":{
      "1":"Yes",
      "2":"No"
    }
  },
  "meta":{
    "foo_demo_filter":"Foo Demo Filter",
    "bar_demo_filter":"Bar Demo Filter"
  },
  "ok":true
}

Each returned item in meta is a demographic filter, comprised of its name as the item key, pointing to its verbose label, only used for display purposes. If a filter doesn't have a label, this value will be null.

Each returned item in data is a demographic filter, comprised of its name as the item key, and a value as an Object which contains each valid ID and its related name.

Demographic filter

This endpoint contains the demographic filter description for a particular demographic filter requested.

URL
https://api.brandindex.com/v0/filters/demo
Required parameters
region - the region for which the demographic filter should be described.
name - the "name" (e.g. bixdemo_gender) for the demographic filter to be described.
HTTP methods
GET
HTTP statuses
200 - request successful
400 - if required parameters are missing.
404 - if either the region or the demographic filter name was not found.
Response body example

{
  "data":{
    "label" : "Some Demo",
    "type" : "multiple",
    "codes" : {
      "1" : "Foo",
      "2" : "Bar"
    },
    "is_core_filter" : false,
    "is_category_filter" : false,
    "is_codebook_filter" : false,
    "is_custom_filter" : true,
    "valid_in_sectors" : [
       12,
       23,
       34
    ]
  },
  "ok":true
}

The returned Object in data is a demographic filter, which contains each field related to it. Some fields start with is_, which determine what kind of filter it is.

An important and very useful field is the valid_in_sectors one, which tells what sectors that demographic filter can be used with.

A less important field is type, which describes whether the demographic filter comes from a multiple-choices question or from a single-choice question. Its value can be either "single" or "multiple"

Metric filters

This endpoint contains the metric filters that your company is able to use.

URL
https://api.brandindex.com/v0/filters/metrics
HTTP methods
GET
HTTP statuses
200 - request successful
Response body example

For a JSON file, just download this example file and look at the format. By the time of this writing, the example file actually contains all metric filters definitions, but the API endpoint should be queried in order to retrieve up-to-date definitions.

Each returned item in meta is a metric filter, comprised of its nickname as the item key, pointing to its verbose name, only used for display purposes.

Each returned item in data is a metric filter, comprised of its nickname as the item key, and a value as an Object which contains each available metric filter value ID and a related verbose name, only used for display purposes.

Composite filters

This endpoint contains the composite filters that your company is able to use.

URL
https://api.brandindex.com/v0/filters/composite-filters
Optional parameters
region - the region for which the composite filters should be listed.
HTTP methods
GET
HTTP statuses
200 - request successful
Response body example

For a JSON file, just download this example file and look at the format.

Each returned item in data is a composite filter, comprised of its ID as the item key, and a value as an Object which contains each available composite filter label, the region it applies to and a url to where the filter is described in more details (like the sectors it's valid for).

Composite filter

This endpoint describes a composite filter that your company is able to use.

URL
https://api.brandindex.com/v0/filters/composite-filter
Required parameters
id - the ID for which the composite filter should be described.
HTTP methods
GET
HTTP statuses
200 - request successful
Response body example

For a JSON file, just download this example file and look at the format.

The returned Object in data is a composite filter, which contains each field related to it.

An important and very useful field is the valid_in_sectors one, which tells what sectors that composite filter can be used with.

Another important field is usable, which describes whether the composite filter can currently be used or not - because the brands and sectors relations might change, a composite filter might turn unusable as it depends on these relations.