I've tried several methods for creating an employee with a custom role. All of them result in the Employee getting assigned the system role that the custom role is based on. I've tried:
{"name":"test","nickname":"test","pin":"9999","roleId":"XXX","roles":{"elements":[{"id":"XXX"}]}}
and
{"roles":{"elements":[{"id":"XXX"}]},"roleId":"XXX","name":"XXX","nickname":"XXX","customId":XXX,"pin":"XXX","role":"EMPLOYEE"}
and
{"roles":[{"id":"XXX"}],"name":"XXX","nickname":"XXX","customId":XXX,"pin":"XXX","role":"EMPLOYEE"}
and
{"roles":[{"id":"XXX"}],"roleId":"XXX","name":"XXX","nickname":"XXX","customId":XXX,"pin":"XXX","role":"EMPLOYEE"}
and
{"roleId":"XXX","name":"XXX","nickname":"XXX","customId":XXX,"pin":"XXX","role":"EMPLOYEE"}
Obviously, the XXX in the roles ID is my custom roles ID.
What else is there to try?