> ## 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 Token Payroll

> Updates a DRAFT token payroll's dates, currency and existing contributors' amounts, looked up by external payroll ID.

Not available to API keys yet. It will need `payroll:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/update-token-payroll
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/update-token-payroll:
    post:
      operationId: updateTokenPayroll
      summary: Update Token Payroll
      description: >-
        Updates a DRAFT token payroll's dates, currency and existing
        contributors' amounts, looked up by external payroll ID.


        Not available to API keys yet. It will need `payroll:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTokenPayrollRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTokenPayrollResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpdateTokenPayrollRequest:
      type: object
      properties:
        externalPayrollID:
          type: string
          minLength: 1
          maxLength: 200
        payPeriodStart:
          type: string
          format: date-time
        payPeriodEnd:
          type: string
          format: date-time
        payDate:
          type: string
          format: date-time
        fiatCurrency:
          type: string
          enum:
            - TRY
            - ILS
            - CRC
            - TTD
            - SGD
            - JPY
            - AUD
            - NOK
            - INR
            - GBP
            - CHF
            - RUB
            - CAD
            - BRL
            - NGN
            - KRW
            - AED
            - LBP
            - EUR
            - NZD
            - ZAR
            - USD
            - USDC
            - USDT
            - USDP
            - PHP
            - PLN
            - RSD
            - HKD
            - TWD
            - AFN
            - AMD
            - ANG
            - AOA
            - ARS
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CDF
            - CLF
            - CLP
            - CNY
            - COP
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - FJD
            - FKP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KWD
            - KYD
            - KZT
            - LAK
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NPR
            - NIO
            - OMR
            - PAB
            - PEN
            - PGK
            - PKR
            - PYG
            - QAR
            - RON
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - TJS
            - TMT
            - TND
            - TOP
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XOF
            - XPF
            - YER
            - ZMW
            - SEK
            - THB
        contributors:
          type: array
          items:
            type: object
            properties:
              externalEmployeeID:
                type: string
                minLength: 1
                maxLength: 200
              email:
                type: string
                format: email
              totalPayrollAmount:
                type: number
              totalDeductionAmount:
                type: number
              netPayrollAmount:
                type: number
              givenName:
                type: string
                maxLength: 200
              familyName:
                type: string
                maxLength: 200
            required:
              - externalEmployeeID
              - email
              - totalPayrollAmount
              - totalDeductionAmount
              - netPayrollAmount
          maxItems: 10000
      required:
        - externalPayrollID
    UpdateTokenPayrollResponse:
      type: object
      properties:
        tokenPayroll:
          type: object
          properties:
            tokenPayrollID:
              type: string
            paymentBackend:
              type:
                - string
                - 'null'
            paymentOwnershipVersion:
              type: integer
            orgID:
              type: string
            name:
              type:
                - string
                - 'null'
            payPeriodStart:
              type: string
            payPeriodEnd:
              type: string
            payDate:
              type: string
            externalPayrollID:
              type:
                - string
                - 'null'
            fiatCurrency:
              type: string
            payrollEntityId:
              type:
                - string
                - 'null'
            state:
              type: string
            type:
              type: string
            payrollGroup:
              type:
                - string
                - 'null'
            integrationEntityName:
              type:
                - string
                - 'null'
            payrollIntegrationEntityId:
              type:
                - string
                - 'null'
            isFiatPayrollComplete:
              type: boolean
            isTokenPayrollComplete:
              type: boolean
            fundingEmailSent:
              type: boolean
            adpDeductionsVerified:
              type: boolean
            importedData: {}
            payrollSyncedSource:
              type:
                - string
                - 'null'
            isPlaceholder:
              type: boolean
            selectedTokenTypeID:
              type:
                - string
                - 'null'
            isStablecoinOnlySettlement:
              type: boolean
            createdAt:
              type: string
            updatedAt:
              type: string
          required:
            - tokenPayrollID
            - paymentBackend
            - paymentOwnershipVersion
            - orgID
            - name
            - payPeriodStart
            - payPeriodEnd
            - payDate
            - externalPayrollID
            - fiatCurrency
            - payrollEntityId
            - state
            - type
            - payrollGroup
            - integrationEntityName
            - payrollIntegrationEntityId
            - isFiatPayrollComplete
            - isTokenPayrollComplete
            - fundingEmailSent
            - adpDeductionsVerified
            - importedData
            - payrollSyncedSource
            - isPlaceholder
            - selectedTokenTypeID
            - isStablecoinOnlySettlement
            - createdAt
            - updatedAt
        contributors:
          type: array
          items:
            type: object
            properties:
              contributorInTokenPayrollID:
                type: string
              tokenPayrollID:
                type: string
              roleInOrgID:
                type: string
              invoicePaymentID:
                type:
                  - string
                  - 'null'
              totalPayrollAmount:
                type: string
              totalDeductionAmount:
                type: string
              netPayrollAmount:
                type: string
              currency:
                type:
                  - string
                  - 'null'
              tokenTypeID:
                type:
                  - string
                  - 'null'
            required:
              - contributorInTokenPayrollID
              - tokenPayrollID
              - roleInOrgID
              - invoicePaymentID
              - totalPayrollAmount
              - totalDeductionAmount
              - netPayrollAmount
              - currency
              - tokenTypeID
      required:
        - tokenPayroll
        - contributors
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
