Need help on Best API to add divisions to roles without hardcoding subjectIds

Need best API to add divisions to roles without hardcoding subjectIds.

What the best method and API to add divisions dynamically to roles without hardcoding subjectIds?

Please advise. This is in the context of creating a new user automatically based on what's in Dayforce and creating a user, assigning User to a division, assigning Roles with related Divisions etc.

Thank you
Suren

Not fully understanding the ask but under User "subjects" you have the three POST endpoints

* Grant of a role in a division
* Replace subjects roles and divisions with list
* Bulk grant roles and divisions to a subject

In terms of the id's for roles/divisions and such you can gather those.
I tend to use powershell and GC tool to automate some admin tasks but you can also do with other SDKs like Python.