get_campaign_eventstoken required
Returns the caller's campaign-membership events over a time window, newest first: every event one of the caller's own vehicles raised into a campaign. Any client can use it.
/api— body field action.name = "get_campaign_events"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
from_datetime | date | optional | Window start. Accepts `YYYY-MM-DD`, `YYYY-MM-DD HH:MM:SS`, or ISO with an offset (`2026-08-01T00:00:00+03:00`). A value carrying no zone is read as UTC, NOT the caller's local time, so a control room on Israeli time should send the offset explicitly. A non-existent date such as 2026-02-30 is rejected with action_value '1'. Omitted, the window starts 24 hours before `to_datetime`, so with both omitted it is the last 24 hours.e.g. 2026-08-01 00:00:00 |
to_datetime | date | optional | Window end, same forms as `from_datetime`. A BARE DATE is that day's UTC midnight, not its end: `to_datetime=2026-08-31` stops BEFORE 31 August's alerts, and the same date in both fields is a zero-width window that returns nothing. To cover a whole day, end it at `23:59:59`. Omitted, it is the current time. The window may not exceed 31 days (action_value '3'). When both are given, `from_datetime` may not be later than `to_datetime` (action_value '2'); a future `from_datetime` with `to_datetime` omitted is not an error and returns no events.e.g. 2026-08-31 23:59:59 |
campaign_id | string | optional | Comma-separated positive integers narrowing to specific campaigns. Supplied but blank, or any non-positive / non-integer part, is rejected with action_value '1'. Omitted means every campaign the caller's vehicles raised events into. Campaign ids are not part of this action's response, which carries the campaign name only.e.g. 1024,1108 |
license_number | string | optional | Narrow to a single licence plate. Exact match against the plate as stored, which is the `license_number` this action returns once URL-decoded. A differently formatted plate, for example with added dashes or spaces, matches nothing and returns an empty success.e.g. 12345678 |
language_code | number | optional | Translation language for `description`. Must be a positive integer. Defaults to 7002 (Hebrew), the language the legacy procedure hard-codes; an unknown code falls the description back to the untranslated text.e.g. 7002 |
offset_page | number | optional | 1-based page index. Must be supplied together with `show_in_page`, both as whole numbers, or the pair is rejected with action_value '1'. 0 is read as 1.e.g. 1 |
show_in_page | number | optional | Page size. Defaults to 500 when paging is omitted. Larger values are reduced to 5000, and 0 is read as 1. Must be supplied together with `offset_page`.e.g. 500 |
Notes
Request
curl -X POST 'https://private.develop-1.questar.io/v2/private-questar-units/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data '{"action":{"name":"get_campaign_events","parameters":[{"from_datetime":"2026-08-01 00:00:00","to_datetime":"2026-08-31 23:59:59","campaign_id":"1024,1108","license_number":"12345678","language_code":7002,"offset_page":1,"show_in_page":500}]}}'{
"action": {
"name": "get_campaign_events",
"parameters": [
{
"from_datetime": "2026-08-01 00:00:00",
"to_datetime": "2026-08-31 23:59:59",
"campaign_id": "1024,1108",
"license_number": "12345678",
"language_code": 7002,
"offset_page": 1,
"show_in_page": 500
}
]
}
}Response
Successful responses always wrap the action's payload in response.properties. The action_value field reports the handler outcome: "0" for success, "1" for invalid params, "2" for not allowed, "3" for limit-exceeded /pagination-session-expired, "999" for general error.
Authentication is checked before the action runs and fails the same way for every action. A token that is not valid returns HTTP 200 with action_value "2" and description invalid_session; an empty bearer returns "2" with session_token_required. Read the description to tell these apart from an action's own "2". With no Authorization header the gateway answers HTTP 401 {"message":"Unauthorized"}, and with a bearer that is not a token HTTP 403 {"message":"Forbidden"}.
{
"response": {
"properties": {
"action_name": "get_campaign_events",
"action_value": "0",
"description": "success",
"data": [
{
"campaign": "Campaign%20Name",
"event": "Harsh%20Braking",
"description": "Speeding%20Alert",
"starttime": "1723968135",
"license_number": "12345678"
}
]
}
}
}