Identity, people & notifications

Employee Sync

Syncs employees from the org HRIS integration; large sets or forceAsync create a sync-history row and enqueue a Trigger.dev job.

POSThttps://api.toku.com/stablecoin-payroll/employee-sync

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

curl --request POST \
  --url 'https://api.toku.com/stablecoin-payroll/employee-sync' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "orgID": "string",
  "filters": {},
  "filterConfigId": "string",
  "saveAsDefault": true,
  "forceAsync": true
}'
200 response
{
  "pendingCredentialRequests": [
    {
      "requestID": "string",
      "userID": "string",
      "roleInOrgID": "string",
      "destination": "string",
      "status": "REQUESTED",
      "notificationFailed": true
    }
  ],
  "pendingCredentialCount": 0,
  "success": true,
  "recordsProcessed": 0,
  "recordsCreated": 0,
  "recordsUpdated": 0,
  "errors": [
    "string"
  ],
  "syncHistory": {
    "syncHistoryID": "string",
    "orgID": "string"
  },
  "conflicts": [
    {
      "externalEmployeeID": "string",
      "email": "string",
      "givenName": "string",
      "familyName": "string",
      "department": "string",
      "position": "string",
      "integrationSource": "string"
    }
  ],
  "requiresConflictResolution": true,
  "asyncJobQueued": true,
  "syncHistoryId": "string",
  "message": "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

orgIDstring
filtersobject | object

NOTE(ck): a recursive z.lazy() schema has no contract form; TGA still checks it

Show child attributes
versionanyrequired
rootGroupanyrequired
filterConfigIdstring
saveAsDefaultboolean
forceAsyncboolean

Response

200Successful response
pendingCredentialRequestsobject[]
Show child attributes
requestIDstring | nullrequired
userIDstringrequired
roleInOrgIDstringrequired
destinationstringrequired
statusstringrequired

Available options: REQUESTED, ADMIN_REQUEST_REQUIRED

notificationFailedboolean
pendingCredentialCountnumber
successbooleanrequired
recordsProcessednumberrequired
recordsCreatednumberrequired
recordsUpdatednumberrequired
errorsstring[]required
syncHistoryobjectrequired
Show child attributes
syncHistoryIDstringrequired
orgIDstringrequired
conflictsobject[]
Show child attributes
externalEmployeeIDstringrequired
emailstringrequired
givenNamestringrequired
familyNamestringrequired
departmentstring
positionstring
integrationSourcestringrequired
requiresConflictResolutionboolean
asyncJobQueuedboolean
syncHistoryIdstring
messagestring
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits