Skip to content

Calamari Public API (v1)

API for Calamari, your HR tool

Languages
Servers

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

Absence type

Absence Types API

Operations

Get absence types with duration units.

Request

Get absence types with duration units.

Security
basicAuth
curl -i -X POST \
  -u <username>:<password> \
  'https://{tenantname}.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" } ]

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
Security
basicAuth
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://{tenantname}.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
[ {} ]

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

Security
basicAuth
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://{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"
  }'

Responses

successful operation

Bodyapplication/json
unitstringrequired

Duration unit

Enum"DAYS""HOURS"
unlimitedbooleanrequired

Is entitlement balance unlimited?

amountinteger(int32)required

Entitlement balance amount

Response
application/json
{ "unit": "DAYS", "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

Security
basicAuth
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://{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"
  }'

Responses

successful operation

Bodyapplication/jsonArray [
balanceobject(BalanceOutExtended)
]
Response
application/json
[ { "balance": {} } ]

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

Security
basicAuth
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

employeestringrequired

Employee e-mail or login

Example: "john.white@mycompany.com"
commentstring

Optional comment

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

Responses

successful operation

Bodyapplication/json
resultstringrequired

Result of modify entitlement

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

Absence requests

Absence Requests API

Operations

Current shift status

Current Shift Status API

Operations

Projects

Projects API

Operations

Shifts and breaks

Shifts and Breaks API

Operations

Timesheet entries

Timesheet entries API

Operations

Working Week

Working Week API

Operations

Contract types

Contract Types API

Operations

Employees

Employees API

Operations

Holidays

Holidays API

Operations

Positions

Positions API

Operations

Teams

Teams API

Operations

People

Endpoints related to managing people records.

Operations