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/employees/v1/archive \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com"
}'
Create employee.
Expect error codes:
Martial status
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/employees/v1/create \
-H 'Content-Type: application/json' \
-d '{
"firstName": "John",
"lastName": "Williams",
"email": "john.white@mycompany.com",
"workingWeek": "Working week name",
"approvalFlow": "Flow name",
"position": "Developer",
"teams": [
"string"
],
"holidaysCalendar": "Primary calendar",
"sex": "MALE",
"maritalStatus": "SINGLE",
"admin": true,
"contractType": "Contract type",
"externalNumber": "A12Y",
"directManager": "john.white@mycompany.com",
"birthDate": "2017-02-20",
"hireDate": "2017-02-20",
"businessPhone": "876234928",
"homePhone": "283018271",
"personalEmail": "john.white@mycompany.com",
"addressStreet": "Buckfast Street",
"addressNumber": "2/20",
"addressCity": "Warsaw",
"addressPostalCode": "12-333",
"addressProvinceState": "Main Province",
"addressCountry": "Poland",
"emergencyContactName": "Contact name",
"emergencyContactRelationship": "Contact relationship",
"emergencyContactPhone": "198263098",
"probationEndDate": "2017-02-20",
"plannedFiring": "2017-02-20",
"seniorityBeforeHireYears": 0,
"seniorityBeforeHireMonths": 0,
"childrenCount": 0,
"youngestChildBirthDate": "2017-02-20",
"customNote": "Optional custom note about employee"
}'
{ "id": 0 }
Edit employee.
Expect error codes:
Emergency contact relationship to update
The youngest child birth date to update in ISO format
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/employees/v1/edit \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com",
"firstName": "John",
"lastName": "Williams",
"email": "john.williams@domain.com",
"workingWeek": "Working week name",
"approvalFlow": "Main Approval Flow",
"position": "Developer",
"teams": [
"4",
"10"
],
"holidaysCalendar": "Primary calendar",
"sex": "string",
"maritalStatus": "string",
"admin": true,
"contractType": "Full time",
"externalNumber": "A27D",
"directManager": "mark.smith@domain.com",
"birthDate": "2017-02-20",
"hireDate": "2017-02-20",
"businessPhone": "982027621",
"homePhone": "982027621",
"personalEmail": "john.white@mycompany.com",
"addressStreet": "New Street",
"addressNumber": "2/12",
"addressCity": "Warsaw",
"addressPostalCode": "28-283",
"addressProvinceState": "Main province",
"addressCountry": "Poland",
"emergencyContactName": "Contact name",
"emergencyContactRelationship": "Contact relationship",
"emergencyContactPhone": "928196340",
"probationEndDate": "2017-02-20",
"plannedFiring": "2017-02-20",
"seniorityBeforeHireYears": 0,
"seniorityBeforeHireMonths": 0,
"childrenCount": 0,
"youngestChildBirthDate": "2017-02-20",
"customNote": "Custom note about employee"
}'
{ "id": 0 }
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/employees/v1/invite \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com"
}'
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/employees/v1/list \
-H 'Content-Type: application/json' \
-d '{
"page": 0
}'
{ "employees": [ { … } ], "currentPage": 0, "totalPages": 0 }
Employee identifier. You can use e-mail or external identifier in format (externalNumber:ABC123)
curl -i -X POST \
-u <username>:<password> \
https://awesome-company.calamari.io/api/employees/v1/search \
-H 'Content-Type: application/json' \
-d '{
"employee": "john.white@mycompany.com",
"contractTypes": [
"string"
],
"positions": [
"string"
],
"teams": [
"string"
],
"withArchived": true
}'
{ "employees": [ { … } ], "currentPage": 0, "totalPages": 0 }