Error when updating a user using the api

Hello,

I am trying to update an existing user using the api - https://smith.teamdynamix.com/SBTDWebApi/api/people/<UID>.

However, i encounter an error "{"ID":-1,"Message":"Could not edit user: You cannot change a user's type via the API"}". I am not trying to change the user's type.

The body of the post contains the following elements:

{
"Username":"xxx",
"Authentication Provider":"TeamDynamix",
"Authentication Username":"xxx",
"First Name":"xxx",
"Last Name":"xxx",
"Middle Name":"xx",
"Nick Name":"xx",
"Primary Email":"xxx",
"Alert Email":"xx",
"Organizational ID":"xxx",
"Location":"xxx",
"Title":"xxx",
"Acct/Dept":"xxx",
"Work Phone":"xxx",
"Work Postal Code":"xx",
"Time Zone ID":2,
"Security Role":"Client",
"Is Active":true,
"Is Employee":true
}

Help appreciated!

Asked by R A on Tue 11/19/19 3:40 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Kris Kennedy Tue 11/19/19 4:10 PM

Hello Anita,

The error you are receiving is about the User Type, and I see that the User Type is not represented in your POST. We do not allow partial objects on anything but the ticket PATCH operation. Therefore this endpoint expects a full person object. I recommend to GET the person then take the full response object and send it back with whatever updates are being needed. This confirms you are not sending a partial object. 

No feedback