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.
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"
}'{
"managerRoleInOrgID": "string",
"applied": [
{
"roleInOrgID": "string",
"action": "ADDED",
"changeRequestId": "string"
}
],
"skipped": [
{
"roleInOrgID": "string",
"reason": "NOT_FOUND"
}
]
}Authorizations
AuthorizationstringheaderrequiredBearer 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>requiredaddRoleInOrgIDsstring<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 | nullNOTE(ck): a .refine() rule is not mirrored here; TGA still enforces it
Response
200Successful response
managerRoleInOrgIDstringrequiredappliedobject[]requiredShow child attributes
roleInOrgIDstringrequiredactionstringrequiredAvailable options: ADDED, REMOVED
changeRequestIdstringrequiredskippedobject[]requiredShow child attributes
roleInOrgIDstringrequiredreasonstringrequiredAvailable options: NOT_FOUND, NO_EMPLOYEE_PROFILE, INACTIVE, SELF, ALREADY_DIRECT_REPORT, WOULD_CREATE_CYCLE, NOT_A_DIRECT_REPORT