# Edit employee.

Edit employee.

Expect error codes:
INVALID_EMPLOYEE - when invalid employee id providedINVALID_FIRST_NAME - when first name is not provided or is invalidINVALID_LAST_NAME - when last name is not provided or is invalidINVALID_EMAIL - when email is not provided or is invalidINVALID_WORKING_WEEK - when provided working week is invalidINVALID_ACCEPTANCE_FLOW - when provided acceptance flow is invalidINVALID_HOLIDAYS_CALENDAR - when provided holidays calendar is invalidINVALID_SEX - when provided sex is invalidINVALID_MARTIAL_STATUS - when provided marital status is invalidINVALID_TEAM - when one of provided teams is invalidINVALID_POSITION - when one of provided positions is invalidINVALID_CONTRACT_TYPE - when contract type is invalidINVALID_PERSONAL_EMAIL - when personal email is invalidINVALID_DIRECT_MANAGER - when invalid direct manager is provided

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

## Security:

  - `basicAuth` (unknown)
    http basic

## 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.

  - `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:

  - `200` (unknown)
    successful operation

## Response 200 fields (application/json):

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

## Response 400:

  - `400` (unknown)
    Invalid input. Reason and description are returned in json response.

## 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:

  - `401` (unknown)
    Authorization error - e.g. invalid server url, no Authorization header, wrong user / API key

## 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
    Example: null

## Response 403:

  - `403` (unknown)
    Authorization failure. Provided ApiKey is valid but does not contain a scope required to perform requested operation

## Response 429:

  - `429` (unknown)
    Maximum number of requests was exceeded - either per second, hour or day.

## 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
Your current limits 100/day, 10/hour, 1/sec.

## Response 500:

  - `500` (unknown)
    Internal server error - something went wrong!

## 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:

  - `504` (unknown)
    Gateway timeout - call to downstream service exceeded maximum configured amount of time

## 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

