Skip to content

Commit

Permalink
Document set user state directly endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Maurer committed Dec 5, 2024
1 parent c1e3394 commit e62e9a8
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions source/includes/_userprovisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Please note that the base URL for user provisioning is

> One caveat is that User-Pre-Provisioning just provides basic user profile information that is
> linked when a user registers, which means that the pre-provisioned profiles are only listed in
> the user list once they have registered themselves in the Employee Referrals application.
> the user list once they have registered themselves in the Employee Referrals application.
## Ingest User Profiles

> This is an example request body
```json
{
"users": [
"users": [
{
"first_name":"Test",
"last_name":"User",
Expand Down Expand Up @@ -114,6 +114,7 @@ To update a user profile, use the following request:
## Deactivate a User Profile

For deactivating a user profile, set the `active` field to false in the body and call the endpoint for updating a profile as follows.
Note: this only works for pre-provisioned users.

> This is an example request body
Expand All @@ -138,6 +139,35 @@ For deactivating a user profile, set the `active` field to false in the body and
| :-------------- | :------- | :----------------------------------------------------------------------------- |
| identifier | Yes | You may use either of the `personnel_number` or the email address of the user. |

## Change User Profile Status

Directly change a user profile's enabled state.
This works with any type of user provisioning.

> This is an example request body
```json
{
"employeeId":"123",
"active":false
}
```

### HTTP Request

`PUT /v1/companies/{companyId}/users/profile/status`

### UserStatusChange Request Body

Provide either `email` or `employeeId` (`personnel_number`) as `string` to identify the user.
Set `active` to `true` to activate the user, `false` to disable the user.

| Field name | Required | Description |
| :--------------- | :------- | :------------------------------------ |
| email | No | Email address |
| employeeId | No | The id of the employee in your system |
| active | Yes | Set user to active or not |

## Delete a User Profile

To delete a user profile, use the following request:
Expand Down Expand Up @@ -185,4 +215,4 @@ Delete a user profile without pre-provisioning
`DELETE /v1/companies/{companyId}/users/{email}`

**Note for Deleting user without pre-provisioning:**
* This will delete the user in the Employee Referrals systems irreversibly
* This will delete the user in the Employee Referrals systems irreversibly

0 comments on commit e62e9a8

Please sign in to comment.