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

# Get Payroll Cycles

## Overview

Retrieve all payroll cycles for a specific company. Each payroll cycle represents a period during which employee benefits are tracked and managed.


## OpenAPI

````yaml GET /companies/{companyId}/payroll-cycles
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}/payroll-cycles:
    get:
      summary: >-
        Get the payroll cycles of a company. A null value on the end date means
        that the cycle is currently open.
      parameters:
        - name: companyId
          in: path
          required: true
          description: The unique identifier of the company
          schema:
            type: string
            format: uuid
          example: a1b2c3d4-e5f6-7890-a1b2-c3d4e5f67890
        - name: page
          in: query
          required: false
          description: Page number to retrieve. Defaults to 1.
          schema:
            type: integer
            minimum: 1
            default: 1
          example: 1
        - name: limit
          in: query
          required: false
          description: >-
            Max number of items per page. Must be greater than 0. Defaults to
            250.
          schema:
            type: integer
            minimum: 1
            default: 250
          example: 25
      responses:
        '200':
          description: Payroll cycles successfully retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  payrollCycles:
                    description: List of the company Payroll Cycles
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - start
                        - end
                        - fiscalYear
                        - payrollMonth
                      properties:
                        id:
                          type: string
                          description: The unique identifier of the payroll cycle.
                        start:
                          type: integer
                          description: >-
                            The start date for the payroll cycle, in timestamp
                            format.
                          format: timestamp
                          example: 1672531200
                        end:
                          type: integer
                          nullable: true
                          description: >-
                            The end date for the payroll cycle, in timestamp
                            format. A Null value is returned if the cycle is
                            currently open.
                          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'
                  page:
                    type: object
                    required:
                      - size
                      - totalElements
                      - totalPages
                      - number
                    properties:
                      size:
                        type: integer
                        description: Number of items in the current page
                      totalElements:
                        type: integer
                        description: Total number of elements available across all pages
                      totalPages:
                        type: integer
                        description: Total number of pages available
                      number:
                        type: integer
                        description: Current page number (1-indexed)
        '404':
          description: Not Found - The company ID was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Company 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

````