Calamari Public API (v1)

API for Calamari, your HR tool

Languages
Servers
https://{tenantName}.calamari.io/api/

Absence requests

Operations

Absence type

Operations

Get entitlement balance grouped by absence type.

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:

  1. INVALID_EMPLOYEE - when invalid balance owner provided
  2. INVALID_DATE - when invalid date provided
Bodyapplication/json
employeestringrequired

Employee e-mail or login

Example: "john.white@mycompany.com"
datestring(date)required

Date in ISO format

Example: "2018-09-25"
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"
  }'

Responses

successful operation

Bodyapplication/jsonArray [
object(BalanceOutWithAbsenceType)
]
Response
application/json
[ {} ]

Create entitlement 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:

  1. INVALID_AMOUNT - when invalid amount provided
  2. INVALID_AS_OF_DATE - when invalid date provided
  3. INVALID_ABSENCE_TYPE - when invalid absence type provided
  4. INVALID_EMPLOYEE - when invalid balance owner provided
  5. INVALID_COMMENT - when invalid comment provided

Bodyapplication/json
amountstringrequired

Entitlement amount with precision 3

Example: "1.5"
asOfDatestring(date)required

Date in ISO format

Example: "2018-09-25"
absenceTypeinteger(int64)required

Absence type Id

commentstring

Optional comment

Example: "Example comment"
balanceOwnerstring
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"
  }'

Responses

successful operation

Bodyapplication/json
resultstringrequired

Result of modify entitlement

Value"ENTITLEMENT_MODIFIED"
Response
application/json
{ "result": "ENTITLEMENT_MODIFIED" }

Get entitlement balance.

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:

  1. INVALID_ABSENCE_TYPE - when invalid absence type provided
  2. INVALID_EMPLOYEE - when invalid balance owner provided
  3. INVALID_DATE - when invalid date provided

Bodyapplication/json
absenceTypeIdstringrequired

Absence type Id

Example: "PTO"
employeestringrequired

Employee e-mail or login

Example: "john.white@mycompany.com"
datestring(date)required

Date in ISO format

Example: "2018-09-25"
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"
  }'

Responses

successful operation

Bodyapplication/json
unitstringrequired

Duration unit

Enum"[HOURS""DAYS]"
unlimitedbooleanrequired

Is entitlement balance unlimited?

amountinteger(int32)required

Entitlement balance amount

Response
application/json
{ "unit": "[HOURS", "unlimited": true, "amount": 0 }

Get entitlement balance with advanced filtering by several parameters.

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:

  1. INVALID_ABSENCE_TYPE - when invalid absence type provided
  2. INVALID_EMPLOYEE - when invalid balance owner provided
  3. INVALID_TEAM - when invalid team provided
  4. INVALID_DATE - when invalid date provided

Bodyapplication/json
absenceTypeIdstringrequired

Absence type Id

Example: "PTO"
teamsArray of strings

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"]

positionsArray of strings

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"]

contractTypesArray of strings

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"]

employeesArray of strings

List of employees e-mails or logins. Example: ["john.smith@domain.com", "mark.small@domain.com"]

datestring(date)required

Date in ISO format

Example: "2018-09-25"
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"
  }'

Responses

successful operation

Bodyapplication/jsonArray [
object(EmployeeBalanceOut)
]
Response
application/json
[ {} ]

Get absence types with duration units.

Request

Get absence types with duration units.

curl -i -X POST \
  -u <username>:<password> \
  https://awesome-company.calamari.io/api/leave/v1/get-absence-types

Responses

successful operation

Bodyapplication/jsonArray [
idinteger(int64)required

Absence type ID

namestringrequired

Absence type name

Example: "Annual Leave"
durationUnitstringrequired

Entitlement amount unit

Enum"DAYS""HOURS"
externalIdstring

Absence type external ID

Example: "P001"
]
Response
application/json
[ { "id": 0, "name": "Annual Leave", "durationUnit": "DAYS", "externalId": "P001" } ]

Contract types

Operations

Current shift status

Operations

Employees

Operations

Holidays

Operations

Positions

Operations

Projects

Operations

Shifts and breaks

Operations

Teams

Operations

Timesheet entries

Operations

Working Week

Operations

People (Beta)

Endpoints related to managing people records.

Operations