Send command to sound horn or turn on hazard lights on vehicle
POST/vehicles/commands/:registration
This function requires a specific fitment by Cartrack. You can remotely sound the horn on the vehicle or turn on the hazard lights by sending the commands "HORN", "HAZARD_LIGHTS". A device is installed in your vehicle and reproduces the keyfob signals.
- "HORN": this command turns on the keyfob in the car and uses it to send the horn command.
- "HAZARD_LIGHTS": this command turns on the keyfob in the car and uses it to send the hazard lights command.
Not all vehicles and devices are compatible with this function.
To prevent duplicate commands, the same command cannot be sent to the same vehicle while a previous one is still being processed (up to 30 seconds). In that case the API responds with an HTTP 409 error and a Retry-After header indicating the number of seconds to wait before retrying.
A 200 response means the instruction was queued for the terminal. A vehicle that is not on your account, or that has no active contract on a hardware type this API supports, answers 404. When the instruction could not be sent at all, because the vehicle has no terminal on its active contract or the terminal cannot currently be reached, the API answers 422 and nothing reaches the vehicle.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 500
- 503
Successful operation
The request body is declared as JSON but cannot be parsed, or is not a JSON object or array. Nothing was processed.
Unauthorized access. Authentication is required.
Access is forbidden. The user does not have permission to access this resource, or the account is not currently active.
The requested resource was not found.
A command of the same type was recently sent to this vehicle and is still being processed. Wait for the number of seconds indicated in the Retry-After header before sending the command again.
Response Headers
The number of seconds to wait before the command can be sent again.
Validation failed for the input parameters.
Internal server error.
Service temporarily unavailable. The request did not complete and can be retried after the number of seconds in the Retry-After header, when one is sent.
Response Headers
Seconds to wait before retrying. Sent with db_busy and db_pool_timeout.