Create
POST
/:tenantId/usersBody
json
{
"id": 485,
"email": "usertemp@medibulut.com",
"first_name": "Adı",
"last_name": "Soyadı",
"name": null,
"identity_number": null,
"mobile": "+905555555554",
"phone": "",
"role_id": "admin",
"status": 1,
"color": "#c00",
"bonus_rate": "15.00",
"photo": null,
"authorized_users": [
11
],
"permissions": [
"appointments.manage",
"patients.manage",
"patient-groups.manage",
"services.manage",
"users.manage",
"reports.view",
"finance.manage",
"settings.manage",
"working-hours.manage"
],
"service_ids": []
}| Field | Type | Required | Description |
|---|---|---|---|
| first_name | string | Yes | The first name of the user. |
| last_name | string | Yes | The last name of the user. |
| mobile | string | No | The mobile phone number of the user, including country code. |
| phone | string | No | An alternate phone number for the user, including country code. |
| string | Yes | The email address of the user, used for login and notifications. | |
| password | string | Yes | The user's password, must meet the required security criteria. |
| password_confirmation | string | Yes | A repeat of the password field to ensure accuracy during input. |
| status | integer | Yes | The current status of the user 0: Inactive (default) 1: Active. |
| photo | string | No | A URL pointing to the user's profile photo.(base64-encoded) |
| identity_number | string | No | The user's government-issued identity number (if applicable). |
| bonus_rate | float | No | The percentage of bonuses applicable to the user (e.g., 15 for 15%). |
| color | string | No | A hexadecimal code representing the user's assigned color for identification or UI purposes. (Hex Code) |
| role_id | string | Yes | The identifier for the user's role within the system 2: Admin 3: Specialist 4: Personnel |
| permissions | array of strings | No | A list of permissions granted to the user ("appointments.manage", "patients.manage", etc.). |
| authorized_users | array of integers | No | An array of user IDs that this user is authorized to manage or interact with. |
| service_ids | array of integers | No | A list of service IDs associated with the user, representing their responsibilities or offerings. |
Response
HTTP 201 Created
json
{
"data": {
"id": 485,
"email": "usertemp@medibulut.com",
"first_name": "Adı",
"last_name": "Soyadı",
"name": null,
"identity_number": null,
"mobile": "+905555555554",
"phone": "",
"role_id": "admin",
"status": 1,
"color": "#c00",
"bonus_rate": "15.00",
"photo": null,
"authorized_users": [
11
],
"permissions": [
"appointments.manage",
"patients.manage",
"patient-groups.manage",
"services.manage",
"users.manage",
"reports.view",
"finance.manage",
"settings.manage",
"working-hours.manage"
],
"service_ids": []
}
}422 Unprocessable Entity
json
{
"message": "The first name field is required. (and 5 more errors)",
"errors": {
"first_name": [
"The first name field is required."
],
"last_name": [
"The last name field is required."
],
"email": [
"The email field is required."
],
"password": [
"The password field is required."
],
"role_id": [
"The role id field is required."
],
"status": [
"The status field is required."
]
}
}