Generate Authentication Token

The first step always starts with authenticating your account. The authentication token is generated based on the data passed in. The endpoints that can be accessed will be regulated by the token via the scopes definition. For example, if a analytic scope is not passed in, it will not be possible to query data on the analytics endpoint. This will all be regulated by the server and any unauthorized access will return a 401. Check below for more information.

Required Parameters

client_id A unique identifier for your account. You may find it in your profile page. Just click your email address at the top navigation menu. It will show up on the right column.client_secret The secret for your account. It will also show up in your profile page.scope Specifies what endpoints are going to be granted access through the generated token. Example Values: "impressions", "user", "analytic", "app user"username Usernamepassword Password for the provided usernamegrant_type Grants you access depending on the information you pass. Can either be ' http://api.imrsv.com/grant_type/device_app/1.0 ' or 'REFRESH_TOKEN' check the documentation for refreshing the token access.

Response

Refresh Access Token

After the access token expires, a new one should be generated to keep working with the API. We recommend using this endpoint to refresh your token, it's going to have a faster response.

Required Parameters

client_id A unique identifier for your account. You may find it in your profile page. Just click your email address at the top navigation menu. It will show up on the right column.client_secret The secret for your account. It will also show up in your profile page.scope Specifies what endpoints are going to be granted access through the generated token. Example Values: "impressions", "user", "analytic", "app user"refresh_token The token for refreshgrant_type Grants you access depending on the information you pass. Can either be ' http://api.imrsv.com/grant_type/device_app/1.0 ' or 'REFRESH_TOKEN' check the documentation for refreshing the token access.

Get Impression Averages

Retrieves impression's average based on a camera key and a date range (defined with the 'from' and 'to' parameters. Additional filters can be passed to the query, check the data section below for more information.

Required Parameters

access_token The token you received during authenticationfrom Select a date to begin the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)to Select a date to end the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)camera_key Camera key

Response

Response

400{
"error": "invalid_token",
"error_description": "Invalid token"
}

Get Impressions

Retrieves the impressions based on a camera key. Additional filters can be used for the query. Results are returned in pages of 200 items. By default it returns the first page with the last 200 records. Use the 'page' parameter to access other records.

Required Parameters

access_token The token you received during authenticationfrom Select a date to begin the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)to Select a date to end the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)camera_key Camera key

Optional Parameters

gender Gender for the impressions. Example Values: "male", "female"age Age for the impressions. Example Values: "child", "young_adult", "adult", "senior"page The number of the page starting with 1. Example Values: "1", "10", "143"

Response

400{
"error": "invalid_token",
"error_description": "Invalid token"
}

Get Impressions Totals

Retrieves impression's totals based on a camera key and a date range (defined with the 'from' and 'to' parameters. Additional filters can be passed to the query, check the data section below for more information.

Required Parameters

access_token The token you received during authenticationfrom Select a date to begin the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)to Select a date to end the filtering (YYYY-MM-DDTHH:MM:SS-TT:TT)camera_key Camera key