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

# Bulk Upload Token Payroll CSV

> Creates token payrolls, entities and contributors in bulk from parsed CSV rows tagged CSV_UPLOAD.

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

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/bulk-upload-token-payroll-csv
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/bulk-upload-token-payroll-csv:
    post:
      operationId: bulkUploadTokenPayrollCSV
      summary: Bulk Upload Token Payroll CSV
      description: >-
        Creates token payrolls, entities and contributors in bulk from parsed
        CSV rows tagged CSV_UPLOAD.


        Not available to API keys yet. It will need `payroll:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUploadTokenPayrollCSVRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUploadTokenPayrollCSVResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    BulkUploadTokenPayrollCSVRequest:
      type: object
      properties:
        rows:
          type: array
          items:
            type: object
            properties:
              externalPayrollID:
                type: string
                minLength: 1
                maxLength: 200
              externalEmployeeID:
                type: string
                maxLength: 200
              email:
                type: string
                format: email
              totalPayrollAmount:
                type: string
                minLength: 1
                maxLength: 100
              totalDeductionAmount:
                type: string
                minLength: 1
                maxLength: 100
              netPayrollAmount:
                type: string
                minLength: 1
                maxLength: 100
              givenName:
                type: string
                maxLength: 200
              familyName:
                type: string
                maxLength: 200
              payPeriodStartDate:
                type: string
                minLength: 1
                maxLength: 50
              payPeriodEndDate:
                type: string
                minLength: 1
                maxLength: 50
              payDate:
                type: string
                minLength: 1
                maxLength: 50
              fiatCurrency:
                type: string
                minLength: 1
                maxLength: 20
              country:
                type: string
                minLength: 1
                maxLength: 100
              payrollGroup:
                type: string
                maxLength: 100
              integrationEntityName:
                type: string
                maxLength: 200
              payrollIntegrationEntityId:
                type: string
                maxLength: 200
              isStablecoinOnlySettlement:
                type: boolean
            required:
              - externalPayrollID
              - email
              - totalPayrollAmount
              - totalDeductionAmount
              - netPayrollAmount
              - payPeriodStartDate
              - payPeriodEndDate
              - payDate
              - fiatCurrency
              - country
          minItems: 1
          maxItems: 10000
      required:
        - rows
    BulkUploadTokenPayrollCSVResponse:
      type: object
      properties:
        tokenPayrolls:
          type: array
          items:
            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
              entityInfo:
                type: object
                properties:
                  wasReused:
                    type: boolean
                  existingName:
                    type:
                      - string
                      - 'null'
                  attemptedName:
                    type:
                      - string
                      - 'null'
                required:
                  - wasReused
                  - existingName
                  - attemptedName
              skipped:
                type: boolean
              skipReason:
                type: string
            required:
              - tokenPayroll
              - contributors
              - entityInfo
      required:
        - tokenPayrolls
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
