Calven
  1. Access Credentials
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. Access Credentials

Submit access credentials

POST
/v1/access-credentials
access-credential
Submit access credentials 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
data
array[object (AccessCredentialUpdate) {3}] 
required
An array of access credential updates
<= 100 items
username
string 
required
Email address for the user whose access cards are being updated
Example:
user.email@example.com
updateId
string 
required
Update identifier - used to correlate the update with the result
Example:
379EB561-0378-4718-ACEA-5669932208A9
credentials
array[object (AccessCredential) {5}] 
required
The list of access cards to be associated with the user
<= 100 items
Example
{
    "data": [
        {
            "username": "user.email@example.com",
            "updateId": "379EB561-0378-4718-ACEA-5669932208A9",
            "credentials": [
                {
                    "active": true,
                    "cardNumber": "1234567890",
                    "facilityCode": "100",
                    "scanData": [
                        "100:1234567890"
                    ],
                    "credentialType": "Mifare"
                }
            ]
        }
    ]
}

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/access-credentials' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": [
        {
            "username": "user.email@example.com",
            "updateId": "379EB561-0378-4718-ACEA-5669932208A9",
            "credentials": [
                {
                    "active": true,
                    "cardNumber": "1234567890",
                    "facilityCode": "100",
                    "scanData": [
                        "100:1234567890"
                    ],
                    "credentialType": "Mifare"
                }
            ]
        }
    ]
}'

Responses

🟢201Success
application/json
Body
updateId
string 
required
The identifier for the update event that was provided in the input document
Example:
379EB561-0378-4718-ACEA-5669932208A9
result
enum<string> 
required
The result for the update event
Allowed values:
CARD_UPDATE_FAILEDOKPARTIAL_UPDATEUSER_NOT_FOUND
message
string 
required
Explanation message associated with the resultCode
Example:
User not found
results
array[object (AccessCredentialUpdateResult) {4}] 
required
The result of the update for each access card
cardNumber
string 
required
The card number that this result applies to
facilityCode
string 
required
The facility code for the card number
result
enum<string> 
required
The result for the update event
Allowed values:
CARD_UPDATE_FAILEDOKPARTIAL_UPDATEUSER_NOT_FOUND
message
string 
required
Explanation message associated with the resultCode
Example
{
    "updateId": "379EB561-0378-4718-ACEA-5669932208A9",
    "result": "CARD_UPDATE_FAILED",
    "message": "User not found",
    "results": [
        {
            "cardNumber": "string",
            "facilityCode": "string",
            "result": "CARD_UPDATE_FAILED",
            "message": "string"
        }
    ]
}
Previous
Submit time off updates
Next
Warehouse Overview
Built with