Token payroll

Process Payroll File

Parses an uploaded payroll file via ADP/UKG parsers, spreadsheet mapping or Claude extraction into validated rows without persisting.

POSThttps://api.toku.com/stablecoin-payroll/process-payroll-file

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

curl --request POST \
  --url 'https://api.toku.com/stablecoin-payroll/process-payroll-file' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tokenPayrollId": "string",
  "fileName": "string",
  "fileSize": 0,
  "fileType": "string",
  "fileData": "string",
  "validateOnly": true,
  "payrollType": "string",
  "selectedTokenTypeId": "string",
  "amountInputMode": "fiat",
  "isADPUpload": true,
  "isUKGUpload": true,
  "confirmedMappings": {},
  "forceAIExtraction": true,
  "selectedSheetName": "string"
}'
200 response
{
  "success": true,
  "extractedData": [],
  "totalEmployees": 0,
  "processingTime": 0,
  "warnings": [
    "string"
  ],
  "errors": [
    "string"
  ],
  "payrollId": "string",
  "errorDetails": [
    {
      "type": "string",
      "message": "string",
      "field": "string",
      "row": 0,
      "suggestion": "string"
    }
  ],
  "invalidData": [],
  "validEmployees": 0,
  "invalidEmployees": 0,
  "validateOnly": true,
  "entityInfo": {
    "wasReused": true,
    "existingName": "string",
    "attemptedName": "string"
  },
  "payrollGroups": [
    {
      "payrollId": "string",
      "validEmployees": [],
      "invalidEmployees": [],
      "totalEmployees": 0
    }
  ],
  "isMultiPayroll": true,
  "columnMapping": {
    "autoMapped": [
      {
        "sourceHeader": "string",
        "canonicalField": "string",
        "canonicalLabel": "string",
        "confidence": 0,
        "source": "string"
      }
    ],
    "needsReview": [
      {
        "sourceHeader": "string",
        "suggestedField": "string",
        "suggestedLabel": "string",
        "confidence": 0,
        "source": "string",
        "reason": "string",
        "sampleValues": [
          "string"
        ],
        "alternatives": [
          {
            "canonicalField": "string",
            "canonicalLabel": "string",
            "confidence": 0
          }
        ]
      }
    ],
    "missingRequired": [
      "string"
    ],
    "readyToImport": true,
    "countryCode": "string",
    "sheetName": "string",
    "availableSheets": [
      "string"
    ],
    "diagnosticCode": "string",
    "skippedRowCount": 0,
    "fieldOptions": [
      {
        "value": "string",
        "label": "string"
      }
    ],
    "warnings": [
      "string"
    ]
  }
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

tokenPayrollIdstring
fileNamestringrequired
fileSizenumberrequired
fileTypestringrequired
fileDatastringrequired
validateOnlyboolean
payrollTypestring
selectedTokenTypeIdstring | null
amountInputModestring

Available options: fiat, stablecoin

isADPUploadboolean
isUKGUploadboolean
confirmedMappingsobject
forceAIExtractionboolean
selectedSheetNamestring

Response

200Successful response
successbooleanrequired
extractedDataany[]required
payrollMetadataany
totalEmployeesnumberrequired
processingTimenumberrequired
warningsstring[]
errorsstring[]
payrollIdstring
errorDetailsobject[]
Show child attributes
typestringrequired
messagestringrequired
fieldstring
rownumber
valueany
suggestionstring
invalidDataany[]
validEmployeesnumber
invalidEmployeesnumber
validateOnlyboolean
entityInfoobject
Show child attributes
wasReusedbooleanrequired
existingNamestring | nullrequired
attemptedNamestring | nullrequired
payrollGroupsobject[]
Show child attributes
payrollIdstringrequired
payrollMetadataanyrequired
validEmployeesany[]required
invalidEmployeesany[]required
totalEmployeesnumberrequired
isMultiPayrollboolean
columnMappingobject
Show child attributes
autoMappedobject[]required
Show child attributes
sourceHeaderstringrequired
canonicalFieldstringrequired
canonicalLabelstringrequired
confidencenumberrequired
sourcestringrequired
needsReviewobject[]required
Show child attributes
sourceHeaderstringrequired
suggestedFieldstring | nullrequired
suggestedLabelstring | nullrequired
confidencenumberrequired
sourcestringrequired
reasonstringrequired
sampleValuesstring[]
alternativesobject[]
Show child attributes
canonicalFieldstringrequired
canonicalLabelstringrequired
confidencenumberrequired
missingRequiredstring[]required
readyToImportbooleanrequired
countryCodestring
sheetNamestring
availableSheetsstring[]required
diagnosticCodestring
skippedRowCountnumberrequired
fieldOptionsobject[]required
Show child attributes
valuestringrequired
labelstringrequired
warningsstring[]
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits