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
AuthorizationstringheaderrequiredBearer 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
tokenPayrollIdstringfileNamestringrequiredfileSizenumberrequiredfileTypestringrequiredfileDatastringrequiredvalidateOnlybooleanpayrollTypestringselectedTokenTypeIdstring | nullamountInputModestringAvailable options: fiat, stablecoin
isADPUploadbooleanisUKGUploadbooleanconfirmedMappingsobjectforceAIExtractionbooleanselectedSheetNamestringResponse
200Successful response
successbooleanrequiredextractedDataany[]requiredpayrollMetadataanytotalEmployeesnumberrequiredprocessingTimenumberrequiredwarningsstring[]errorsstring[]payrollIdstringerrorDetailsobject[]Show child attributes
typestringrequiredmessagestringrequiredfieldstringrownumbervalueanysuggestionstringinvalidDataany[]validEmployeesnumberinvalidEmployeesnumbervalidateOnlybooleanentityInfoobjectShow child attributes
wasReusedbooleanrequiredexistingNamestring | nullrequiredattemptedNamestring | nullrequiredpayrollGroupsobject[]Show child attributes
payrollIdstringrequiredpayrollMetadataanyrequiredvalidEmployeesany[]requiredinvalidEmployeesany[]requiredtotalEmployeesnumberrequiredisMultiPayrollbooleancolumnMappingobjectShow child attributes
autoMappedobject[]requiredShow child attributes
sourceHeaderstringrequiredcanonicalFieldstringrequiredcanonicalLabelstringrequiredconfidencenumberrequiredsourcestringrequiredneedsReviewobject[]requiredShow child attributes
sourceHeaderstringrequiredsuggestedFieldstring | nullrequiredsuggestedLabelstring | nullrequiredconfidencenumberrequiredsourcestringrequiredreasonstringrequiredsampleValuesstring[]alternativesobject[]Show child attributes
canonicalFieldstringrequiredcanonicalLabelstringrequiredconfidencenumberrequiredmissingRequiredstring[]requiredreadyToImportbooleanrequiredcountryCodestringsheetNamestringavailableSheetsstring[]requireddiagnosticCodestringskippedRowCountnumberrequiredfieldOptionsobject[]requiredShow child attributes
valuestringrequiredlabelstringrequiredwarningsstring[]400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits