# Find employees working time balances with advanced filtering by several parameters.

Find employees working time balances in dates range. If you provide more than one value in one filter attribute there is OR relation between them.  For instance: if you put in a filter: {employees: ["john@mycompany.com", "kevin@mycompany.com"]} it returns all John's and all Kevin's balances.When you fill more than one attribute in filter all conditions have to be fulfilled. There is AND relation between attributes. For instance: if you provide in filter {contractTypes: ["Full-time"], teams: ["DevTeam"]} then you receive balances of employees from Dev and Full-timeExpect error codes:INVALID_DATE_FROM - when invalid time in filter providedINVALID_DATE_TO - when invalid time in filter providedINVALID_EMPLOYEE - when one of provided employees is invalidINVALID_TEAM - when one of provided teams is invalidINVALID_POSITION - when one of provided positions is invalidINVALID_CONTRACT_TYPE - when one of provided contract types is invalid

Endpoint: POST /clockin/timesheetentries/v1/balance
Version: v1
Security: basicAuth

## Request fields (application/json):

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

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

  - `teams` (array)
    List of teams names or identifiers to search. As a result there will be absence requests of employees who are members of at least one of provided teams. Example: ["First Team", "Second Team", "Third Team"]
    Example: ["First Team"]

  - `positions` (array)
    List of positions names or identifiers to search. As a result there will be absence requests of employees who have one of provided positions. Example: ["Developer", "Support", "Architect"]
    Example: ["Developer"]

  - `contractTypes` (array)
    List of contract types names or identifiers to search. As a result there will be absence requests of employees who have one of contract type. Example: ["firstContract", "secondContract"]
    Example: ["Employment Contract"]

  - `employees` (array)
    List of employees e-mails or logins. Example: ["john.smith@domain.com", "mark.small@domain.com"]
    Example: ["john.smith@domain.com"]

## Response 200 fields (application/json):

  - `person` (object, required)
    Employee

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

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

  - `person.email` (string, required)
    Employee email
    Example: "john.williams@domain.com"

  - `person.externalId` (string)
    Employee external identifier
    Example: "A12Y"

  - `balance` (integer, required)
    Working time balance in seconds
    Example: -3600

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