Users

Returns all users in a company with paging

For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-token

Securitybearer
Request
query Parameters
page
integer <int32>
Default: 0
pageSize
integer <int32>
Default: 50
businessUnitId
string <uuid>
Responses
200

Success

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

get/api/v1/Users
Request samples
Response samples
No sample

Creates a new user

  • Email is required when ContactMethod is 'Email'
  • PhoneNumber is required when ContactMethod is 'PhoneNumber'
  • BusinessUnitAccess.Values should be a list of Business Unit Ids when BusinessUnitAccess.Type is 'SelectedBusinessUnits'
  • BusinessUnitAccess.Values should be null when BusinessUnitAccess.Type is 'AllBusinessUnits'
  • JobAccess.Values should be null when JobAccess.Type is 'AllJobs'
If creating a duplicate user with the Parent-Child feature, the following fields will all be synced from any existing duplicates:
  • First Name
  • Last Name
  • Phone Number
  • Email
  • Contact Method
  • Allow Phone Number Login
  • Exclude From External Authentication
For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-tokens
Securitybearer
Request
Request Body schema:
userName
required
string

The unique username of the User, used to login to HCSS Apps.

firstName
required
string

The first name of the User.

lastName
required
string

The last name of the User.

phoneNumber
string or null

The phone number of the User.

email
string or null

The email address of the User.

contactMethod
required
string (ContactMethod)

Contact method for notifying the user

Enum: "Email" "PhoneNumber"
userRole
required
string <uuid>

Assigns a Role to the User.

subscriptionGroup
string or null <uuid>

Assigns a Subscription Group to the User.

note
string or null

Used to add optional notes for the User.

homeBusinessUnit
required
string <uuid>

The default Business Unit that the User belongs to.

employeeCode
string or null

Assigns an Employee to the User.

allowPhoneNumberLogin
boolean or null

Enables the User to login to HCSS Apps using their phone number.

excludeFromExternalAuthentication
boolean or null

Excludes the User from signing in with external authentication and will require the User to use their HCSS Apps login.

object (PublicBusinessUnitAccessDto)

A model describing Business Unit Access. Combines the Type of access and list of Business Unit Guids.

object (PublicJobAccessDto)

A model describing Job Access. Combines the Type of access and list of Job Guids. "SelectedJobTags" is not currently supported.

Responses
201

User was successfully created.

400

Bad Request. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-bad-request

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

post/api/v1/Users
Request samples
{
  • "userName": "John.Doe@company.com",
  • "firstName": "John",
  • "lastName": "Doe",
  • "phoneNumber": "555-555-1234",
  • "email": "John.Doe@company.com",
  • "contactMethod": "Email",
  • "userRole": "1531C1FC-3B2B-453A-BB88-595AF8B2ECDB",
  • "subscriptionGroup": "0C6116F2-D77A-4B86-9389-379079CDEDFE",
  • "note": "This is an example note.",
  • "homeBusinessUnit": "B86659FA-D8F1-4909-80B7-59950D3FDD46",
  • "employeeCode": "example-employee-code-01",
  • "allowPhoneNumberLogin": false,
  • "excludeFromExternalAuthentication": true,
  • "businessUnitAccess": {
    },
  • "jobAccess": {
    }
}

Returns user by id

For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-token

Securitybearer
Request
path Parameters
id
required
string <uuid>
Responses
200

Success

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

get/api/v1/Users/{id}
Request samples
Response samples
No sample

Updates a user

Only properties that are not null will be updated

  • Email is required when ContactMethod is 'Email'
  • PhoneNumber is required when ContactMethod is 'PhoneNumber'
  • BusinessUnitAccess.Values should be a list of Business Unit Ids when BusinessUnitAccess.Type is 'SelectedBusinessUnits'
  • BusinessUnitAccess.Values should be null when BusinessUnitAccess.Type is 'AllBusinessUnits'
  • JobAccess.Values should be null when JobAccess.Type is 'AllJobs'
If updating a duplicate user with the Parent-Child feature, the following fields will also be updated in all duplicates:
  • Username
  • First Name
  • Last Name
  • Phone Number
  • Email
  • Contact Method
  • Allow Phone Number Login
  • Exclude From External Authentication
For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-tokens
Securitybearer
Request
path Parameters
id
required
string <uuid>
Request Body schema:
userName
string or null

The unique username of the User, used to login to HCSS Apps.

firstName
string or null

The first name of the User.

lastName
string or null

The last name of the User.

phoneNumber
string or null

The phone number of the User.

email
string or null

The email address of the User.

contactMethod
string (ContactMethod)

Contact method for notifying the user

Enum: "Email" "PhoneNumber"
userRole
string or null <uuid>

Assigns a Role to the User.

subscriptionGroup
string or null <uuid>

Assigns a Subscription Group to the User.

note
string or null

Used to add optional notes for the User.

homeBusinessUnit
string or null <uuid>

The default Business Unit that the User belongs to.

employeeCode
string or null

Assigns an Employee to the User.

allowPhoneNumberLogin
boolean or null

Enables the User to login to HCSS Apps using their phone number.

excludeFromExternalAuthentication
boolean or null

Excludes the User from signing in with external authentication and will require the User to use their HCSS Apps login.

object (PublicBusinessUnitAccessDto)

A model describing Business Unit Access. Combines the Type of access and list of Business Unit Guids.

object (PublicJobAccessDto)

A model describing Job Access. Combines the Type of access and list of Job Guids. "SelectedJobTags" is not currently supported.

Responses
204

User was successfully updated.

400

Bad Request. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-bad-request

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

404

Existing user with id was not found. Verify that the id provided is correct.

patch/api/v1/Users/{id}
Request samples
{
  • "userName": "John.Doe@company.com",
  • "firstName": "John",
  • "lastName": "Doe",
  • "phoneNumber": "555-555-1234",
  • "email": "John.Doe@company.com",
  • "contactMethod": "Email",
  • "userRole": "1531C1FC-3B2B-453A-BB88-595AF8B2ECDB",
  • "subscriptionGroup": "0C6116F2-D77A-4B86-9389-379079CDEDFE",
  • "note": "This is an example note.",
  • "homeBusinessUnit": "B86659FA-D8F1-4909-80B7-59950D3FDD46",
  • "employeeCode": "example-employee-code-01",
  • "allowPhoneNumberLogin": false,
  • "excludeFromExternalAuthentication": true,
  • "businessUnitAccess": {
    },
  • "jobAccess": {
    }
}

Deletes a user with the given id

For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-token

Securitybearer
Request
path Parameters
id
required
string <uuid>
Responses
204

User was successfully deleted.

400

Bad Request. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-bad-request

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

404

User with id was not found. Verify that the id provided is correct.

delete/api/v1/Users/{id}
Request samples

Returns user by username

For help with authorization, please visit https://developer.hcssapps.com/getting-started/request-token

Securitybearer
Request
path Parameters
userName
required
string

The unique username of the user to fetch

Responses
200

Success

403

Forbidden. For help troubleshooting this error, visit https://developer.hcssapps.com/getting-started/troubleshoot-forbidden

404

Could not find a user with matching username. Verify that the provided username is correct.

get/api/v1/Users/userName/{userName}
Request samples
Response samples
No sample