View Modal Basic report
View Modal Basic report
Sortable fields are: event_date, modal_id, modal_name, modal_type, container_id, container_name, container_type, partner_id, partner_name, ab_test_id, ab_test_name, variation_id, variation_name, avg_score, profiles, first_views, comments, promoters, promoters_rate, passives, passives_rate, detractors, detractors_rate, requests, total_responses, completed_responses, uncompleted_responses, response_rate, completion_rate, profile_rate, bounce_rate, comment_rate.
Filterable fields are: event_date, modal_id, modal_name, modal_type, container_id, container_name, container_type, partner_id, partner_name, ab_test_id, ab_test_name, variation_id, variation_name, avg_score, profiles, first_views, comments, promoters, promoters_rate, passives, passives_rate, detractors, detractors_rate, requests, total_responses, completed_responses, uncompleted_responses, response_rate, completion_rate, profile_rate, bounce_rate, comment_rate.
To get data by the time in your local time zone, you should set tz query parameter to the specific time zone. See the list of valid time zones here -> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.
For easier search, Reports API gives you the possibility of using one of the following labels: today, yesterday, last-7-days, last-30-days, last-24-hours, this-month, last-month, current-hour, last-hour, last-48-hours, last-2-days, month-to-date, month-to-yesterday, quarter-to-date.
When filtering event_date, use one of the following formats:
- Single format: YYYY-mm-dd;
Displaying stats for this specific day - Range format: rf:YYYY-mm-dd,YYYY-mm-dd;
Requires usage of the range operators:- r - range - The value must be in a specified open range, where both endpoints are excluded.
- rf - range full - The value must be in a specified closed range, where both endpoints are included.
- rl - range left - The value must be in a specified half-open range, where only left or start point is included.
- rr - range right - The value must be in a specified half-open range, where only right or end point is included.
Displaying stats in this specific range.
- r - range - The value must be in a specified open range, where both endpoints are excluded.
- Hour range format: rl: YYYY-mm-dd hh:00:00,YYYY-mm-dd hh:00:00
If you exclude this parameter, the default setup displays last-100-days stats.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Query parameters
parametersResponse schemas
curl -X GET \
"https://api.ocamba.com/v1/hood/reports/modals/basic" \
-H "Authorization: Bearer {TOKEN}"const url = 'https://api.ocamba.com/v1/hood/reports/modals/basic';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v1/hood/reports/modals/basic");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
200 OK
[
{
"modal_id": "1030448",
"modal_type": "nps",
"avg_score": 6.82,
"profiles": 223,
"comments": 57,
"promoters": 5,
"passives": 200,
"detractors": 55,
"total_responses": 800,
"response_rate": 78.86,
"completion_rate": 48.82,
},
]
400 Bad Request
{
"code": 400,
"title": "Bad request.",
"message": "The request is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}