User API
I am sending a POST to the User API endpoint .../TDWebApi/api/people/{{uid}} with the body:
{
"FirstName": "{{firstName}}",
"LastName": "{{lastName}}",
"PrimaryEmail": "{{primaryEmail}}",
"Company": "Chico State",
"IsEmployee": "false",
"IsCapacityManaged": "false",
"ShouldReportTime": "false"
}
We need to uncheck these boxes:
The documentation shows that the IsEmployee should be editable:
When I test a populate the variables, I am receiving this error in the response body:
{"ID":-1,"Message":"Could not edit user: You cannot change a user's type via the API"}
Answers (2)
Hi Scott,
That endpoint is meant to facilitate an edit of a user's account when you are passing their entire user API object back to the endpoint. If you only want to edit certain properties on their user account, and you already have the UID, it would be better to just use the PATCH endpoint instead.
You can cause user data to be removed if you do not POST the full user object to that POST API endpoint, but you're missing the TypeID property with an appropriate ID value for this user's Type value in that call.
Sincerely,
Mark Sayers
Sr Support Consultant, CS
{"ID":-1,"Message":"Could not edit user: Authentication Provider ID is invalid."}
I m using Authorization: Bearer {{authToken}} in the Header which works fine on my other administrative web service methods. - Scott Cory Tue 6/11/24 12:27 PM
This is the chain of workflow steps required to separate a user:
The reason we need a single "convert user to customer" API endpoint.