# Get entitlement balance with advanced filtering by several parameters.

Get entitlement balance.The method allows you to get the entitlement balance for selected employees and absence types on a selected day.Expect error codes:INVALID_ABSENCE_TYPE - when invalid absence type providedINVALID_EMPLOYEE - when invalid balance owner providedINVALID_TEAM - when invalid team providedINVALID_DATE - when invalid date provided

Endpoint: POST /leave/v1/entitlement-balance/get-advanced
Version: v1
Security: basicAuth

## Request fields (application/json):

  - `absenceTypeId` (string, required)
    Absence type Id
    Example: "PTO"

  - `teams` (array)
    List of teams names or identifiers to search. As a result there will be balances 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 balances 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 balances 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"]

  - `date` (string, required)
    Date in ISO format
    Example: "2018-09-25"

## Response 200 fields (application/json):

  - `balance` (object)

  - `balance.unit` (string, required)
    Duration unit
    Enum: "DAYS", "HOURS"

  - `balance.unlimited` (boolean, required)
    Is entitlement balance unlimited?

  - `balance.amount` (integer, required)
    Entitlement balance amount

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