> ## Documentation Index
> Fetch the complete documentation index at: https://developer.payrollintegrations.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Year-to-Date Totals

> Returns year-to-date payroll totals per employee across every division of a connection, for payrolls checked within the given date range. Each payroll component totals one payroll code under the subcategory it is currently mapped to. Results come in a fixed, stable order and cannot be sorted.

#### Pagination & Sorting

**Limit**

<ul><li>Default: 20</li>
<li>Maximum: 100</li></ul>

**Sort Fields**

<ul />


## OpenAPI

````yaml api-reference/openapi.demo.json GET /v1/payroll-connections/{payroll_connection}/payroll-records/year-to-date
openapi: 3.0.3
info:
  title: Payroll Integrations Public API
  version: 1.0.0
  description: Public API for Payroll Integrations platform
  license:
    name: MIT
servers:
  - url: https://demo1-api.payrollintegrationsdemo.com
    description: Demo
  - url: https://demo2-api.payrollintegrationsdemo.com
    description: Demo
  - url: https://demo3-api.payrollintegrationsdemo.com
    description: Demo
security: []
tags:
  - name: auth
  - name: employer-identifiers
  - name: meta
  - name: payroll-connections
  - name: payroll-platforms
  - name: tpes
  - name: users
  - name: webhooks
paths:
  /v1/payroll-connections/{payroll_connection}/payroll-records/year-to-date:
    get:
      tags:
        - payroll-connections
      description: >-
        Returns year-to-date payroll totals per employee across every division
        of a connection, for payrolls checked within the given date range. Each
        payroll component totals one payroll code under the subcategory it is
        currently mapped to. Results come in a fixed, stable order and cannot be
        sorted.
      operationId: >-
        get_v1_payroll_connections_payroll_connection_payroll_records_year_to_date
      parameters:
        - name: payroll_connection
          in: path
          required: true
          schema:
            description: ID of the payroll connection
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: ID of the payroll connection
          example: 880e8400-e29b-41d4-a716-446655440003
        - name: startDate
          in: query
          required: true
          schema:
            description: Inclusive start of the check date range, as YYYY-MM-DD
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Inclusive start of the check date range, as YYYY-MM-DD
          example: '2026-01-01'
        - name: endDate
          in: query
          required: true
          schema:
            description: Inclusive end of the check date range, as YYYY-MM-DD
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Inclusive end of the check date range, as YYYY-MM-DD
          example: '2026-12-31'
        - name: limit
          in: query
          required: false
          schema:
            description: Maximum number of records to return
            type: integer
            minimum: 1
            maximum: 4294967295
          description: Maximum number of records to return
        - name: offset
          in: query
          required: false
          schema:
            description: Number of records to skip from the beginning
            type: integer
            minimum: 0
            maximum: 4294967295
          description: Number of records to skip from the beginning
      responses:
        '200':
          description: Year-to-date data retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListYearToDateResponse'
          headers:
            Link:
              schema:
                type: string
                pattern: >-
                  ^(?:<[^>]+>;\s*rel="(?:self|first|last|prev|next)"(?:,\s+<[^>]+>;\s*rel="(?:self|first|last|prev|next)")*)$
        '400':
          description: Invalid date range or sort requested
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            WWW-Authenticate:
              schema:
                description: Authentication challenge (Bearer)
                type: string
              description: Authentication challenge (Bearer)
        '403':
          description: Insufficient permissions or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Payroll connection not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Retry-After:
              schema:
                description: Number of seconds to wait before retrying
                type: string
              description: Number of seconds to wait before retrying
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ListYearToDateResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              payrollConnectionId:
                description: ID of the payroll connection this payroll record belongs to
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              employeeId:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              ytdAmount:
                description: >-
                  Signed. Negative when corrections or reversals outweigh
                  earnings in the date range.
                type: string
                pattern: ^-?\d{1,16}\.\d{2}$
              ytdHours:
                description: Signed.
                type: string
                pattern: ^-?\d{1,8}(?:\.\d{1,4})?$
              payrollComponents:
                type: array
                items:
                  type: object
                  properties:
                    amount:
                      description: Signed. Negative for corrections, reversals and voids.
                      type: string
                      pattern: ^-?\d{1,16}\.\d{2}$
                    hours:
                      description: >-
                        Signed. Null when the payroll platform reported no hours
                        for this payroll code
                      nullable: true
                      type: string
                      pattern: ^-?\d{1,8}(?:\.\d{1,4})?$
                    payrollCode:
                      description: The payroll platform code these totals are summed over
                      type: string
                    classification:
                      type: string
                    category:
                      type: string
                    subcategory:
                      type: string
                  required:
                    - amount
                    - hours
                    - payrollCode
                    - classification
                    - category
                    - subcategory
                  additionalProperties: false
            required:
              - payrollConnectionId
              - employeeId
              - ytdAmount
              - ytdHours
              - payrollComponents
            additionalProperties: false
        meta:
          type: object
          properties:
            currentCount:
              description: Number of results in current page
              type: integer
              minimum: 0
              maximum: 4294967295
            filters:
              description: Applied filters with field names and operators
              type: object
              additionalProperties:
                type: object
                properties:
                  eq:
                    type: string
                  ne:
                    type: string
                  gt:
                    type: string
                  gte:
                    type: string
                  lt:
                    type: string
                  lte:
                    type: string
                  in:
                    type: array
                    items:
                      type: string
                  not_in:
                    type: array
                    items:
                      type: string
                  like:
                    type: string
                  not_like:
                    type: string
                  contains:
                    type: string
                  not_contains:
                    type: string
                  empty:
                    type: string
                  not_empty:
                    type: string
                additionalProperties: false
            limit:
              description: Maximum number of results per page
              type: integer
              minimum: 0
              maximum: 4294967295
            offset:
              description: Number of results to skip
              type: integer
              minimum: 0
              maximum: 4294967295
            sort:
              description: Sort order
              type: string
              pattern: ^(-?\w{1,100})(?:,(-?\w{1,100})){0,2}$
            totalCount:
              description: Total number of results
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - currentCount
            - filters
            - limit
            - offset
            - sort
            - totalCount
          additionalProperties: false
      required:
        - data
        - meta
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        message:
          description: Human-readable error message
          type: string
        errors:
          description: Array of specific error details
          type: array
          items:
            type: string
      required:
        - message
        - errors
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token obtained from the /v1/auth/token endpoint. Send as:
        Authorization: Bearer <token>.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.