Create Fatigue and Distration Occurrence
/v2/alarms/occurrences/fatigueanddistraction
Description
Receives and processes a Fatigue or Distraction alarm occurrence.
It requires a Fatigue/Distraction alarm definition previously created for the vehicle.
Notifications configured in the definition of the alarm won't be triggered if the flag sendNotification is set to false
.
Parameter
The parameter is a JSON structure, provided as payload of the request, that specifies the fields used for the alarm occurrence request.
The fields vehicleId, fatigueAndDistractionAlarmType and timestamp are mandatory, while sendNotification has the default value false when not provided.
{
"vehicleId": 12345,
"fatigueAndDistractionAlarmType": 1,
"timestamp": "2023-09-29T10:20:30.123",
"sendNotification": true
}
Field | Description |
vehicleId |
The vehicle internal identifier.
|
fatigueAndDistractionAlarmType |
Specifies the alarm occurrence type: "Fatigue" (1) or "Distraction" (2)
|
timestamp |
The timestamp of the alarm occurence.
|
sendNotification |
Specifies if the alarm notifications should be overriden or not. When False even if the alarm definitions has notifications activated, they should be ignored. When True the alarm definition notification rules should be respected. |
Response HTTP Codes
200 - OK
- OK
400 - BadRequest
- The request parameter is not specified or has an invalid values. The request must have at least the brackets ()
401 - Unauthorized
- The token is invalid
403 - Forbidden
- User does not have permission to submit alarm occurrences