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

# Update Payroll State

> Sets a legacy Payroll row's state with no validation.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/update-payroll-state
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/update-payroll-state:
    post:
      operationId: updatePayrollState
      summary: Update Payroll State
      description: |-
        Sets a legacy Payroll row's state with no validation.

        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayrollStateRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePayrollStateResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpdatePayrollStateRequest:
      type: object
      properties:
        payrollId:
          type: string
          minLength: 1
          maxLength: 200
        state:
          type: string
          enum:
            - DRAFT
            - PENDING
            - OVERDUE
            - LOCKED
            - IN_PROGRESS
            - APPROVED
            - COMPLETED
            - CANCELLED
      required:
        - payrollId
        - state
    UpdatePayrollStateResponse:
      type: object
      properties:
        payroll:
          type: object
          properties:
            id:
              type: string
              format: uuid
            orgID:
              type: string
              format: uuid
            name:
              type: string
            entity:
              type: string
            payPeriodStart:
              type: string
            payPeriodEnd:
              type: string
            payDate:
              type: string
            currentStep:
              type: string
              enum:
                - CONFIGURATION
                - COMPENSATION_DETAILS
                - TAX_CALCULATION
                - APPROVAL_TRANSFER
                - SETTLED
            state:
              type: string
              enum:
                - DRAFT
                - PENDING
                - OVERDUE
                - LOCKED
                - IN_PROGRESS
                - APPROVED
                - COMPLETED
                - CANCELLED
            type:
              type: string
              enum:
                - ON_CYCLE
                - OFF_CYCLE
                - INVOICE_PAYMENT
            externalPayrollID:
              type:
                - string
                - 'null'
            fiatCurrency:
              type: string
            stableCoinCurrency:
              type:
                - string
                - 'null'
            tokenTypeID:
              type:
                - string
                - 'null'
            exchangeRate:
              type:
                - string
                - 'null'
              pattern: ^-?\d+(?:\.\d+)?$
            isStablecoinPayrollComplete:
              type: boolean
            isFiatPayrollComplete:
              type: boolean
            isSyncedFromHRIS:
              type: boolean
            selectedEmployeeIds:
              type: array
              items:
                type: string
            importedData: {}
            processedData: {}
            settlementData: {}
            isCsvUploaded:
              type:
                - boolean
                - 'null'
            createdAt:
              type: string
            updatedAt:
              type: string
            createdByID:
              type: string
              format: uuid
            lastModifiedByID:
              type: string
              format: uuid
          required:
            - id
            - orgID
            - name
            - entity
            - payPeriodStart
            - payPeriodEnd
            - payDate
            - currentStep
            - state
            - type
            - externalPayrollID
            - fiatCurrency
            - stableCoinCurrency
            - tokenTypeID
            - exchangeRate
            - isStablecoinPayrollComplete
            - isFiatPayrollComplete
            - isSyncedFromHRIS
            - selectedEmployeeIds
            - importedData
            - processedData
            - settlementData
            - isCsvUploaded
            - createdAt
            - updatedAt
            - createdByID
            - lastModifiedByID
      required:
        - payroll
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
