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

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
validatedEmployeesobject[]required
Show child attributes
employeeNamestringrequired
employeeIdstring
employeeEmailstring
grossCompensationnumberrequired
totalDeductionsnumberrequired
netPaynumberrequired
positionIDstring
confidencenumber
currencystring
tokenTypeIDstring
payrollMetadataobjectrequired

NOTE(ck): a .superRefine() rule is not mirrored here; TGA still enforces it

Show child attributes
payrollNamestring
payrollIdstringrequired
payrollCyclestringrequired
approvalCutOffDatestring
payPeriodStartstring
payPeriodEndstring
payDatestring
payDateManuallySetboolean
currencystring
totalEmployeesnumber
payrollEntityobject
Show child attributes
namestring
countrystring
taxCurrencyCodestring
payrollTypestring
selectedTokenTypeIDstring

Response

200Successful response
successbooleanrequired
payrollIdstring
messagestring
errorsstring[]
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits