Skip to content

x-calamari-is-deprecated
Edit employee.

Request

Edit employee.

Expect error codes:

  1. INVALID_EMPLOYEE - when invalid employee id provided
  2. INVALID_FIRST_NAME - when first name is not provided or is invalid
  3. INVALID_LAST_NAME - when last name is not provided or is invalid
  4. INVALID_EMAIL - when email is not provided or is invalid
  5. INVALID_WORKING_WEEK - when provided working week is invalid
  6. INVALID_ACCEPTANCE_FLOW - when provided acceptance flow is invalid
  7. INVALID_HOLIDAYS_CALENDAR - when provided holidays calendar is invalid
  8. INVALID_SEX - when provided sex is invalid
  9. INVALID_MARTIAL_STATUS - when provided marital status is invalid
  10. INVALID_TEAM - when one of provided teams is invalid
  11. INVALID_POSITION - when one of provided positions is invalid
  12. INVALID_CONTRACT_TYPE - when contract type is invalid
  13. INVALID_PERSONAL_EMAIL - when personal email is invalid
  14. INVALID_DIRECT_MANAGER - when invalid direct manager is provided
Security
basicAuth
Bodyapplication/json
employeestringrequired

Employee e-mail or login

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

Employee first name to update.

Example:"John"
lastNamestring

Employee last name to update.

Example:"Williams"
emailstring

Employee email to update.

Example:"john.williams@domain.com"
workingWeekstring

Working week name or identifier to update.

Example:"Working week name"
approvalFlowstring

Approval flow name or identifier to update.

Example:"Main Approval Flow"
positionstring

Position name or identifier to update.

Example:"Developer"
teamsArray of strings

List of teams names or identifiers to update.

Example:
[ "Primary team" ]
holidaysCalendarstring

Holidays calendar name or identifier to update.

Example:"Primary calendar"
sexstring

Sex

maritalStatusstring

Marital status to update

adminboolean

Is the employee is an admin?

contractTypestring

Contract type name or identifier.

Example:"Full time"
externalNumberstring

External number.

Example:"A27D"
directManagerstring

Direct manager e-mail or login.

Example:"mark.smith@domain.com"
birthDatestring

Birth date to update in ISO format

Example:"2017-02-20"
hireDatestring

Hire date to update in ISO format

Example:"2017-02-20"
businessPhonestring

Business phone to update.

Example:"982027621"
homePhonestring

Home phone to update.

Example:"982027621"
personalEmailstring

Personal email to update. Example:

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

Address street to update

Example:"New Street"
addressNumberstring

Address building/flat number to update

Example:"2/12"
addressCitystring

Address city to update

Example:"Warsaw"
addressPostalCodestring

Address postal code to update

Example:"28-283"
addressProvinceStatestring

Address province/state to update

Example:"Main province"
addressCountrystring

Address country to update

Example:"Poland"
emergencyContactNamestring

Emergency contact name to update

Example:"Contact name"
emergencyContactRelationshipstring

Emergency contact relationship to update

Example:"Contact relationship"
emergencyContactPhonestring

Emergency contact phone to update

Example:"928196340"
probationEndDatestring

Probation end date to update in ISO format

Example:"2017-02-20"
plannedFiringstring

Planned firing to update in ISO format

Example:"2017-02-20"
seniorityBeforeHireYearsinteger, (int32)

Seniority before hire to update- years

seniorityBeforeHireMonthsinteger, (int32)

Seniority before hire to update- months

childrenCountinteger, (int32)

Number of children to update

youngestChildBirthDatestring

The youngest child birth date to update in ISO format

Example:"2017-02-20"
customNotestring

Custom note to update

Example:"Custom note about employee"
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": [
      "Primary team"
    ],
    "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"
  }'

Responses

successful operation

Bodyapplication/json
idinteger, (int64)required

Id of create employee

Response
{ "id": 0 }