Link user to an employee

This endpoint allows linking an existing user to an employee within the same business.

PUT /api/v2/businesses/{businessId}/employees/{employeeId}/user

In addition to the external business identifier (businessId), the URL must specify the external identifier of the employee to whom the user will be linked: employeeId. In the request body, only the username of the user already registered in the system is included:

Request body

JSON Analysis
{
  "username": "string"
}
Details
  • username*: username. Must be unique and already registered in the system. Typically, an email address is used.

Request example

Below is an example of the request:

PUT /api/v2/businesses/BUSINESSID/employees/1006350/user
{
    "username": "test.user@orquest.com"
}

If the request is successful (200 OK), the response will contain the user’s linked information: username, mail, nodes, and roles.

Considerations

If the employee identifier provided as a parameter in the URL does not match any employee in the business, the request will return a 404 Not Found error, with the message Employee not found.

If the user specified in the request body does not match any user in the business, the request will return a 404 Not Found error, with the message User not found.

If the user was previously linked to another employee, the information is updated, and the user is linked to the employee specified in the URL.

What is a user?

What is an employee?