Petition Details
- Base URL: {host}/ASMSAPI/
- Uri: /api/v9/user
- 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/user
Parameters
Name | Data type | Obligatory | Description |
---|---|---|---|
Active | Number | Yes | Indicates whether the user is active or not |
Name | Text | Yes | User’s full name |
userName | Text | Yes | |
password | Text | Yes | Password |
projectId | Number | Yes | Project ID |
stateId | Number | Yes | State ID |
listAdditionalField | List | Yes | List of additional fields |
consoleType | Enumerator | Yes | Console Type Identifier - Specialist = 1, - Client = 2, - Administrator - 3 |
registerType | Enumerator | Yes | Record Type Identifier - Client = 37, - Specialist = 53, |
address1 | Text | No | Address 1 |
address2 | Text | No | Address 2 |
address3 | Text | No | Address 3 |
birthDate | Number (UNIX time in milliseconds) | No | Date of birth |
buildingId | Number | No | Building Identifier |
cityId | Number | No | City Identifier |
companyId | Number | No | Branch ID |
countryId | Number | No | Country identifier |
departmentCode | Number | No | Department Identifier |
departmentNumber | Number | No | Department Number Identifier |
documentNumber | Number | No | Document Number |
documentTypeId | Number | No | Document type identifier |
Text | No | ||
Ext | Text | No | Extension Number |
fax | Text | No | Fax Number |
floorId | Number | No | Floor Identifier |
guidLDAP | Text | No | |
jobId | Number | No | Job Identifier |
Mobil | Text | No | Cell Phone Number |
phone1 | Text | No | Phone Number 1 |
phone2 | Text | No | Phone Number 2 |
phone3 | Text | No | Phone Number 3 |
SiteId | Number | No | Headquarters Identifier |
chiefId | Number | No | Immediate Boss Identifier |
Body of the petition
{
"active": 1,
"birthDate": 315122400000,
"name": "nombre prueba once",
"userName": "pruebamabc111",
"consoleType": "Administrator",
"registerType": "specialist",
"projectId": 19,
"stateId": 1,
"email": "pruebamabc11@gmail.com", "password": "Aranda123",
"listAdditionalField": []
}
Answer
{
"id": 4848,
"result": true
}
Response parameters
Name | Data type | Description |
---|---|---|
Id | Number | User ID |
result | Boolean | Result of the operation |
Error messages
Code | HTTP status | Error Message |
---|---|---|
500 | InternalServerError | FailureAddUser |
400 | BadRequest | InvalidConsole |
400 | BadRequest | InvalidRegisterType |
400 | BadRequest | InvalidStateId |
400 | BadRequest | InvalidProjectId |
400 | BadRequest | InvalidAdditionalFieldValue |
400 | BadRequest | AdditionalFieldIsRequired |