# Find absence requests of employee in dates range.

Find absence requests of employee in dates range.Expect error codes:INVALID_EMPLOYEE - when invalid employee id providedINVALID_DATE_FROM - when invalid date from in filter providedINVALID_DATE_TO - when invalid date to in filter provided

Endpoint: POST /leave/request/v1/find
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

  - `from` (string, required)
    Start date of dates range to search request in ISO format
    Example: 2017-01-10

  - `to` (string, required)
    End date of dates range to search request in ISO format
    Example: 2017-01-15

## Response 200:

  - `200` (unknown)
    successful operation

## Response 200 fields (application/json):

  - `id` (integer, required)
    Absence request ID

  - `from` (string, required)
    Absence start date in ISO format
    Example: 2017-02-20

  - `to` (string, required)
    Absence finish date in ISO format
    Example: 2017-02-25

  - `absenceTypeName` (string, required)
    Absence type name
    Example: Annual leave

  - `absenceTypeId` (integer, required)
    Absence type ID

  - `absenceCategory` (string, required)
    Absence category. TIMEOFF - regular time off. WORK - when employee is working but is not in office (eg. 'Remote working day')
    Enum: "TIMEOFF", "WORK"

  - `status` (string, required)
    Absence request status
    Enum: "PENDING", "PENDING_CANCELLATION", "REJECTED", "ACCEPTED", "CANCELED", "REVOKED"

  - `entitlementAmount` (number, required)
    Entitlement amount

  - `reason` (string, required)
    Reason for absence

  - `amountFirstDay` (number, required)
    First day amount

  - `amountLastDay` (number, required)
    Last day amount

  - `entitlementAmountUnit` (string, required)
    Entitlement amount unit
    Enum: "DAYS", "HOURS"

  - `created` (string, required)
    Date and time of absence request creation

  - `updated` (string, required)
    Date and time of absence request latest update

  - `fullDayRequest` (boolean, required)
    Has the absence been requested for the whole day?

  - `startTime` (string, required)
    Local start date and start time of absence

  - `endTime` (string, required)
    Local end date and end time of absence

  - `timeZone` (string, required)
    Absence reporter time zone
    Example: Europe/Warsaw

  - `hasAttachments` (boolean, required)
    Absence has attachments
    Example: true

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

