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

# Get Available Earnings

> Returns a list of all earning types available for Mexico payroll calculations (e.g., SALARY, DOUBLE_OVERTIME, XMAS, VACATION_PREMIUM, etc.). Supports optional locale parameter for translated names and descriptions.



## OpenAPI

````yaml GET /api/mexico-payroll/earnings
openapi: 3.0.3
info:
  title: FluxPayroll API
  description: >-
    API for calculating gross-to-net payroll calculations across different
    countries. Currently supports Mexico with ISR, IMSS, INFONAVIT, and
    state-level payroll tax calculations.
  version: 2.0.0
  contact:
    name: FluxPayroll
    url: https://fluxpayroll.ai
servers:
  - url: https://api.staging.fluxpayroll.ai
    description: Staging
security:
  - apiKey: []
paths:
  /api/mexico-payroll/earnings:
    get:
      tags:
        - Mexico Payroll
      summary: Get all available earnings for Mexico
      description: >-
        Returns a list of all earning types available for Mexico payroll
        calculations (e.g., SALARY, DOUBLE_OVERTIME, XMAS, VACATION_PREMIUM,
        etc.). Supports optional locale parameter for translated names and
        descriptions.
      operationId: getMexicoEarnings
      parameters:
        - name: locale
          in: query
          required: false
          schema:
            type: string
            enum:
              - es-MX
              - en-US
              - en-MX
          description: >-
            Locale for translated names and descriptions. Defaults to Spanish
            (es-MX) if not specified.
      responses:
        '200':
          description: List of available earning types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EarningResponse'
        '400':
          description: Unsupported locale
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EarningResponse:
      type: object
      required:
        - key
        - name
        - description
      properties:
        key:
          type: string
          description: Unique earning code
          example: SALARY
        name:
          type: string
          description: Display name of the earning
          example: Salario Base
        description:
          type: string
          description: Detailed description of the earning type
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message
          example: Invalid input data provided
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                description: Field that caused the error
              message:
                type: string
                description: Specific error message for the field
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````