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

# Set an employee's calculation-method override

> Saves the override and re-previews the employee's open payslips so the pay run picks the new method up.



## OpenAPI

````yaml /api-reference/specs/salary.json put /employees/{employeeId}
openapi: 3.0.1
info:
  title: Salary Service
  description: >-
    Salary module API for FlowPayroll: organisation and employee
    calculation-method configuration, statutory leave policies, and a
    side-effect-free pro-rata calculation. Enums may gain values and objects may
    gain properties without a new version, so a client should ignore properties
    it does not know and treat an enum value it does not recognise as
    unsupported.
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/salary
security:
  - X-Auth-Token: []
    X-Org-Id: []
paths:
  /employees/{employeeId}:
    put:
      tags:
        - Salary employee configuration
      summary: Set an employee's calculation-method override
      description: >-
        Saves the override and re-previews the employee's open payslips so the
        pay run picks the new method up.
      operationId: PutSalaryEmployeeConfig
      parameters:
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertSalaryEmployeeConfigRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalaryEmployeeConfigResponseResponseBody'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponseBody'
components:
  schemas:
    UpsertSalaryEmployeeConfigRequest:
      required:
        - calculationMethod
      type: object
      properties:
        calculationMethod:
          enum:
            - CalendarDays
            - WorkingDays
          type: string
          description: The pro-rating method for this employee's partial periods.
          nullable: true
      additionalProperties: false
      description: Sets the employee's calculation-method override.
    SalaryEmployeeConfigResponseResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/SalaryEmployeeConfigResponseContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ObjectResponseBody:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ObjectContentResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    SalaryEmployeeConfigResponseContentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SalaryEmployeeConfigResponse'
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssue:
      type: object
      properties:
        field:
          type: string
        reason:
          type: string
        reasonToken:
          type: string
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ObjectContentResponse:
      type: object
      properties:
        data:
          nullable: true
        metadata:
          $ref: '#/components/schemas/ContentMetadataResponse'
      additionalProperties: false
    ValidationIssueArgument:
      type: object
      properties:
        name:
          type: string
        value:
          nullable: true
      additionalProperties: false
    SalaryEmployeeConfigResponse:
      type: object
      properties:
        employeeId:
          type: string
        calculationMethod:
          enum:
            - CalendarDays
            - WorkingDays
          type: string
          nullable: true
        effectiveCalculationMethod:
          enum:
            - CalendarDays
            - WorkingDays
          type: string
          description: >-
            How a partial pay period is pro-rated: `CalendarDays` or
            `WorkingDays`.
        source:
          enum:
            - Default
            - Organisation
            - Employee
          type: string
          description: Where the effective calculation method for an employee came from.
        createdBy:
          type: string
          nullable: true
        createdDate:
          type: string
          nullable: true
        updatedBy:
          type: string
          nullable: true
        updatedDate:
          type: string
          nullable: true
      additionalProperties: false
      description: >-
        The employee's salary configuration. `calculationMethod` is the override
        (null when the employee inherits); `effectiveCalculationMethod` is what
        the calculation uses and `source` says where it came from.
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: FlowPayroll JWT (raw token, no Bearer prefix)
      name: X-Auth-Token
      in: header
    X-Org-Id:
      type: apiKey
      description: >-
        Organisation to scope the request to. Required when the principal can
        access more than one organisation; optional for single-organisation
        principals (the authorizer resolves it automatically).
      name: X-Org-Id
      in: header

````

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