This article covers the five filter endpoints in the Indivd API. Use these endpoints to retrieve the integer IDs required when filtering data requests to specific locations, zones, categories, lines, or organisations. All filter endpoints are GET requests and return JSON.
Included in: ✓ Indivd Basic ✓ Indivd Pro ✓ Indivd Complete
Related articles
This article contains the following topics:
Common behaviour
All five filter endpoints share the following behaviour:
- Base URL:
https://api.indivd.com/filters/ - All requests are GET requests.
- All responses are JSON arrays, except
locationswhich returns a single object. - Authentication is required on every request. See Authentication.
- Results are scoped to the locations and organisations your token has access to. Resources outside that scope are not returned.
- Filter endpoints have no required parameters beyond authentication. All parameters are optional.
- When multiple values are accepted for a single parameter (comma-separated), conditions within that parameter are OR. Conditions between different parameters are AND.
- The
timezonefield in thelocationsresponse is used as the default time zone for zone-based data requests scoped to that location. If your locations span multiple time zones, retrieve their timezone values here before making data requests.
Locations
Returns all locations your token has access to. The response includes opening hours per weekday and the timezone identifier for each location.
GET https://api.indivd.com/filters/locations
Note: Use the timezone field when making drop_in_rate requests that span locations in different time zones. If your locations span multiple time zones, make separate requests per time zone group and use the tz parameter to override the default on zone_visitors requests.
Sample request
curl --location --request GET \ 'https://api.indivd.com/filters/locations' \ --header 'Authorization: Token [your-token-here]' \ --header 'Content-Type: application/json'
Sample response
{
"id": 124,
"name": "Sample Location - Stockholm",
"city": "Stockholm",
"country": "SE",
"timezone": "Europe/Stockholm",
"organization": {
"short_name": "Sample organization Ltd",
"id": 13
},
"weekdays": [
{
"weekday": 1,
"opens_at": "10:00:00",
"closes_at": "18:00:00",
"is_open": true,
"location": 124,
"id": 800
}
],
"cameras_count": 0,
"archived": false,
"created_at": "2021-06-21T08:00:58.499447Z"
}Response fields
| Field | Type | Description |
|---|---|---|
id |
Integer | The location ID. Use this value in the location parameter of data requests. |
name |
String | The location name as configured in the Indivd platform. |
city |
String | City where the location is situated. |
country |
String | ISO 3166-1 alpha-2 country code. |
timezone |
String | TZ identifier for the location's local time zone (e.g. Europe/Stockholm). Used as the default time zone for data requests scoped to this location. |
organization.id |
Integer | The organisation ID this location belongs to. |
organization.short_name |
String | Short name of the organisation. |
weekdays |
Array | Opening hours per weekday. One object per day. weekday is an integer from 1 (Monday) to 7 (Sunday). is_open indicates whether the location is open on that day. |
cameras_count |
Integer | Number of cameras configured at this location. |
archived |
Boolean | Whether the location has been archived. Archived locations are returned by this endpoint but will not return data from data endpoints. |
created_at |
String | ISO 8601 timestamp of when the location was created in the Indivd platform. |
Zones
Returns all zones your token has access to. The response includes the bounce_threshold configured per zone, which is used as the default by the zone_visitors endpoint when no bounce_threshold parameter is set in the request.
GET https://api.indivd.com/filters/zones
Note: Always retrieve zone IDs from this endpoint before making drop_in_rate requests. Specifying individual zones is strongly recommended: requesting without the zone parameter produces a summary that aggregates across all zones, which is rarely useful for analysis.
Sample request
curl --location --request GET \ 'https://api.indivd.com/filters/zones' \ --header 'Authorization: Token [your-token-here]' \ --header 'Content-Type: application/json'
Sample response
[
{
"id": 1,
"name": "Demo Zone 1",
"organization": 2,
"bounce_threshold": 120
},
{
"id": 2,
"name": "Demo Zone 2",
"organization": 2,
"bounce_threshold": 60
}
]Response fields
| Field | Type | Description |
|---|---|---|
id |
Integer | The zone ID. Use this value in the zones or zone parameter of data requests. |
name |
String | The zone name as configured in the Indivd platform. |
organization |
Integer | The organisation ID this zone belongs to. Zones are defined at the organisation level, not per location. |
bounce_threshold |
Integer | The default bounce threshold for this zone, in seconds. A visit shorter than this value is classified as a bounce. This value is used by zone_visitors requests unless overridden by the bounce_threshold parameter. Different zones can have different thresholds. |
Categories
Returns all categories available for your locations. Categories group counting lines into logical areas such as departments or product zones. Use category IDs to filter line_crosses requests. Categories are not used by the zone_visitors or drop_in_rate endpoints.
GET https://api.indivd.com/filters/categories
Sample request
curl --location --request GET \ 'https://api.indivd.com/filters/categories' \ --header 'Authorization: Token [your-token-here]' \ --header 'Content-Type: application/json'
Sample response
[
{
"id": 1,
"name": "My first category",
"location": {
"id": 43,
"name": "Sample location"
}
}
]Response fields
| Field | Type | Description |
|---|---|---|
id |
Integer | The category ID. Use this value in the category parameter of line_crosses requests. |
name |
String | The category name as configured in the Indivd platform. |
location.id |
Integer | The location ID this category is linked to. |
location.name |
String | The location name. |
Organisations
Returns the organisations your token has access to. Use organisation IDs to scope line_crosses requests to a specific organisation.
GET https://api.indivd.com/filters/organizations
Note: The endpoint path uses the US English spelling organizations. Use this exact spelling in all requests. Requests to /filters/organisations will return a 404.
Sample request
curl --location --request GET \ 'https://api.indivd.com/filters/organizations' \ --header 'Authorization: Token [your-token-here]' \ --header 'Content-Type: application/json'
Sample response
[
{
"id": 3,
"full_name": "Demo Organization Borås",
"short_name": "Demo Org",
"city": "Borås",
"country": "Sweden",
"is_active": true,
"active_camera_count": 12,
"camera_count": 16,
"created_at": "2022-03-21T08:24:00Z"
}
]Response fields
| Field | Type | Description |
|---|---|---|
id |
Integer | The organisation ID. Use this value in the organization parameter of line_crosses requests. |
full_name |
String | Full legal name of the organisation. |
short_name |
String | Short display name of the organisation. |
city |
String | City where the organisation is registered. |
country |
String | Country where the organisation is registered. |
is_active |
Boolean | Whether the organisation is currently active. |
active_camera_count |
Integer | Number of cameras currently active across all locations in this organisation. |
camera_count |
Integer | Total number of cameras configured across all locations in this organisation, including inactive ones. |
created_at |
String | ISO 8601 timestamp of when the organisation was created in the Indivd platform. |
Lines
Returns all counting lines your token has access to. Use line IDs to filter line_crosses requests to specific entry or exit points. All parameters are optional: without any, all lines are returned.
GET https://api.indivd.com/filters/lines
Note: Lines in the response may show null for zone_to, zone_from, and category. This indicates the line has not been assigned to a zone or category in the Indivd platform configuration. Unassigned lines still count crossings and can be queried by line_ids directly.
Parameters
Conditions between parameters are AND; conditions within a single parameter are OR. For example: category=1,3 and floor=2,5 returns lines where category is (1 OR 3) AND floor is (2 OR 5).
| Name | Description | Required |
|---|---|---|
category |
Integer ID. Comma-separated for multiple values. Filters to lines belonging to the specified categories. | No |
floor |
Integer ID. Comma-separated for multiple values. Negative values supported for basement floors. | No |
line_ids |
Integer ID. Comma-separated for multiple values. Filters to specific lines by ID. | No |
location |
Integer ID. Single value only. | No |
organization |
Integer ID. Single value only. | No |
zone_from |
Integer ID. Comma-separated for multiple values. Filters to lines where the visitor is exiting the specified zone. | No |
zone_to |
Integer ID. Comma-separated for multiple values. Filters to lines where the visitor is entering the specified zone. | No |
Sample request
curl --location --request GET \ 'https://api.indivd.com/filters/lines' \ --header 'Authorization: Token [your-token-here]' \ --header 'Content-Type: application/json'
Sample response
[
{
"id": 269,
"name": "Enter shoes",
"zone_to": null,
"zone_from": null,
"category": null,
"cameras": [158]
},
{
"id": 270,
"name": "Exit shoes",
"zone_to": null,
"zone_from": null,
"category": null,
"cameras": [158]
}
]Response fields
| Field | Type | Description |
|---|---|---|
id |
Integer | The line ID. Use this value in the line_ids parameter of line_crosses requests. |
name |
String | The line name as configured in the Indivd platform. |
zone_to |
Integer or null | The zone ID the line counts entries into. null if the line has not been assigned a destination zone. |
zone_from |
Integer or null | The zone ID the line counts exits from. null if the line has not been assigned a source zone. |
category |
Integer or null | The category ID this line belongs to. null if the line has not been assigned to a category. |
cameras |
Array of integers | IDs of the cameras associated with this line. |
Error reference
All five filter endpoints use standard HTTP status codes.
| HTTP status | Meaning | Common cause |
|---|---|---|
200 OK |
Request succeeded | Includes cases where the token has no access to any resources of the requested type, in which case an empty array is returned. |
401 Unauthorized |
Authentication failed | Missing or malformed Authorization header, or invalid token. See Authentication. |
403 Forbidden |
The token does not have access to the requested resource | The location or organisation is outside the token's scope. |
500 Internal Server Error |
An unexpected error occurred on the Indivd side | Check indivd.statuspage.io for active incidents before investigating further. |
Comments
0 comments
Please sign in to leave a comment.