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

# Generate pay period report

> Generate an Excel report analyzing payroll changes between pay periods for a specific retirement plan. Includes compensation and contribution changes, plus employment changes (hires, terminations, rehires).



## OpenAPI

````yaml /api-reference/cx/swagger.json post /packages/retirement/reports/_pay_period
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /packages/retirement/reports/_pay_period:
    post:
      tags:
        - packages
      summary: Generate pay period report
      description: >-
        Generate an Excel report analyzing payroll changes between pay periods
        for a specific retirement plan. Includes compensation and contribution
        changes, plus employment changes (hires, terminations, rehires).
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_packages_retirement_reports.PayPeriodReportRequest
        description: Pay period report request with plan ID, start date, and end date
        required: true
      responses:
        '200':
          description: Excel file with pay period report
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
        '400':
          description: >-
            Bad request - invalid request body, dates, or missing payroll API
            mapping
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Plan, client, or payroll mapping not found or no access
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_packages_retirement_reports.PayPeriodReportRequest:
      type: object
      properties:
        end_date:
          type: string
        plan:
          type: string
        start_date:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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