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

# Update opening balance

> Updates the opening balance for an employee



## OpenAPI

````yaml /api-reference/specs/holiday.json put /employees/{employeeId}/opening-balance
openapi: 3.0.1
info:
  title: holiday Service
  description: Holiday API for FlowPayroll
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/holiday
security:
  - X-Auth-Token: []
    X-Org-Id: []
paths:
  /employees/{employeeId}/opening-balance:
    put:
      tags:
        - Opening Balance
      summary: Update opening balance
      description: Updates the opening balance for an employee
      operationId: opening-balance-update
      parameters:
        - name: employeeId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHolidayOpeningBalanceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseBody_HolidayOpeningBalanceResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_Object'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody_Object'
components:
  schemas:
    UpdateHolidayOpeningBalanceRequest:
      type: object
      properties:
        description:
          type: string
        percentageOfTime:
          $ref: '#/components/schemas/PercentageOfTimeOpeningBalanceDto'
      additionalProperties: false
    ResponseBody_HolidayOpeningBalanceResponse:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_HolidayOpeningBalanceResponse'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    ResponseBody_Object:
      type: object
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
        content:
          $ref: '#/components/schemas/ContentResponse_Object'
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
      additionalProperties: false
    PercentageOfTimeOpeningBalanceDto:
      type: object
      properties:
        weeksCount:
          type: integer
          format: int32
        baseHours:
          type: number
          format: double
        baseGross:
          type: number
          format: double
      additionalProperties: false
    MessageWithTokenResponse:
      type: object
      properties:
        text:
          type: string
        token:
          type: string
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
      additionalProperties: false
    ContentResponse_HolidayOpeningBalanceResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/HolidayOpeningBalanceResponse'
        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
    ContentResponse_Object:
      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
    HolidayOpeningBalanceResponse:
      type: object
      properties:
        organisationId:
          type: string
        employeeId:
          type: string
        percentageOfTime:
          $ref: '#/components/schemas/PercentageOfTimeOpeningBalanceDto'
        createdBy:
          type: string
        createdDate:
          type: string
          format: date-time
        updatedBy:
          type: string
        updatedDate:
          type: string
          format: date-time
      additionalProperties: false
    ContentMetadataResponse:
      type: object
      properties:
        dateFormat:
          type: string
        dateTimeFormat:
          type: string
        paginationToken:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      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

````