Create alert
Create Alert
Create Alert endpoint allows our customers to create alerts that are triggered when one of Genlogs sensors detect a truck that match the alert criteria, sending an email with the detection results.
This endpoint is restricted to authorized users with appropriate permissions.
Authentication
Include the following headers in your requests:
Access-Token: The access token obtained from the "Create Access Token" endpoint.
x-api-key: The API key provided by GenLogs. This header must be included in the request.
Endpoint
URL:
https://api.genlogs.io/alerts
Method:
POST
Request Parameters
email (string, Required): The email address to the alert results if a match is found
cc_emails (array of strings, Optional): List of additional email addresses to receive notifications if a match is found based on alerts criteria
alert_type (string, Required): Specifies the type of alert to be sent.
normal: Triggered once per day.
hot: Triggered every 15 minutes, with a maximum of 3 alerts per email. After 24 hours, these alerts are converted to normal alerts.
disabled (boolean, Required): Whether the alert is active or disabled.
alert_name (string, Required): The name of the alert for identification.
usdot_or_mc_number (string, Optional): The USDOT or MC number to be used as criteria when searching for assets when an alert is triggered. It is recommended to use the USDOT number.
license_plate (string, Optional): The license plate number related to the alert.
vin (string, Optional): Last 6 Digits of the vehicle identification number.
cab_number (string, Optional): The cab number associated with the vehicle.
trailer_logo (string, Optional): The logo displayed on the trailer.
The logo displayed on the trailer. See Trailer logos for options.
trailer_number (string, Optional): The trailer number associated with the alert.
exact_match_trailer_number (boolean, Optional): Specifies whether the trailer number search should match exactly or be treated as a “contains” search.
true: Performs an exact match for the trailer number.
false: Utilizes a “contains” search for the trailer number.
Response Codes
200 OK: Successfully created the alert.
400 Bad Request: Missing or invalid parameters.
401 Unauthorized: Authentication credentials are missing or incorrect.
403 Forbidden: The user does not have permission to create alerts.
500 Internal Server Error: An issue occurred on the server.
Response Body:
id (integer): Unique identifier for the alert.
email (string): The email address associated with the alert.
cc_emails (array of strings): List of additional email addresses for notifications.
alert_name (string): The name of the alert.
disabled (boolean): Indicates whether the alert is active or disabled.
alert_type (string): Type of alert (
normal
orhot
)usdot_or_mc_number (string): The USDOT or MC number associated with the alert.
location_state (string, nullable): State where the alert is triggered.
location_city (string, nullable): City where the alert is triggered.
license_plate (string, nullable): License plate involved in the alert.
vin (string, nullable): Vehicle Identification Number.
cab_number (string, nullable): Cab number.
trailer_logo (string, nullable): Logo on the trailer.
trailer_number (string, nullable): Trailer number.
exact_match_trailer_number (boolean): Indicates if the trailer number must match exactly.
Request Example
Using curl
:
This API ensures secure alert creation while maintaining proper role-based access control.
Last updated