Token payroll

Update Token Payroll State

Sets a token payroll's state under a dispatch lock, refusing to reopen a COMPLETED payroll.

POSThttps://api.toku.com/stablecoin-payroll/update-token-payroll-state

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

curl --request POST \
  --url 'https://api.toku.com/stablecoin-payroll/update-token-payroll-state' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tokenPayrollId": "string",
  "state": "DRAFT"
}'
200 response
{
  "tokenPayroll": {
    "tokenPayrollID": "string",
    "orgID": "string",
    "payPeriodStart": "string",
    "payPeriodEnd": "string",
    "payDate": "string",
    "externalPayrollID": "string",
    "fiatCurrency": "string",
    "payrollEntityId": "string",
    "state": "string",
    "type": "string",
    "createdAt": "string",
    "updatedAt": "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

tokenPayrollIdstringrequired

Allowed: 1 to 200 characters

statestringrequired

Available options: DRAFT, PENDING, OVERDUE, LOCKED, IN_PROGRESS, APPROVED, COMPLETED, CANCELLED

Response

200Successful response
tokenPayrollobjectrequired
Show child attributes
tokenPayrollIDstringrequired
orgIDstringrequired
payPeriodStartstringrequired
payPeriodEndstringrequired
payDatestringrequired
externalPayrollIDstring | nullrequired
fiatCurrencystringrequired
payrollEntityIdstring | nullrequired
statestringrequired
typestringrequired
createdAtstringrequired
updatedAtstringrequired
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits