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

# Create Employee Compensation Details

> Create initial compensation record for an employee.



## OpenAPI

````yaml /api-reference/preview.json post /organizations/{organization_id}/employees/{employee_id}/compensation-details
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /organizations/{organization_id}/employees/{employee_id}/compensation-details:
    post:
      tags:
        - Core
        - Employees
        - Compensation
      summary: Create Employee Compensation Details
      description: Create initial compensation record for an employee.
      operationId: >-
        create_employee_compensation_details_organizations__organization_id__employees__employee_id__compensation_details_post
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Organization Id
        - name: employee_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
              - type: string
                format: uuid
            title: Employee Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GBCompensationDetails'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GBCompensationDetailsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken: []
components:
  schemas:
    GBCompensationDetails:
      properties:
        employment_country:
          type: string
          const: GB
          title: Employment Country
          default: GB
        earnings:
          anyOf:
            - items:
                $ref: '#/components/schemas/AmountEarnings-Input'
              type: array
            - type: 'null'
          title: Earnings
        benefits:
          anyOf:
            - items:
                $ref: '#/components/schemas/Benefits-Input'
              type: array
            - type: 'null'
          title: Benefits
        deductions:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/payroll__gb__schema__request__Deductions-Input
              type: array
            - type: 'null'
          title: Deductions
        reimbursements:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/payroll__gb__schema__request__Reimbursement-Input
              type: array
            - type: 'null'
          title: Reimbursements
        valid_from:
          type: string
          format: date
          title: Valid From
          description: Effective date
        valid_to:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Valid To
          description: End date (None = current)
      additionalProperties: true
      type: object
      title: GBCompensationDetails
      description: GB compensation details - standing/recurring pay data.
    GBCompensationDetailsResponse:
      properties:
        employee_id:
          type: string
          title: Employee Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        id:
          anyOf:
            - type: string
            - type: string
              format: uuid
          title: Id
        employment_country:
          type: string
          const: GB
          title: Employment Country
          default: GB
        earnings:
          anyOf:
            - items:
                $ref: '#/components/schemas/AmountEarnings-Output'
              type: array
            - type: 'null'
          title: Earnings
        benefits:
          anyOf:
            - items:
                $ref: '#/components/schemas/Benefits-Output'
              type: array
            - type: 'null'
          title: Benefits
        deductions:
          anyOf:
            - items:
                $ref: '#/components/schemas/payroll__gb__schema__request__Deductions'
              type: array
            - type: 'null'
          title: Deductions
        reimbursements:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/payroll__gb__schema__request__Reimbursement-Output
              type: array
            - type: 'null'
          title: Reimbursements
        valid_from:
          type: string
          format: date
          title: Valid From
          description: Effective date
        valid_to:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Valid To
          description: End date (None = current)
      additionalProperties: true
      type: object
      required:
        - employee_id
        - created_at
        - updated_at
        - id
      title: GBCompensationDetailsResponse
      description: Response model for GB compensation details.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AmountEarnings-Input:
      properties:
        earning_type:
          type: string
          const: AMOUNT
          title: Earning Type
          default: AMOUNT
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-E-001)
        amount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
          description: >-
            Earnings amount (negative values represent period adjustments, e.g.
            leave reductions)
        earning_frequency:
          anyOf:
            - $ref: '#/components/schemas/PayCycle'
            - type: 'null'
          description: If recurring, specify the frequency
          default: MONTH
        is_lumpsum:
          type: boolean
          title: Is Lumpsum
          description: True if onetime. Defaults to False
          default: false
        sacrificed_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Sacrificed Amount
          description: >-
            Amount of this earning the employee has sacrificed (Type A OpRA).
            Pre-tax. Must be > 0 when set. Wage type must have
            is_salary_sacrifice_allowed=True
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: AmountEarnings
      description: Fixed-amount earnings (salary, bonus, allowance). Amount + frequency.
    Benefits-Input:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-B-001)
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Amount
          description: Amount of benefit
          default: '0.00'
        make_good_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Make Good Amount
          description: Amount paid by employee for the benefit
          default: '0.00'
        foregone_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Foregone Amount
          description: If subject to OpRa, amount foregone
          default: '0.00'
        cash_alternative_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Cash Alternative Amount
          description: >-
            Cash alternative the employee declined in favour of this benefit
            (Type B OpRA). Contributes to BIK higher-of valuation only; does NOT
            reduce gross. Requires is_salary_sacrifice_allowed=True on the wage
            type.
          default: '0.00'
      additionalProperties: true
      type: object
      required:
        - wage_type_code
      title: Benefits
    payroll__gb__schema__request__Deductions-Input:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-D-001)
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
        sacrificed_amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Sacrificed Amount
          description: >-
            Portion of this deduction that is pre-tax salary sacrifice (Type A
            OpRA). Must be > 0 and <= amount when set. Wage type must have
            is_salary_sacrifice_allowed=True (validated at service layer).
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: Deductions
    payroll__gb__schema__request__Reimbursement-Input:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-R-001)
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: Reimbursement
    AmountEarnings-Output:
      properties:
        earning_type:
          type: string
          const: AMOUNT
          title: Earning Type
          default: AMOUNT
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-E-001)
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
          description: >-
            Earnings amount (negative values represent period adjustments, e.g.
            leave reductions)
        earning_frequency:
          anyOf:
            - $ref: '#/components/schemas/PayCycle'
            - type: 'null'
          description: If recurring, specify the frequency
          default: MONTH
        is_lumpsum:
          type: boolean
          title: Is Lumpsum
          description: True if onetime. Defaults to False
          default: false
        sacrificed_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Sacrificed Amount
          description: >-
            Amount of this earning the employee has sacrificed (Type A OpRA).
            Pre-tax. Must be > 0 when set. Wage type must have
            is_salary_sacrifice_allowed=True
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: AmountEarnings
      description: Fixed-amount earnings (salary, bonus, allowance). Amount + frequency.
    Benefits-Output:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-B-001)
        amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Amount
          description: Amount of benefit
          default: '0.00'
        make_good_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Make Good Amount
          description: Amount paid by employee for the benefit
          default: '0.00'
        foregone_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Foregone Amount
          description: If subject to OpRa, amount foregone
          default: '0.00'
        cash_alternative_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Cash Alternative Amount
          description: >-
            Cash alternative the employee declined in favour of this benefit
            (Type B OpRA). Contributes to BIK higher-of valuation only; does NOT
            reduce gross. Requires is_salary_sacrifice_allowed=True on the wage
            type.
          default: '0.00'
      additionalProperties: true
      type: object
      required:
        - wage_type_code
      title: Benefits
    payroll__gb__schema__request__Deductions:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-D-001)
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
        sacrificed_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
            - type: 'null'
          title: Sacrificed Amount
          description: >-
            Portion of this deduction that is pre-tax salary sacrifice (Type A
            OpRA). Must be > 0 and <= amount when set. Wage type must have
            is_salary_sacrifice_allowed=True (validated at service layer).
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: Deductions
    payroll__gb__schema__request__Reimbursement-Output:
      properties:
        wage_type_code:
          type: string
          title: Wage Type Code
          description: Wage type code from catalog (e.g. UK-R-001)
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
      additionalProperties: true
      type: object
      required:
        - wage_type_code
        - amount
      title: Reimbursement
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PayCycle:
      type: string
      enum:
        - YEAR
        - MONTH
        - WEEK
        - TWO_WEEK
        - FOUR_WEEK
        - QUARTER
        - BIANNUAL
      title: PayCycle
      description: |-
        Employee pay cadence (WEEK, MONTH, etc.).

        The `UpperStrEnum` base is load-bearing. Legacy callers
        (e.g. `src/payroll/gb/niccalculator.py`) look up entries in enum-keyed
        dicts using raw strings like "MONTH"; this works only because
        `hash(PayCycle.MONTH) == hash("MONTH")`. Do not change the base class
        until those callers have been migrated to pass the enum directly
        (tracked as part of the larger legacy-NIC removal).
  securitySchemes:
    BearerToken:
      type: oauth2
      flows:
        password:
          scopes:
            read:all: Read all
            write:all: Write all
            read:health_check: Read health check
            write:health_check: Write health check
            read:wage_types: Read wage types
            write:wage_types: Write wage types
          tokenUrl: >-
            https://auth-preview.intermezzo.ai/authorize?audience=api-preview.intermezzo.ai

````