API Userods

See API Specification

Userods GET

Version Added: 21.3

Gets a list of users (called userod since "user" is a reserved word in mysql). Users are separate entities from Providers and Employees, although they can be linked. A user can be a provider, an employee, both, or neither. CEMT users are not included.

ProvNum: Contains the provNum if the user is a provider. Otherwise, 0.
providerName: The full name of the provider, including suffix. Blank if user is not a provider.
EmployeeNum: Contains the employeeNum if the user is a employee. Otherwise, 0.
employeeName: The first and last name of the employee. Blank if user is not an employee.

Example Request:
GET /userods

Example Response:
[
{
"UserNum": 1,
"UserName": "Lynda",
"EmployeeNum": 0,
"employeeName": "",
"ClinicNum": 1,
"ProviderNum": 9,
"providerName": "Lynda Larson, DMD",
"emailAddress": "LyndaLarson@email.com",
"IsHidden": "false"
},
{
"UserNum": 2,
"UserName": "Charlie",
"EmployeeNum": 3,
"employeeName": "Charles Sorenson",
"ProviderNum": 0,
"providerName": "",
"ClinicNum": 1,
"emailAddress": "Chuck@hotmail.com",
"IsHidden": "false"
},
{
"UserNum": 3,
"UserName": "Becca",
"EmployeeNum": 4,
"employeeName": "Becca Alexandria",
"ProviderNum": 6,
"providerName": "Becca Alexandria",
"ClinicNum": 2,
"emailAddress": "BAlexandria@gmail.com",
"IsHidden": "false"
},
etc...
]

200 OK

Userods POST (create)

Version Added: 22.1

UserName: Required. Must be unique.
UserGroupNum: Required. Obtain this separately with a query. In the response, only the UserGroupNum used in the POST is returned even though users can belong to multiple user groups.
Password: Required. Strong password is required, so it must be at least 8 characters and have at least one number, one uppercase letter, and one lowercase letter. If the office preference is turned on for requiring special characters, it must also contain a symbol such as $, #, >.

Example Request:
POST /userods

{
"UserName": "Sally",
"UserGroupNum": 2,
"Password": "My1password"
}

Example Response:
{
"UserNum": 7,
"UserName": "Sally",
"EmployeeNum": 0,
"employeeName": "",
"ProviderNum": 0,
"providerName": "",
"ClinicNum": 0,
"emailAddress": "",
"IsHidden": "false",
"UserGroupNum": 2,
"Password": "My1password"
}

201 Created
400 Bad Request (with explanation)
404 Not Found (with explanation)