POST/ users
This API is used to create new Guardian users. Users in this sense are defined as those individuals with I-9 responsibilities, outside of hires needing to complete Section 1 of the form. Though not required, we also recommend passing the user’s title as this information populates the corresponding I-9 Section 2 field, “Title of Employer or Authorized Representative”. The inclusion of the user’s email address is also recommended for those needing to receive login credentials or employee I-9 related notifications. For additional parameter information access the users data model section to review field information.
Method
POST
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 | 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, 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
POST https://<server>/v1/users
{
"workNumber": "6023574400",
"firstName": "Bhawani",
"role": "20",
"title": "HR Manager",
"homeNumber": "4805465687",
"lastName": "Charan",
"workExtension": "12",
"middleName":"Shanker",
"cellNumber": "9865334512",
"emailAddress": "bshanker@abccorp.com"
}
Response Example
{
"id": 2312934,
"workNumber": "6023574400",
"firstName": "Bhawani",
"role": "20",
"title": "HR Manager",
"homeNumber": "4805465687",
"lastName": "Charan",
"workExtension": "12",
"fullName": "Bhawani Shanker Charan ",
"middleName": "Shanker",
"emailAddress": "bshanker@abccorp.com",
"cellNumber": "9865334512",
"login": "sV5ijCZ8v",
"oauthId": "email@exmaple.com",
"samlId": "saml-id",
"profileId": "1244987",
"links": [
{
"href": "/v1/users/2312934/",
"rel": "self"
}
]
}