# Edit employee.

Edit employee.

Expect error codes:

INVALID_EMPLOYEE - when invalid employee id provided
INVALID_FIRST_NAME - when first name is not provided or is invalid
INVALID_LAST_NAME - when last name is not provided or is invalid
INVALID_EMAIL - when email is not provided or is invalid
INVALID_WORKING_WEEK - when provided working week is invalid
INVALID_ACCEPTANCE_FLOW - when provided acceptance flow is invalid
INVALID_HOLIDAYS_CALENDAR - when provided holidays calendar is invalid
INVALID_SEX - when provided sex is invalid
INVALID_MARTIAL_STATUS - when provided marital status is invalid
INVALID_TEAM - when one of provided teams is invalid
INVALID_POSITION - when one of provided positions is invalid
INVALID_CONTRACT_TYPE - when contract type is invalid
INVALID_PERSONAL_EMAIL - when personal email is invalid
INVALID_DIRECT_MANAGER - when invalid direct manager is provided

Endpoint: POST /employees/v1/edit
Version: v1
Security: basicAuth

## Request fields (application/json):

  - `employee` (string, required)
    Employee e-mail or login
    Example: "john.white@mycompany.com"

  - `firstName` (string)
    Employee first name to update.
    Example: "John"

  - `lastName` (string)
    Employee last name to update.
    Example: "Williams"

  - `email` (string)
    Employee email to update.
    Example: "john.williams@domain.com"

  - `workingWeek` (string)
    Working week name or identifier to update.
    Example: "Working week name"

  - `approvalFlow` (string)
    Approval flow name or identifier to update.
    Example: "Main Approval Flow"

  - `position` (string)
    Position name or identifier to update.
    Example: "Developer"

  - `teams` (array)
    List of teams names or identifiers to update.
    Example: ["Primary team"]

  - `holidaysCalendar` (string)
    Holidays calendar name or identifier to update.
    Example: "Primary calendar"

  - `sex` (string)
    Sex

  - `maritalStatus` (string)
    Marital status to update

  - `admin` (boolean)
    Is the employee is an admin?

  - `contractType` (string)
    Contract type name or identifier.
    Example: "Full time"

  - `externalNumber` (string)
    External number.
    Example: "A27D"

  - `directManager` (string)
    Direct manager e-mail or login.
    Example: "mark.smith@domain.com"

  - `birthDate` (string)
    Birth date to update in ISO format
    Example: "2017-02-20"

  - `hireDate` (string)
    Hire date to update in ISO format
    Example: "2017-02-20"

  - `businessPhone` (string)
    Business phone to update.
    Example: "982027621"

  - `homePhone` (string)
    Home phone to update.
    Example: "982027621"

  - `personalEmail` (string)
    Personal email to update. Example:
    Example: "john.white@mycompany.com"

  - `addressStreet` (string)
    Address street to update
    Example: "New Street"

  - `addressNumber` (string)
    Address building/flat number to update
    Example: "2/12"

  - `addressCity` (string)
    Address city to update
    Example: "Warsaw"

  - `addressPostalCode` (string)
    Address postal code to update
    Example: "28-283"

  - `addressProvinceState` (string)
    Address province/state to update
    Example: "Main province"

  - `addressCountry` (string)
    Address country to update
    Example: "Poland"

  - `emergencyContactName` (string)
    Emergency contact name to update
    Example: "Contact name"

  - `emergencyContactRelationship` (string)
    Emergency contact relationship to update
    Example: "Contact relationship"

  - `emergencyContactPhone` (string)
    Emergency contact phone to update
    Example: "928196340"

  - `probationEndDate` (string)
    Probation end date to update in ISO format
    Example: "2017-02-20"

  - `plannedFiring` (string)
    Planned firing to update in ISO format
    Example: "2017-02-20"

  - `seniorityBeforeHireYears` (integer)
    Seniority before hire to update- years

  - `seniorityBeforeHireMonths` (integer)
    Seniority before hire to update- months

  - `childrenCount` (integer)
    Number of children to update

  - `youngestChildBirthDate` (string)
    The youngest child birth date to update in ISO format
    Example: "2017-02-20"

  - `customNote` (string)
    Custom note to update
    Example: "Custom note about employee"

## Response 200 fields (application/json):

  - `id` (integer, required)
    Id of create employee

## Response 400 fields (application/json):

  - `message` (string)
    Human readable error explanation.
    Example: "Api error"

  - `code` (string)
    Error code.
    Example: "INVALID_JSON_PAYLOAD"

  - `field` (string)
    Which field of payload object caused error. NULL when error is not related to particular field
    Example: "field"

## Response 401 fields (application/json):

  - `message` (string, required)
    Error details
    Example: "Authentication failure"

  - `code` (string, required)
    General type of error
    Example: "AUTH"

  - `field` (string)
    Leftover for backward compatibility

## Response 429 fields (application/json):

  - `code` (string, required)
    General type of error
    Example: "QUOTA_EXCEEDED"

  - `field` (string, required)
    Detailed info about quota and it's current usage
    Example: "Your current usage is 101/day, 10/hour, 1/sec\nYour current limits 100/day, 10/hour, 1/sec."

## Response 500 fields (application/json):

  - `message` (string, required)
    Error details
    Example: "An unexpected error occurred"

  - `code` (string, required)
    General type of error
    Example: "INTERNAL_SERVER_ERROR"

## Response 504 fields (application/json):

  - `message` (string, required)
    Error details
    Example: "Public API call exceeded timeout"

  - `code` (string, required)
    General type of error
    Example: "TIMEOUT"


## Response 403 fields
