Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: api/v9/company/{company_id}/associateusers
- Type: POST
-
Required headings:
- content-type: application/json
- X-Authorization: Bearer {token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- ASMSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/ASMSAPI/api/v9/company/{company_id}/associateusers
Parameters
Name | Data type | Obligatory | Description |
---|---|---|---|
company_id | Number | Yes | Unique identifier of the company. |
usersId | Array[int] | Yes | List of IDs of the users who will be associated with the company (maximum 100 users). If more than 100 users are submitted, only the first 100 IDs in the array will be considered. |
Body of the petition
{
"usersId": [
1,
3,
4,
5
]
}
**Respuesta**
200 OK
Error messages
Code | HTTP status | Error Message |
---|---|---|
409 | Conflict | It occurs when any of the submitted IDs do not exist in the database. However, users who do exist will be properly associated. |
404 | Not Found | “message”: “CompanyIdNotExist” (the company ID does not exist). |
400 | BadRequest | “exceptionMessage”: “NoUsersProvided”. |