Company data

These endpoints contain some relevant data for the user's company.

Company defaults

This endpoint contains the default values used for your company's default region, sector and brand - which are used in a number of scenarios where either of them is not provided.

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

{
  "data": {
    "sector": 123,
    "sectors": "https://api.brandindex.com/v0/company/sectors?region=foo",
    "custom sectors": "https://api.brandindex.com/v0/company/custom-sectors?region=foo",
    "region": "foo",
    "regions": "https://api.brandindex.com/v0/company/regions",
    "brands": "https://api.brandindex.com/v0/company/brands?sector=123&region=foo",
    "brand": 2345,
    "demographic filters": "https://api.brandindex.com/v0/filters/demos?region=foo",
    "metric filters": "https://api.brandindex.com/v0/filters/metrics",
  },
  "ok": true
}

The data element has a number of relevant items for retrieving other kinds of data:

  • brand is the default brand identifier;
  • brands is the URL to list the accessible brands under the default region and sector;
  • region is the default region identifier;
  • regions is the URL to list the regions accessible by your company;
  • sector is the default sector identifier;
  • sectors is the URL to list the sectors under the default region;
  • custom sectors is the URL to list the custom sectors under the default region;
  • demographic filters is the URL to list the demographic filters under the default region;
  • metric filters is the URL to list the metric filters available.

Company regions

This endpoint contains the regions accessible by your company.

URL
https://api.brandindex.com/v0/company/regions
Optional parameters
expired - send a falsy (false, 0, off, no) value to avoid returning expired regions as well. Will return them otherwise.
HTTP methods
GET
HTTP statuses
200 - request successful
Response body example

{
  "data": {
    "cn": "https://api.brandindex.com/v0/company/sectors?region=cn",
    "de": "https://api.brandindex.com/v0/company/sectors?region=de",
    "us": "https://api.brandindex.com/v0/company/sectors?region=us",
    "br": "https://api.brandindex.com/v0/company/sectors?region=br",
    "uk": "https://api.brandindex.com/v0/company/sectors?region=uk",
    "se": "https://api.brandindex.com/v0/company/sectors?region=se",
    "dk": "https://api.brandindex.com/v0/company/sectors?region=dk"
  },
  "ok": true
}

Each item in data is a region, comprised of its identifier (key) and a URL (value) where its sectors can be found.

Company sectors

This endpoint contains the sectors accessible by your company, by region.

URL
https://api.brandindex.com/v0/company/sectors
Required parameters
region - the region for which the sectors should be listed.
Optional parameters
expired - send a falsy (false, 0, off, no) value to avoid returning expired sectors as well. Will return them otherwise.
custom - send a falsy (false, 0, off, no) value to avoid returning custom sectors as well. Will return them otherwise.
inactive - send a falsy (false, 0, off, no) value to avoid returning inactive sectors as well. Will return them otherwise.
HTTP methods
GET
HTTP statuses
200 - request successful
400 - if required parameters are missing.
Response body example

{
  "data": {
    "1": [
      "Foo sector",
      "https://api.brandindex.com/v0/company/brands?sector=1&region=baz"
    ],
    "2": [
      "Bar sector",
      "https://api.brandindex.com/v0/company/brands?sector=2&region=baz"
    ]
  },
  "ok": true
}

Each returned item in data is a sector, comprised of its ID as the item key, and a value as an Array which contains the sector name (item 0) and the endpoint URL for listing its accessible brands (item 1).

Company custom sectors

This endpoint contains the custom sectors accessible by your company, by region.

URL
https://api.brandindex.com/v0/company/custom-sectors
Required parameters
region - the region for which the custom sectors should be listed.
HTTP methods
GET
HTTP statuses
200 - request successful
400 - if required parameters are missing.
Response body example

{
  "data": {
    "1": [
      "Foo custom sector",
      "https://api.brandindex.com/v0/company/brands?custom_sector=1&region=baz"
    ],
    "2": [
      "Bar custom sector",
      "https://api.brandindex.com/v0/company/brands?custom_sector=2&region=baz"
    ]
  },
  "ok": true
}

Each returned item in data is a custom sector, comprised of its ID as the item key, and a value as an Array which contains the custom sector name (item 0) and the endpoint URL for listing its accessible brands (item 1).

Company brands

This endpoint contains the brands accessible by your company, by region and sector.

You may list the brands by either sector or custom_sector, but not both. Be warned, though, that brands listed within custom sectors might not be available anymore to your company - in which case the url will lead to an HTTP 404 Not Found response.

URL
https://api.brandindex.com/v0/company/brands
Required parameters
region - the region for which the brands should be listed.
sector (don't use it if using custom_sector.) - the sector for which the brands should be listed.
custom_sector (don't use it if using sector.) - the custom sector for which the brands should be listed.
Optional parameters
inactive - send a falsy (false, 0, off, no) value to avoid returning inactive brands as well. Will return them otherwise.
HTTP methods
GET
HTTP statuses
200 - request successful
400 - if required parameters are missing.
Response body example

{
  "data": {
    "1000637": {
      "active": true,
      "name": "Gazelle.com",
      "sector": 123,
      "url": "https://api.brandindex.com/some-url"
    },
    "1000666": {
      "active": true,
      "name": "Zoosk",
      "sector": 123,
      "url": "https://api.brandindex.com/some-url"
    }
  },
  "ok": true
}

Each returned item in data is a brand, comprised of its ID as the item key, and a value as an Object which contains its active state, its name, its related sector and a url that provides more details about the brand.