Token payroll
Create Payroll From Validated Data
Creates or updates a token payroll with contributors from reviewed upload data, resolving pay dates from settings.
POSThttps://api.toku.com/stablecoin-payroll/create-payroll-from-validated-data
Not available to API keys yet. It will need payroll:write.
curl --request POST \
--url 'https://api.toku.com/stablecoin-payroll/create-payroll-from-validated-data' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"tokenPayrollId": "string",
"validatedEmployees": [
{
"employeeName": "string",
"employeeId": "string",
"employeeEmail": "string",
"grossCompensation": 0,
"totalDeductions": 0,
"netPay": 0,
"positionID": "string",
"confidence": 0,
"currency": "string",
"tokenTypeID": "string"
}
],
"payrollMetadata": {
"payrollName": "string",
"payrollId": "string",
"payrollCycle": "string",
"approvalCutOffDate": "string",
"payPeriodStart": "string",
"payPeriodEnd": "string",
"payDate": "string",
"payDateManuallySet": true,
"currency": "string",
"totalEmployees": 0,
"payrollEntity": {
"name": "string",
"country": "string",
"taxCurrencyCode": "string"
},
"payrollType": "string"
},
"selectedTokenTypeID": "string"
}'200 response
{
"success": true,
"payrollId": "string",
"message": "string",
"errors": [
"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
tokenPayrollIdstringvalidatedEmployeesobject[]requiredShow child attributes
employeeNamestringrequiredemployeeIdstringemployeeEmailstringgrossCompensationnumberrequiredtotalDeductionsnumberrequirednetPaynumberrequiredpositionIDstringconfidencenumbercurrencystringtokenTypeIDstringpayrollMetadataobjectrequiredNOTE(ck): a .superRefine() rule is not mirrored here; TGA still enforces it
Show child attributes
payrollNamestringpayrollIdstringrequiredpayrollCyclestringrequiredapprovalCutOffDatestringpayPeriodStartstringpayPeriodEndstringpayDatestringpayDateManuallySetbooleancurrencystringtotalEmployeesnumberpayrollEntityobjectShow child attributes
namestringcountrystringtaxCurrencyCodestringpayrollTypestringselectedTokenTypeIDstringResponse
200Successful response
successbooleanrequiredpayrollIdstringmessagestringerrorsstring[]400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits