> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partners.api.cobee.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List employee limits

> Returns the employee limits for all the benefits defined by the partner

## Overview

This endpoint allows you to retrieve the employee limits for all the benefits defined by the partner, such as meals, transport and nurseries.

You must specify the payroll cycle to query using the **required** `payroll` query parameter (format `YYYY-MM`). **Past payroll cycles are not allowed.**

* **Current payroll cycle**: If the parameter matches the current cycle, the response includes the current payroll cycle details.
* **Future payroll cycles**: If the parameter is for a future payroll cycle, the `payrollCycle` object will have `id/start/end: null`, as the cycle has not yet opened.
* **Past payroll cycles**: Querying for past payroll cycles is **not allowed** and will return a `400 Bad Request`.

You can also filter the response by specific benefit categories using the `categories` query parameter. The response will include only the requested categories in the order they were provided.

The response includes the `appliesTo` field for each benefit, indicating whether the limit applies to the employee or a child, along with the amount.

<Expandable title="Examples">
  #### application/json

  <Expandable title="default">
    ```json theme={null}
    {
      "company": {
        "id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
        "legalId": "B12345678",
        "currency": "EUR",
        "payrollCycle": {
          "id": "7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8",
          "start": 1672531200,
          "end": 1675123200,
          "fiscalYear": "2023",
          "payrollMonth": "03"
        },
        "employee": {
          "employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
          "internalId": "12345",
          "legalId": "129387655X",
          "limits": {
            "meal": {
              "amount": {
                "amountInCents": 22000,
                "currency": "EUR"
              },
              "appliesTo": "employee",
              "period": "payroll",
              "type": "recurrent",
              "disabled": false
            },
            "transport": {
              "amount": {
                "amountInCents": 13636,
                "currency": "EUR"
              },
              "appliesTo": "employee",
              "period": "payroll",
              "type": "recurrent",
              "disabled": false
            },
            "nursery": {
              "amount": {
                "amountInCents": 77969,
                "currency": "EUR"
              },
              "appliesTo": "employee"
            }
          }
        }
      }
    }
    ```
  </Expandable>

  <Expandable title="categories=meal-benefit">
    ```json theme={null}
    {
      "company": {
        "id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
        "legalId": "B12345678",
        "currency": "EUR",
        "payrollCycle": {
          "id": "7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8",
          "start": 1672531200,
          "end": 1675123200,
          "fiscalYear": "2023",
          "payrollMonth": "03"
        },
        "employee": {
          "employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
          "internalId": "12345",
          "legalId": "129387655X",
          "limits": {
            "meal": {
              "amount": {
                "amountInCents": 22000,
                "currency": "EUR"
              },
              "appliesTo": "employee",
              "period": "payroll",
              "type": "recurrent",
              "disabled": false
            }
          }
        }
      }
    }
    ```
  </Expandable>

  <Expandable title="payroll=2055-03 & categories=meal-benefit">
    ```json theme={null}
    {
      "company": {
        "id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
        "legalId": "B12345678",
        "currency": "EUR",
        "payrollCycle": {
          "id": null,
          "start": null,
          "end": null,
          "fiscalYear": "2055",
          "payrollMonth": "03"
        },
        "employee": {
          "employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
          "internalId": "12345",
          "legalId": "129387655X",
          "limits": {
            "meal": {
              "amount": {
                "amountInCents": 22000,
                "currency": "EUR"
              },
              "appliesTo": "employee",
              "period": "payroll",
              "type": "recurrent",
              "disabled": false
            }
          }
        }
      }
    }
    ```
  </Expandable>

  #### text/csv

  <Expandable title="csvFormat=lines (default)">
    ```csv theme={null}
    company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,company.employee.employeeId,company.employee.internalId,company.employee.legalId,category,appliesTo,period,type,disabled,amount.amountInCents
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,employee,payroll,recurrent,false,22000
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,transport-benefit,employee,payroll,recurrent,false,13636
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,nursery-benefit,child,payroll,recurrent,false,77969
    ```
  </Expandable>

  <Expandable title="csvFormat=lines & categories=meal-benefit">
    ```csv theme={null}
    company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,company.employee.employeeId,company.employee.internalId,company.employee.legalId,category,appliesTo,period,type,disabled,amount.amountInCents
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,employee,payroll,recurrent,false,22000
    ```
  </Expandable>

  <Expandable title="csvFormat=columns">
    ```csv theme={null}
    company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,company.employee.employeeId,company.employee.internalId,company.employee.legalId,meal-benefit-appliesTo,meal-benefit-period,meal-benefit-type,meal-benefit-disabled,meal-benefit-amountInCents,transport-benefit-appliesTo,transport-benefit-period,transport-benefit-type,transport-benefit-disabled,transport-benefit-amountInCents,nursery-benefit-appliesTo,nursery-benefit-period,nursery-benefit-type,nursery-benefit-disabled,nursery-benefit-amountInCents
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,employee,payroll,recurrent,false,22000,employee,payroll,recurrent,false,13636,child,payroll,recurrent,false,77969
    ```
  </Expandable>

  <Expandable title="csvFormat=columns & categories=transport-benefit,nursery-benefit">
    ```csv theme={null}
    company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,company.employee.employeeId,company.employee.internalId,company.employee.legalId,transport-benefit-appliesTo,transport-benefit-period,transport-benefit-type,transport-benefit-disabled,transport-benefit-amountInCents,nursery-benefit-appliesTo,nursery-benefit-period,nursery-benefit-type,nursery-benefit-disabled,nursery-benefit-amountInCents
    a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,03,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,employee,payroll,recurrent,false,13636,child,payroll,recurrent,false,77969
    ```
  </Expandable>
