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

> Returns the limits for all employees in a specific corporation.

## Overview

This endpoint allows you to retrieve the limits for all employees within a specific corporation.
You can optionally filter by a specific payroll cycle using the `payroll` query parameter (format `YYYY-MM`).If not provided, the limits for the current payroll cycle are returned. **Past payroll cycles are not allowed.**

* **Current payroll cycle**: If the parameter matches the current cycle (or is omitted), the response includes the current payroll cycle details.
* **Future payroll cycles**: If the parameter is for a future month, 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 follows a structure similar to the corporation consumptions endpoint, grouping employees by company and providing their respective limits for benefits like meals, transport, and nurseries.

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.

### CSV Format

You can also request the response in CSV format by setting the `Accept` header to `text/csv`.

We support two CSV formats through the `csvFormat` query parameter:

* `lines` (default): Each row corresponds to a single limit record.
* `columns`: Each row corresponds to a single employee, and each limit type is represented as separate columns. The columns for each benefit are named `{category}` (amount) and `{category}-appliesTo` (beneficiary).

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

  <Expandable title="default">
    ```json theme={null}
    {
      "corporation": {
        "id": "4a0425b0-e420-4fe4-9d05-783be0360993",
        "alias": "Corp. Inc.",
        "externalId": "12345",
        "companies": [{
          "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"
          },
          "employees": [
            {
              "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": "child",
                  "period": "payroll",
                  "type": "recurrent",
                  "disabled": false
                }
              }
            }
          ]
        }]
      }
    }
    ```
  </Expandable>

  <Expandable title="categories=meal-benefit">
    ```json theme={null}
    {
      "corporation": {
        "id": "4a0425b0-e420-4fe4-9d05-783be0360993",
        "alias": "Corp. Inc.",
        "externalId": "12345",
        "companies": [{
          "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"
          },
          "employees": [
            {
              "employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
              "internalId": "12345",
              "legalId": "129387655X",
              "limits": {
                "meal": {
                  "amount": {
                    "amountInCents": 22000,
                    "currency": "EUR"
                  },
                  "appliesTo": "employee"
                }
              }
            }
          ]
        }]
      }
    }
    ```
  </Expandable>

  <Expandable title="payroll=2055-03 & categories=meal-benefit">
    ```json theme={null}
    {
      "corporation": {
        "id": "4a0425b0-e420-4fe4-9d05-783be0360993",
        "alias": "Corp. Inc.",
        "externalId": "12345",
        "companies": [{
          "id": "a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890",
          "legalId": "B12345678",
          "currency": "EUR",
          "payrollCycle": {
            "id": null,
            "start": null,
            "end": null,
            "fiscalYear": "2055",
            "payrollMonth": "03"
          },
          "employees": [
            {
              "employeeId": "dd3de3a0-f903-42a0-b729-4cb16f185bc6",
              "internalId": "12345",
              "legalId": "129387655X",
              "limits": {
                "meal": {
                  "amount": {
                    "amountInCents": 22000,
                    "currency": "EUR"
                  },
                  "appliesTo": "employee"
                }
              }
            }
          ]
        }]
      }
    }
    ```
  </Expandable>

  #### text/csv

  <Expandable title="csvFormat=lines (default)">
    ```csv theme={null}
    corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,category,appliesTo,period,type,disabled,amount.amountInCents
    4a0425b0-e420-4fe4-9d05-783be0360993,Corp Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,employee,payroll,recurrent,false,22000
    4a0425b0-e420-4fe4-9d05-783be0360993,Corp Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,transport-benefit,employee,payroll,recurrent,false,13636
    4a0425b0-e420-4fe4-9d05-783be0360993,Corp Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,8,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}
    corporation.id,corporation.alias,corporation.externalId,company.id,company.legalId,company.currency,payrollCycle.id,payrollCycle.start,payrollCycle.end,payrollCycle.fiscalYear,payrollCycle.payrollMonth,employees.employeeId,employees.internalId,employees.legalId,category,appliesTo,period,type,disabled,amount.amountInCents
    4a0425b0-e420-4fe4-9d05-783be0360993,Corp Inc.,12345,a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890,B12345678,EUR,7f4c9ba8-9c2d-4b82-8b8c-e5f8f8f8f8f8,1672531200,1675123200,2023,8,dd3de3a0-f903-42a0-b729-4cb16f185bc6,12345,129387655X,meal-benefit,employee,payroll,recurrent,false,22000
    ```
  </Expandable>

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

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


## OpenAPI

````yaml GET /corporations/{corporationId}/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:
  /corporations/{corporationId}/limits:
    get:
      summary: Get corporation limits
      description: Returns the limits for all employees in a specific corporation.
      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: corporationId
          in: path
          required: true
          description: The unique identifier of the corporation
          schema:
            type: string
            format: uuid
        - name: payroll
          in: query
          required: false
          description: >-
            The fiscal year and month (YYYY-MM) of the payroll cycle the limits
            belong to (e.g. `2025-03`). If not provided, the current payroll
            cycle limits are returned. **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: true
          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: Corporation limits successfully retrieved
          content:
            application/json:
              schema:
                type: object
                required:
                  - corporation
                properties:
                  corporation:
                    type: object
                    required:
                      - id
                      - alias
                      - externalId
                    properties:
                      id:
                        type: string
                        description: The unique identifier of the company.
                        format: uuid
                        example: 4a0425b0-e420-4fe4-9d05-783be0360993
                      alias:
                        type: string
                        description: The corporation's alias
                        example: Corp. Inc.
                      externalId:
                        type: string
                        description: The corporation's external ID
                        example: '12345'
                      companies:
                        type: array
                        items:
                          required:
                            - id
                            - legalId
                            - employees
                          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'
                            employees:
                              type: array
                              description: List of employees
                              items:
                                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
                                    properties:
                                      meal:
                                        type: object
                                        required:
                                          - amount
                                          - appliesTo
                                          - period
                                          - type
                                        properties:
                                          amount:
                                            type: object
                                            required:
                                              - amountInCents
                                              - currency
                                            properties:
                                              amountInCents:
                                                type: integer
                                              currency:
                                                type: string
                                                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
                                              currency:
                                                type: string
                                                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
                                      nursery:
                                        type: object
                                        required:
                                          - amount
                                          - appliesTo
                                          - period
                                          - type
                                        properties:
                                          amount:
                                            type: object
                                            required:
                                              - amountInCents
                                              - currency
                                            properties:
                                              amountInCents:
                                                type: integer
                                              currency:
                                                type: string
                                                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
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Resource not found
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

````