Calamari Public API (v1)
API for Calamari, your HR tool
https://{tenantName}.calamari.io/api/
https://awesome-company.calamari.io/api/leave/v1/get-absence-types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://{tenantname}.calamari.io/api/leave/v1/get-absence-types'
[ { "id": 0, "name": "Annual Leave", "durationUnit": "DAYS", "externalId": "P001" } ]
Request
Get entitlement balance grouped by absence type.
The method allows you to get the entitlement balance for selected employee grouped by available absence types on a selected day.
Expect error codes:
- INVALID_EMPLOYEE - when invalid balance owner provided
- INVALID_DATE - when invalid date provided
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/all
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://{tenantname}.calamari.io/api/leave/v1/entitlement-balance/all' \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com",
"date": "2018-09-25"
}'
[ {} ]
Request
Get entitlement balance.
The method allows you to get the entitlement balance for selected employee and absence type on a selected day.
Expect error codes:
- INVALID_ABSENCE_TYPE - when invalid absence type provided
- INVALID_EMPLOYEE - when invalid balance owner provided
- INVALID_DATE - when invalid date provided
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/get
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://{tenantname}.calamari.io/api/leave/v1/entitlement-balance/get' \
-H 'Content-Type: application/json' \
-d '{
"absenceTypeId": "PTO",
"employee": "john.white@mycompany.com",
"date": "2018-09-25"
}'
{ "unit": "DAYS", "unlimited": true, "amount": 0 }
Request
Get entitlement balance.
The method allows you to get the entitlement balance for selected employees and absence types on a selected day.
Expect error codes:
- INVALID_ABSENCE_TYPE - when invalid absence type provided
- INVALID_EMPLOYEE - when invalid balance owner provided
- INVALID_TEAM - when invalid team provided
- INVALID_DATE - when invalid date provided
List of teams names or identifiers to search. As a result there will be balances of employees who are members of at least one of provided teams. Example: ["First Team", "Second Team", "Third Team"]
List of positions names or identifiers to search. As a result there will be balances of employees who have one of provided positions. Example: ["Developer", "Support", "Architect"]
List of contract types names or identifiers to search. As a result there will be balances of employees who have one of contract type. Example: ["firstContract", "secondContract"]
List of employees e-mails or logins. Example: ["john.smith@domain.com", "mark.small@domain.com"]
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/get-advanced
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://{tenantname}.calamari.io/api/leave/v1/entitlement-balance/get-advanced' \
-H 'Content-Type: application/json' \
-d '{
"absenceTypeId": "PTO",
"teams": [
"string"
],
"positions": [
"string"
],
"contractTypes": [
"string"
],
"employees": [
"string"
],
"date": "2018-09-25"
}'
[ { "balance": { … } } ]
Request
Create entitlement balance.
The method allows you to add the entitlement balance of a selected absence type on a selected day.
Expect error codes:
- INVALID_AMOUNT - when invalid amount provided
- INVALID_AS_OF_DATE - when invalid date provided
- INVALID_ABSENCE_TYPE - when invalid absence type provided
- INVALID_EMPLOYEE - when invalid balance owner provided
- INVALID_COMMENT - when invalid comment provided
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/create
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://{tenantname}.calamari.io/api/leave/v1/entitlement-balance/create' \
-H 'Content-Type: application/json' \
-d '{
"amount": "1.5",
"asOfDate": "2018-09-25",
"absenceType": 0,
"employee": "john.white@mycompany.com",
"comment": "Example comment",
"balanceOwner": "string"
}'
{ "result": "ENTITLEMENT_MODIFIED" }