Token payroll

Create Payroll From CSV

Creates or updates a legacy Payroll row keyed by external ID, storing imported CSV employee data.

POSThttps://api.toku.com/stablecoin-payroll/create-payroll-from-csv

Not available to API keys.

curl --request POST \
  --url 'https://api.toku.com/stablecoin-payroll/create-payroll-from-csv' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "externalPayrollID": "string",
  "payPeriodStart": "string",
  "payPeriodEnd": "string",
  "payrollCutoffDate": "string",
  "approvalDeadline": "string",
  "payDate": "string",
  "payrollEntityId": "string",
  "importedData": [
    {
      "id": "string",
      "currency": "string",
      "employeeId": "string",
      "netPayFiat": 0,
      "minimumWage": 0,
      "employeeName": "string",
      "hasTGAProfile": true,
      "hasValidWallet": true,
      "totalDeduction": 0,
      "hasPayrollError": true,
      "netPayStableCoin": 0,
      "totalCompensation": 0,
      "hasMinimumWageError": true,
      "bonusPay": 0,
      "email": "user@example.com",
      "roleInOrgID": "string"
    }
  ],
  "payrollSyncedSource": "string"
}'
200 response
{
  "payroll": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "orgID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "entity": "string",
    "payPeriodStart": "string",
    "payPeriodEnd": "string",
    "payDate": "string",
    "currentStep": "CONFIGURATION",
    "state": "DRAFT",
    "type": "ON_CYCLE",
    "externalPayrollID": "string",
    "fiatCurrency": "string",
    "stableCoinCurrency": "string",
    "tokenTypeID": "string",
    "exchangeRate": "string",
    "isStablecoinPayrollComplete": true,
    "isFiatPayrollComplete": true,
    "isSyncedFromHRIS": true,
    "selectedEmployeeIds": [
      "string"
    ],
    "isCsvUploaded": true,
    "createdAt": "string",
    "updatedAt": "string",
    "createdByID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "lastModifiedByID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}

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

externalPayrollIDstringrequired

Allowed: 1 to 200 characters

payPeriodStartstringrequired

Allowed: 1 to 50 characters

payPeriodEndstringrequired

Allowed: 1 to 50 characters

payrollCutoffDatestring

Allowed: at most 50 characters

approvalDeadlinestring

Allowed: at most 50 characters

payDatestringrequired

Allowed: 1 to 50 characters

payrollEntityIdstring

Allowed: at most 200 characters

importedDataobject[]required

Allowed: at most 10000 items

Show child attributes
idstringrequired

Allowed: 1 to 200 characters

currencystringrequired

Allowed: 1 to 20 characters

employeeIdstringrequired

Allowed: 1 to 200 characters

netPayFiatnumberrequired
minimumWagenumberrequired
employeeNamestringrequired

Allowed: at most 200 characters

hasTGAProfilebooleanrequired
hasValidWalletbooleanrequired
totalDeductionnumberrequired
hasPayrollErrorbooleanrequired
netPayStableCoinnumberrequired
totalCompensationnumberrequired
hasMinimumWageErrorbooleanrequired
bonusPaynumberrequired
emailstring<email>
roleInOrgIDstring

Allowed: at most 200 characters

payrollSyncedSourcestringrequired

Allowed: 1 to 100 characters

Response

200Successful response
payrollobjectrequired
Show child attributes
idstring<uuid>required
orgIDstring<uuid>required
namestringrequired
entitystringrequired
payPeriodStartstringrequired
payPeriodEndstringrequired
payDatestringrequired
currentStepstringrequired

Available options: CONFIGURATION, COMPENSATION_DETAILS, TAX_CALCULATION, APPROVAL_TRANSFER, SETTLED

statestringrequired

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

typestringrequired

Available options: ON_CYCLE, OFF_CYCLE, INVOICE_PAYMENT

externalPayrollIDstring | nullrequired
fiatCurrencystringrequired
stableCoinCurrencystring | nullrequired
tokenTypeIDstring | nullrequired
exchangeRatestring | nullrequired

Allowed: matches ^-?\d+(?:\.\d+)?$

isStablecoinPayrollCompletebooleanrequired
isFiatPayrollCompletebooleanrequired
isSyncedFromHRISbooleanrequired
selectedEmployeeIdsstring[]required
importedDataanyrequired
processedDataanyrequired
settlementDataanyrequired
isCsvUploadedboolean | nullrequired
createdAtstringrequired
updatedAtstringrequired
createdByIDstring<uuid>required
lastModifiedByIDstring<uuid>required
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits