1. Occupancy
Calven Developer Docs
beta
  • latest
  • beta
  • Default module
    • Access Control
    • Overview
    • SDKs
    • HMAC Authentication
    • Basic Authentication
    • Calven Data Models
    • Changelog
    • Authentication
      • Generate a token with an API key and HMAC
      • Generate a token with an API key and client secret
    • Presence
      • Presence Overview
      • Submit presence events
      • Submit presence events (Basic auth)
    • Occupancy
      • Occupancy Overview
      • Submit occupancy events
        POST
    • Time Off
      • Submit time off updates
    • Access Credentials
      • Submit access credentials
    • Warehouse - Basic Auth
      • Warehouse API (Basic Auth)
      • Users (Basic auth)
      • Groups (Basic auth)
      • Locations (Basic auth)
      • Desks (Basic auth)
      • Bookings & Attendance (Basic auth)
      • Presence (Basic auth)
      • User Actions Log (Basic auth)
      • Events (Basic auth)
    • Warehouse - HMAC Auth
      • Warehouse API (HMAC Auth)
      • Users
      • Groups
      • Locations
      • Desks
      • Bookings & Attendance
      • Presence
      • User Actions Log
      • Events
    • Hierarchy Information
      • Org Hierarchy Information Overview
      • Submit group hierarchy relationships
      • Submit group hierarchy relationships (Basic auth)
    • User Attributes
      • User Attributes Overview
      • Write directory user attributes
      • Write directory user attributes (Basic auth)
    • Visitor Management
      • Submit visitor arrival events
      • Submit visitor arrival events (Basic auth)
    • Parking
      • Retrieve parking bookings
      • Retrieve parking bookings (Basic auth)
    • Service Requests
      • Service Offerings
      • Service Offering
      • Submit a service request
      • Service Request
      • Update a service request
    • Schemas
      • Schemas
      • PresenceEventDto
      • CreatePresenceEventDto
      • SourceEventResultCode
      • SourceEventResultDto
      • CreatePresenceEventResponseDto
      • ApiServiceException
      • VisitorArrivalEventDto
      • CreateVisitorArrivalEventDto
      • CreateVisitorArrivalEventResponseDto
      • OccupancyEventDto
      • CreateOccupancyEventDto
      • CreateOccupancyEventResponseDto
      • AuthRequestDto
      • AuthResponseDto
      • OAuthRequestDto
      • OAuthResponseDto
      • AccessCredentialUpdateResultCodes
      • AccessCredentialUpdateResult
      • AccessCredentialUpdateResponse
      • AccessCredential
      • AccessCredentialUpdate
      • AccessCredentialUpdateRequest
      • DWChangeLogPreferenceAllocationDto
      • DWChangeLogAutoBookingReasonDto
      • DWChangeLogUserResponseDto
      • DWUserBookingAttendanceResponseDto
      • DWPresenceResponseDto
      • DWEventsResponseDto
      • DWUsersResponseDto
      • DWGroupsResponseDto
      • DWLocationsResponseDto
      • DWDesksResponseDto
      • TimeOffRequestBodyDto
      • TimeOffResponseDto
      • DMGroupRelationshipDto
      • PutDMGroupHierarchyRelationshipBodyDto
      • DMPostUserAttributesRecordDto
      • DMPostUserAttributesBodyDto
      • ResultCodes
      • DMPostUserAttributesRecordResponseDto
      • DMPostUserAttributesResponseDto
      • ParkingBookingReportPrincipalDto
      • ParkingBookingReportSpotDto
      • ParkingBookingReportZoneDto
      • ParkingBookingReportAreaDto
      • GetParkingBookingReportResponseDto
      • ServiceOfferingPageDto
  1. Occupancy

Submit occupancy events

POST
/v1/occupancy
Submit occupancy events to Calven.
Requires the location:occupancy:write permission.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Example
{
    "sourceId": "string",
    "occupancyEvents": [
        {
            "timestamp": "2021-09-01T12:00:00.000Z",
            "locationId": "string",
            "locationType": "level",
            "eventId": "string",
            "occupied": true,
            "occupancy": 0
        }
    ]
}

Request Code 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 'https://api.calven.com/v1/occupancy' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "sourceId": "string",
    "occupancyEvents": [
        {
            "timestamp": "2021-09-01T12:00:00.000Z",
            "locationId": "string",
            "locationType": "level",
            "eventId": "string",
            "occupied": true,
            "occupancy": 0
        }
    ]
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Example
{
    "sourceId": "string",
    "timestamp": "2021-09-01T12:00:00.000Z",
    "results": [
        {
            "eventId": "string",
            "resultCode": 0,
            "message": "string"
        }
    ]
}
🟠401Unauthorized
Modified at 2026-11-19 03:59:12
Previous
Occupancy Overview
Next
Submit time off updates
Built with