# Create employee.

Create employee.

Expect error codes:
INVALID_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 working week is not provided or is invalidINVALID_ACCEPTANCE_FLOW - when acceptance flow is not provided or is invalidINVALID_HOLIDAYS_CALENDAR - when holidays calendar is not provided or is invalidINVALID_SEX - when sex is not provided or is invalidINVALID_MARTIAL_STATUS - when marital status is not provided or 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_DIRECT_MANAGER - when invalid direct manager id is providedLICENCE_MAX_USERS_EXCEEDED - when you reach the maximum number of seats within your subscription

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

## Security:

  - `basicAuth` (unknown)
    http basic

## Request fields (application/json):

  - `firstName` (string, required)
    Employee first name
    Example: John

  - `lastName` (string, required)
    Employee last name
    Example: Williams

  - `email` (string, required)
    Employee email
    Example: john.white@mycompany.com

  - `workingWeek` (string, required)
    Working week name or identifier
    Example: Working week name

  - `approvalFlow` (string, required)
    Approval flow name or identifier
    Example: Flow name

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

  - `teams` (array)
    List of teams names or identifiers. Example: [Developers Team]

  - `holidaysCalendar` (string, required)
    Holidays calendar name or identifier
    Example: Primary calendar

  - `sex` (string, required)
    Sex
    Enum: "MALE", "FEMALE", "OTHER", "NOT_SET"

  - `maritalStatus` (string, required)
    Martial status
    Enum: "SINGLE", "MARRIED", "WIDOWED", "SEPARATED", "DIVORCED", "DOMESTIC_PARTNERSHIP", "COMMON_LAW", "OTHER", "NOT_SET"

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

  - `contractType` (string)
    Contract type name or identifier
    Example: Contract type

  - `externalNumber` (string)
    External number
    Example: A12Y

  - `directManager` (string)
    Direct manager e-mail or login
    Example: john.white@mycompany.com

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

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

  - `businessPhone` (string)
    Business phone
    Example: 876234928

  - `homePhone` (string)
    Home phone
    Example: 283018271

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

  - `addressStreet` (string)
    Address street
    Example: Buckfast Street

  - `addressNumber` (string)
    Address building/flat number
    Example: 2/20

  - `addressCity` (string)
    Address city
    Example: Warsaw

  - `addressPostalCode` (string)
    Address postal code
    Example: 12-333

  - `addressProvinceState` (string)
    Address province/state
    Example: Main Province

  - `addressCountry` (string)
    Address country
    Example: Poland

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

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

  - `emergencyContactPhone` (string)
    Emergency contact phone
    Example: 198263098

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

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

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

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

  - `childrenCount` (integer)
    Number of children

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

  - `customNote` (string)
    Custom note
    Example: Optional 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

