Using API to POST a user and set their Manager
We cannot get the POST User to assign a Manager when adding a User. Is there some permissions that need to be set to assign a manager during a POST user. Or are we missing the correct syntax in the “relationship” part of the body? What should be set for the “type” in the “relationship” section of the POST? If we take the “relationship” section out it works and the user’s Manager gets assigned to our root Manager account. But we want to assign specific Manager's during the POST.
Also, can a user have more than one Manager ?
Below is our body for the POST and the Response that comes back:
Body:
{
"data": {
"type": "user",
"attributes": {
"email": "ssmith@acme.com",
"name": "Sydney Smith",
"profile": "employee",
"roles": [
"Learner", "Manager", "Admin"
],
"userType": "INTERNAL",
"state": "ACTIVE"
},
"relationships": {
"manager": {
"type": "user",
"id": "1313314" // This is a valid user Id in the system
}
}
}
}
Response Body:
{
"status": "BAD_REQUEST",
"title": "Missing Param",
"source": {
"info": "Couldn't find the type for a relationship"
}
}
