People & profiles

Set Hris Direct Reports

Adds or removes up to 50 direct reports for a manager as auto-approved change requests in one serializable transaction.

POSThttps://api.toku.com/hris/set-hris-direct-reports

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

curl --request POST \
  --url 'https://api.toku.com/hris/set-hris-direct-reports' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "managerRoleInOrgID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "addRoleInOrgIDs": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "removeRoleInOrgIDs": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "effectiveDate": "string"
}'
200 response
{
  "managerRoleInOrgID": "string",
  "applied": [
    {
      "roleInOrgID": "string",
      "action": "ADDED",
      "changeRequestId": "string"
    }
  ],
  "skipped": [
    {
      "roleInOrgID": "string",
      "reason": "NOT_FOUND"
    }
  ]
}

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

managerRoleInOrgIDstring<uuid>required
addRoleInOrgIDsstring<uuid>[]

NOTE(ck): default [] is not expressible here, so this field is optional; TGA applies the default

removeRoleInOrgIDsstring<uuid>[]

NOTE(ck): default [] is not expressible here, so this field is optional; TGA applies the default

effectiveDatestring | null

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

Response

200Successful response
managerRoleInOrgIDstringrequired
appliedobject[]required
Show child attributes
roleInOrgIDstringrequired
actionstringrequired

Available options: ADDED, REMOVED

changeRequestIdstringrequired
skippedobject[]required
Show child attributes
roleInOrgIDstringrequired
reasonstringrequired

Available options: NOT_FOUND, NO_EMPLOYEE_PROFILE, INACTIVE, SELF, ALREADY_DIRECT_REPORT, WOULD_CREATE_CYCLE, NOT_A_DIRECT_REPORT

400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits