API for Calamari, your HR tool
API for Calamari, your HR tool
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/all \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com",
"date": "2018-09-25"
}'
[ {} ]
Create entitlement balance.
The method allows you to add the entitlement balance of a selected absence type on a selected day.
Expect error codes:
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/leave/v1/entitlement-balance/create \
-H 'Content-Type: application/json' \
-d '{
"amount": "1.5",
"asOfDate": "2018-09-25",
"absenceType": 0,
"comment": "Example comment",
"balanceOwner": "string"
}'
{ "result": "ENTITLEMENT_MODIFIED" }
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:
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.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": "[HOURS", "unlimited": true, "amount": 0 }
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:
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"]
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.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"
}'
[ {} ]
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/leave/v1/get-absence-types
[ { "id": 0, "name": "Annual Leave", "durationUnit": "DAYS", "externalId": "P001" } ]