curl --request POST \
--url https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"eventID": "<string>",
"measuredAt": "2018-10-07T08:32:03Z",
"sensorRef": "WDYIS-12312-A12",
"presenceState": "PRESENT",
"presenceCount": 1,
"timeout": 600
}
]
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
eventID: '<string>',
measuredAt: '2018-10-07T08:32:03Z',
sensorRef: 'WDYIS-12312-A12',
presenceState: 'PRESENT',
presenceCount: 1,
timeout: 600
}
])
};
fetch('https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence"
payload = [
{
"eventID": "<string>",
"measuredAt": "2018-10-07T08:32:03Z",
"sensorRef": "WDYIS-12312-A12",
"presenceState": "PRESENT",
"presenceCount": 1,
"timeout": 600
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Sensor Based Location Presence Events
Send multiple sensor events. Send a sensor event for each presence count change (i.e. 3 to 4) or before timeout occurs (specified by timeout parameter), whichever happens first.
The sensor’s presence count will be automatically reset to 0 after the specified or default timeout. The presenceCount takes precedence over the presenceState that has been deprecated
curl --request POST \
--url https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"eventID": "<string>",
"measuredAt": "2018-10-07T08:32:03Z",
"sensorRef": "WDYIS-12312-A12",
"presenceState": "PRESENT",
"presenceCount": 1,
"timeout": 600
}
]
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
eventID: '<string>',
measuredAt: '2018-10-07T08:32:03Z',
sensorRef: 'WDYIS-12312-A12',
presenceState: 'PRESENT',
presenceCount: 1,
timeout: 600
}
])
};
fetch('https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.{customerId}.ch.locatee.com/public/api/ingress/v2/location/sensor/presence"
payload = [
{
"eventID": "<string>",
"measuredAt": "2018-10-07T08:32:03Z",
"sensorRef": "WDYIS-12312-A12",
"presenceState": "PRESENT",
"presenceCount": 1,
"timeout": 600
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The ID of the event generated by the originating system.
36When this event had occurred.
"2018-10-07T08:32:03Z"
The unique case-sensitive sensor identifier.
"WDYIS-12312-A12"
Describes the presence of the client device.
PRESENT, ABSENT "PRESENT"
The total number of connected devices (network connectivity) or detected people (sensors).
For wireless presence events, the presenceCount is expected to be 1 if the client device is connected to the network and 0 if the client device is disconnected.
For sensor events, the presenceCount is expected to be 1 if the sensor detects a person's presence. For people-counting sensors, the presenceCount is expected to be the number of detected people by the sensor.
1
Timeout in seconds until the presence count will reset to 0. The default value of timeout is 15min (900s). Ideal value is 2 times the readout frequency if 0 presenceCount events do not exist in the source system.
600
Response
Successful Operation

