> ## 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 distribution report

> Generate an Excel report of distributions for a specific retirement plan and plan year. Includes distribution details and employee information.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /packages/retirement/reports/_distribution
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/_distribution:
    post:
      tags:
        - packages
      summary: Generate distribution report
      description: >-
        Generate an Excel report of distributions for a specific retirement plan
        and plan year. Includes distribution details and employee information.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_packages_retirement_reports.DistributionReportRequest
        description: Distribution report request with plan ID and year
        required: true
      responses:
        '200':
          description: Excel file with distribution report
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - invalid request body or plan year end date
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Plan 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.DistributionReportRequest:
      type: object
      properties:
        plan:
          type: string
        year:
          type: integer
  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.