</Expandable>


## OpenAPI

````yaml GET /companies/{companyId}/employees/{employeeId}/limits
openapi: 3.0.1
info:
  title: Partners API
  description: >-
    Partners API definition where you can check the documentation for the
    different available operations to integrate with the platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://pre-partners-api.cobee.io/api/v3
  - url: https://partners-api.cobee.io/api/v3
security:
  - bearerAuth: []
paths:
  /companies/{companyId}/employees/{employeeId}/limits:
    get:
      summary: Get employee limits
      description: Returns the employee limits for all the benefits defined by the partner
      parameters:
        - name: Accept
          in: header
          required: false
          description: The response file type. It can be `application/json` or `text/csv`.
          schema:
            type: string
            enum:
              - application/json
              - text/csv
        - name: companyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The company identifier
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
          description: The employee identifier
        - name: payroll
          in: query
          required: true
          description: >-
            The fiscal year and month (YYYY-MM) of the payroll cycle the limits
            belong to (e.g. `2025-03`). **Past payroll cycles are not allowed.**
          schema:
            type: string
            pattern: ^[0-9]{4}-(0[1-9]|1[0-2])$
            example: 2025-03
        - name: categories
          in: query
          required: false
          description: >-
            List of benefit categories to include in the response, which will
            return them in the same order as requested.
          schema:
            type: string
        - name: csvFormat
          in: query
          required: false
          description: >-
            The format of the resulting limits. Only applicable when `Accept` is
            `text/csv`.
             - `lines`: One row per limit (default).
             - `columns`: One row per employee, with columns for each benefit category (amount and appliesTo).
          schema:
            type: string
            enum:
              - lines
              - columns
            default: lines
      responses:
        '200':
          description: Employee limits
          content:
            application/json:
              schema:
                type: object
                required:
                  - company
                properties:
                  company:
                    type: object
                    required:
                      - id
                      - legalId
                      - currency
                      - employee
                    properties:
                      id:
                        type: string
                        description: The unique identifier of the company.
                        format: uuid
                        example: a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890
                      legalId:
                        type: string
                        description: The company's legal id
                        example: B12345678
                      currency:
                        type: string
                        description: The currency code (e.g., EUR)
                        example: EUR
                      payrollCycle:
                        type: object
                        description: >-
                          Information about the payroll cycle. Omitted if it is
                          a future payroll that has not started yet.
                        required:
                          - id
                          - start
                          - end
                          - fiscalYear
                          - payrollMonth
                        properties:
                          id:
                            type: string
                            description: The unique identifier of the payroll cycle.
                            example: 7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8
                          start:
                            type: integer
                            description: >-
                              The start date for the payroll cycle, in timestamp
                              format.
                            format: timestamp
                            example: 1672531200
                          end:
                            type: integer
                            description: >-
                              The end date for the payroll cycle, in timestamp
                              format.
                            format: timestamp
                            example: 1675123200
                          fiscalYear:
                            type: string
                            description: The fiscal year of the payroll cycle.
                            example: '2023'
                          payrollMonth:
                            type: string
                            description: >-
                              The month of the payroll cycle in MM format (e.g.,
                              '03' for March).
                            pattern: ^[0-9]{2}$
                            example: '03'
                      employee:
                        type: object
                        required:
                          - employeeId
                          - internalId
                          - legalId
                          - limits
                        properties:
                          employeeId:
                            type: string
                            format: uuid
                            description: The unique identifier of the employee
                            example: dd3de3a0-f903-42a0-b729-4cb16f185bc6
                          internalId:
                            type: string
                            description: >-
                              The unique identifier of the employee in the
                              client's system
                            example: '12345'
                          legalId:
                            type: string
                            description: The employee's legal id
                            example: 129387655X
                          limits:
                            type: object
                            description: List of employee consumptions
                            properties:
                              meal:
                                type: object
                                required:
                                  - amount
                                  - appliesTo
                                  - period
                                  - type
                                properties:
                                  amount:
                                    type: object
                                    required:
                                      - amountInCents
                                      - currency
                                    properties:
                                      amountInCents:
                                        type: integer
                                        description: >-
                                          The monetary amount in cents (e.g.,
                                          4500000 for 45,000)
                                        minimum: 0
                                      currency:
                                        type: string
                                        description: The currency code (e.g., EUR)
                                        example: EUR
                                  appliesTo:
                                    type: string
                                    enum:
                                      - employee
                                      - child
                                    description: >-
                                      The beneficiary of the limit. Can be
                                      'employee' or 'child'.
                                  period:
                                    type: string
                                    enum:
                                      - payroll
                                      - year
                                    description: The period the limit applies for
                                    example: payroll
                                  type:
                                    type: string
                                    enum:
                                      - recurrent
                                      - punctual
                                    description: >-
                                      Indicates whether the limit is defined by
                                      a base recurrent rule or if it's a
                                      punctual adjustment for this cycle
                                    example: recurrent
                                  disabled:
                                    type: boolean
                                    description: >-
                                      Indicates whether the benefit is disabled
                                      for this specific payroll cycle
                                    example: false
                              transport:
                                type: object
                                required:
                                  - amount
                                  - appliesTo
                                  - period
                                  - type
                                properties:
                                  amount:
                                    type: object
                                    required:
                                      - amountInCents
                                      - currency
                                    properties:
                                      amountInCents:
                                        type: integer
                                        description: >-
                                          The monetary amount in cents (e.g.,
                                          4500000 for 45,000)
                                        minimum: 0
                                      currency:
                                        type: string
                                        description: The currency code (e.g., EUR)
                                        example: EUR
                                  appliesTo:
                                    type: string
                                    enum:
                                      - employee
                                      - child
                                    description: >-
                                      The beneficiary of the limit. Can be
                                      'employee' or 'child'.
                                  period:
                                    type: string
                                    enum:
                                      - payroll
                                      - year
                                    description: The period the limit applies for
                                    example: payroll
                                  type:
                                    type: string
                                    enum:
                                      - recurrent
                                      - punctual
                                    description: >-
                                      Indicates whether the limit is defined by
                                      a base recurrent rule or if it's a
                                      punctual adjustment for this cycle
                                    example: punctual
                                  disabled:
                                    type: boolean
                                    description: >-
                                      Indicates whether the benefit is disabled
                                      for this specific payroll cycle
                                    example: false
                              nursery:
                                type: object
                                required:
                                  - amount
                                  - appliesTo
                                  - period
                                  - type
                                properties:
                                  amount:
                                    type: object
                                    required:
                                      - amountInCents
                                      - currency
                                    properties:
                                      amountInCents:
                                        type: integer
                                        description: >-
                                          The monetary amount in cents (e.g.,
                                          4500000 for 45,000)
                                        minimum: 0
                                      currency:
                                        type: string
                                        description: The currency code (e.g., EUR)
                                        example: EUR
                                  appliesTo:
                                    type: string
                                    enum:
                                      - employee
                                      - child
                                    description: >-
                                      The beneficiary of the limit. Can be
                                      'employee' or 'child'.
                                  period:
                                    type: string
                                    enum:
                                      - payroll
                                      - year
                                    description: The period the limit applies for
                                    example: year
                                  type:
                                    type: string
                                    enum:
                                      - recurrent
                                      - punctual
                                    description: >-
                                      Indicates whether the limit is defined by
                                      a base recurrent rule or if it's a
                                      punctual adjustment for this cycle
                                    example: recurrent
                                  disabled:
                                    type: boolean
                                    description: >-
                                      Indicates whether the benefit is disabled
                                      for this specific payroll cycle
                                    example: false
            text/csv:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: invalid_token
        '403':
          description: Forbidden - Company does not belong to the specified partner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Company does not belong to the specified partner
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
      example:
        message: 'Bad request: Invalid field value'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````