This API is used to update an existing Guardian user. A user in this sense is defined as an individual with I-9 responsibilities, outside of a hire needing to complete Section 1 of the form. This method is often used when a user’s role changes within the organization. For additional parameter information access the users data model section to review field information.
Method
PATCH
Resource Information
Requires authentication? |
YES |
Request formats |
JSON |
Response formats |
JSON |
Parameters
Parameter |
Label |
Description |
Type |
Max Length |
Required |
id |
Guardian system generated unique key |
int |
N/A |
firstName |
First Name |
User’s first name |
string |
40 |
Yes |
lastName |
Last Name |
User’s last name |
string |
40 |
Yes |
middleName |
Middle Name |
User’s middle name |
string |
25 |
No |
title |
Title |
User’s title |
string |
80 |
No |
emailAddress |
Email |
User’s email address |
string |
80 |
No |
profileId |
Employee ID |
User’s company-issued identification |
string |
30 |
No |
role |
Role |
Defines a group of permissions that outline the user’s capabilities within the system. |
int |
N/A |
Yes |
workNumber |
Work Phone |
Work phone number |
string |
20 |
No |
workExtension |
Ext |
Work phone extension number |
string |
10 |
No |
homeNumber |
Home Phone |
Home phone number |
string |
20 |
No |
cellNumber |
Cell Phone |
Cell phone number |
string |
20 |
No |
login |
Login |
User’s system login name |
string |
30 |
No |
password |
Password |
Optional custom password for the new user; if not sent, the password will be randomly generated. |
string |
80 |
No |
oauthId |
OAuth ID |
Inserts or updates the user’s authentication credentials if OAuth 2.0 SSO is enabled for your organization. If this SSO method is not enabled, an error will be returned. |
string |
80 |
No |
samlId |
SAML ID |
Inserts or updates the user’s authentication credentials if SAML SSO is enabled for your organization. If this SSO method is not enabled, an error will be returned. |
string |
80 |
No |
sendLoginEmail |
Send Login Email |
Indicates if email about login info should be sent to the user. Add to the description: Specify “true” to trigger a welcome email to the user. |
boolean |
No |
retired |
Retire User |
Indicates if the user is retired. |
boolean |
No |
Example
Request Example
PATCH https://<server>/v1/users/<user_id>
{
""firstName"": ""Bhawani"",
""lastName"": ""Charan"",
""middleName"": ""Shanker"",
""role"": ""21"",
""title"": ""HR Director""
}
Response Example
{
""id"": 2312934,
""workNumber"": ""12"",
""firstName"": ""Bhawani"",
""title"": ""Operations HR Manager"",
""homeNumber"": ""5465687"",
""lastName"": ""Charan"",
""workExtension"": ""12"",
""fullName"": ""Bhawani Shanker Charan "",
""middleName"": ""Shanker"",
""emailAddress"": """",
""cellNumber"": ""9865334512"",
""login"": ""sV5ijCZ8v"",
""role"": ""21"",
""title"": ""HR Director"",
""links"": [
{
""href"": ""/v1/users/23129/"",
""rel"": ""self""
}
]
}