Update booking for a sensor
PUT
/presence/{id}/booked
const url = 'https://api.occulights.com/api/v1/presence/example/booked';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"booked":true,"deviceType":"hub"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.occulights.com/api/v1/presence/example/booked \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "booked": true, "deviceType": "hub" }'Update the booking status for a specific sensor
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Sensor ID
Request Body
Section titled “Request Body”Booking state, true = book, false = release
Media typeapplication/json
True = book, false = release
object
booked
boolean
deviceType
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Bad Request
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Unauthorized
Media typeapplication/json
string
Example generated
exampleNot Found
Media typeapplication/json
object
message
string
Example generated
{ "message": "example"}Internal Server Error
Media typeapplication/json