Calven
  1. Presence
Calven
  • Overview
  • Key Access Levels
  • Basic Authentication Overview
  • HMAC Authentication Overview
  • SDKs
  • Calven Data Models
  • HMAC Authentication
    • Generate a token with an API key and HMAC
      POST
    • Generate a token with an API key and client secret
      POST
  • Presence
    • Presence Overview
    • Submit presence events with BASIC auth
      POST
    • Submit presence events
      POST
  • Occupancy
    • Occupancy Overview
    • Submit occupancy events
      POST
  • Time off
    • Submit time off updates
      POST
  • Access Credentials
    • Submit access credentials
      POST
  • Warehouse - Basic Auth
    • Warehouse Overview
    • Users
      GET
    • Locations
      GET
    • Desks
      GET
    • Bookings & Attendance
      GET
    • Presence Details
      GET
    • User Actions Log
      GET
  • Warehouse - HMAC Auth
    • Warehouse Overview
    • Users
      GET
    • Locations
      GET
    • Desks
      GET
    • Bookings & Attendance
      GET
    • Presence
      GET
    • User Actions Log
      GET
  1. Presence

Submit presence events

POST
/v1/presence
EventsPresence
Submit presence events to Calven.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
sourceId
string 
required
The unique identifier for the presence source - available from the source system configuration screen in back office.
presenceEvents
array[object (PresenceEventDto) {7}] 
required
The set of presence events to be processed.
timestamp
string 
required
Timestamp of the event.
Example:
2021-09-01T12:00:00.000Z
locationId
string 
required
Calven identifier for the target item where the event occurred.
locationType
enum<string> 
required
Type of target item specified by targetId.
Allowed values:
levellocationplacespacezone
eventId
string 
required
An identifier for this event
sourceUserId
string 
optional
An opaque, lifetime unique identifier for the user in the source system, whose presence was detected.
userId
string 
optional
The Calven user identifier for the user whose presence was detected
userEmail
string 
optional
The identifier (Email address) for the user whose presence was detected.
Example
{
    "sourceId": "string",
    "presenceEvents": [
        {
            "timestamp": "2021-09-01T12:00:00.000Z",
            "locationId": "string",
            "locationType": "level",
            "eventId": "string",
            "sourceUserId": "string",
            "userId": "string",
            "userEmail": "string"
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.calven.com/v1/presence' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sourceId": "string",
    "presenceEvents": [
        {
            "timestamp": "2021-09-01T12:00:00.000Z",
            "locationId": "string",
            "locationType": "level",
            "eventId": "string",
            "sourceUserId": "string",
            "userId": "string",
            "userEmail": "string"
        }
    ]
}'

Responses

🟢200Success
application/json
Body
sourceId
string 
required
The unique identifier for the presence source - available from the source system configuration screen in back office.
timestamp
string 
required
Timestamp that the response was generated.
Example:
2021-09-01T12:00:00.000Z
results
array[object (EventResultDto) {3}] 
required
The results for the presence events that were submitted
eventId
string 
required
An identifier for this presence event
resultCode
enum<number> 
required
Result code for the event
Allowed values:
01234
message
string 
required
Explanation message associated with the resultCode
Example
{
    "sourceId": "string",
    "timestamp": "2021-09-01T12:00:00.000Z",
    "results": [
        {
            "eventId": "string",
            "resultCode": 0,
            "message": "string"
        }
    ]
}
🟠401Payload when auth header is missing or invalid
Previous
Submit presence events with BASIC auth
Next
Occupancy Overview
Built with