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

# Get rule-derived accrual figures

> Apply the team's accrual rules to the client's payrolls (every payroll report or synced run on the client counts for every one of its plans) and return plan-level prior/current accrual amounts per census money type for the plan year. A side with no payroll for that plan year is null, with prior_reason/current_reason saying why; rules_off lists the money types no enabled rule covers.



## OpenAPI

````yaml /api-reference/cx/swagger.json get /packages/retirement/accruals/{py}/{client}
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/accruals/{py}/{client}:
    get:
      tags:
        - packages
      summary: Get rule-derived accrual figures
      description: >-
        Apply the team's accrual rules to the client's payrolls (every payroll
        report or synced run on the client counts for every one of its plans)
        and return plan-level prior/current accrual amounts per census money
        type for the plan year. A side with no payroll for that plan year is
        null, with prior_reason/current_reason saying why; rules_off lists the
        money types no enabled rule covers.
      parameters:
        - description: Plan year
          name: py
          in: path
          required: true
          schema:
            type: integer
        - description: Client ID
          name: client
          in: path
          required: true
          schema:
            type: string
        - description: Plan ID
          name: plan
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Accrual figures
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_packages_retirement_accruals.FiguresResponse
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Plan not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_packages_retirement_accruals.FiguresResponse:
      type: object
      properties:
        available:
          type: boolean
        current:
          type: object
          additionalProperties:
            type: number
            format: float64
        current_reason:
          type: string
        prior:
          type: object
          additionalProperties:
            type: number
            format: float64
        prior_reason:
          type: string
        reason:
          type: string
        rules_off:
          description: >-
            RulesOff lists the money types with no enabled rule. They are absent
            from

            Prior and Current because nothing is configured for them, not
            because they are zero.
          type: array
          items:
            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.