# Create employee.

Create employee.

Expect error codes:

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 working week is not provided or is invalid
INVALID_ACCEPTANCE_FLOW - when acceptance flow is not provided or is invalid
INVALID_HOLIDAYS_CALENDAR - when holidays calendar is not provided or is invalid
INVALID_SEX - when sex is not provided or is invalid
INVALID_MARTIAL_STATUS - when marital status is not provided or 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_DIRECT_MANAGER - when invalid direct manager id is provided
LICENCE_MAX_USERS_EXCEEDED - when you reach the maximum number of seats within your subscription

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

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