Creating a Client Portal User
[POST] /client-users
{
"client": 687,
"customId": "C123-A",
"firstName": "John",
"lastName": "Smith",
"primaryPhone": "555-555-1234",
"secondaryPhone": "555-555-4321",
"username": "string",
"email": "john.smith@myemail.com"
}Result:
{
"client": 687,
"id": 1486,
"customId": "C123-A",
"firstName": "John",
"lastName": "Smith",
"name": "John Smith",
"primaryPhone": "555-555-1234",
"secondaryPhone": "555-555-4321",
"email": "john.smith@myemail.com",
"status": "ACTIVE",
"avatar": "https://innovation.staffr.net/rest/v1/avatar/client-users/1486/50a5ffff3912dafc32f7ede1844fd7e3"
}
Take notice of the status “ACTIVE.” This means they have also been granted access as an automatic second step after creating the user.
Changing the Identification Details of a Client Portal Users
[PATCH] /client-users/1486
{
"customId": "C123-A",
"firstName": "John",
"lastName": "Smithness",
"name": "John Smith",
"primaryPhone": "555-555-1234",
"secondaryPhone": "555-555-4321",
"email": "john.smith@myemail.com"
}You can’t use the PATCH method to set the status as ACTIVE or TERMINATED. If you provide them, they will be ignored. Actions exist for managing these statuses.
Granting Access to an existing Client Portal User
A new Client Portal Access user will be “Granted” access automatically. If, for some reason, after a revocation, you need to re-establish access, it’s:
[POST] /client-users/1486/actions/grant-access
But if they already have access, this will produce the error:
{
"message": "Unable to grant access to a client user, please make sure the client user is inactive."
}Otherwise, a response will be returned with the status “ACTIVE”:
{
"client": 687,
"id": 1486,
"customId": "C123-A",
"firstName": "John",
"lastName": "Smith",
"name": "John Smith",
"primaryPhone": "555-555-1234",
"secondaryPhone": "555-555-4321",
"email": "john.smith@myemail.com",
"status": "ACTIVE",
"avatar": "https://innovation.staffr.net/rest/v1/avatar/client-users/1486/50a5ffff3912dafc32f7ede1844fd7e3"
}Revoking Access from an Existing Client Portal User
[POST] /client-users/1486/actions/revoke-access
Result:
{
"client": 687,
"id": 1486,
"customId": "C123-A",
"firstName": "John",
"lastName": "Smith",
"name": "John Smith",
"primaryPhone": "555-555-1234",
"secondaryPhone": "555-555-4321",
"email": "john.smith@myemail.com",
==> "status": "TERMINATED",
"avatar": "https://innovation.staffr.net/rest/v1/avatar/client-users/1486/50a5ffff3912dafc32f7ede1844fd7e3"
}Take notice of the status “TERMINATED.”
The web application will only display ACTIVE/Granted access Client Portal Users by default. You need to set the filter to “All” to see added but Revoked/status TERMINATED users.