Send command to lock or unlock a vehicle
PUT/vehicles/:registration/central-locking
This function requires a specific fitment by Cartrack. You can remotely lock or unlock the vehicle by sending the commands "UNLOCK", "UNLOCK_0", "LOCK". A device is installed in your vehicle and reproduces the keyfob signals.
- "UNLOCK": this command turns on the keyfob in the car and uses it to send the unlock command. The doors can now be opened. The keyfob stays powered up, the user can turn on the engine.
- "UNLOCK_0": this command turns on the keyfob in the car and uses it to send a different set of unlock command. The doors can now be opened. However, the keyfob will be immediately powered down, the user won't be able to turn on the engine.
- "LOCK": this command turns on the keyfob in the vehicle and it uses it to send a lock command. The doors are now locked. The keyfob is powered down immediately after, the engine can't be turned on.
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.