Отримання токену доступу 

Інструкція з отримання токену - https://medakadem.freshdesk.com/uk/support/solutions/articles/77000530947-отримання-token 

Використання токену - https://medakadem.freshdesk.com/uk/support/solutions/articles/77000530917-token


Для використання API потрібні скоупи: "gambit:erp:users".
Якщо немає потрібних scope, то повертатиметься помилка Code 403 Forbidden


За допомогою даного методу, можна створити нового користувача: 


HTTP methods: POST

/api/erp/v1/users 


Request body:


Example Value:

{
  "ExternalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "ClinicId": 0,
  "PrerecordIndex": 0,
  "DefaultInterval": 0,
  "OrderIndex": 0,
  "DefaultPageId": 0,
  "AllowRemoteLogin": true,
  "PhoneNumberConfirmed": true,
  "AllowLogin": true,
  "Born": "2025-03-10T09:00:48.647Z",
  "Experience": "2025-03-10T09:00:48.647Z",
  "MinimumCost": 0,
  "Email": "string",
  "FirstTelephone": "string",
  "SecondTelephone": "string",
  "Note": "string",
  "UserName": "string",
  "Last": "string",
  "First": "string",
  "Middle": "string",
  "Passport": "string",
  "IdentificationCode": "string",
  "AdditionalInformation": "string",
  "Education": "string",
  "ScientificDegree": "string",
  "QualificationCategory": "string",
  "UserPositionId": 0,
  "Photo": "string",
  "ExecutorId": 0,
  "IsOnline": true,
  "Acls": [
    0
  ],
  "UserStorages": [
    0
  ],
  "UserEmailSettings": [
    1
  ],
  "SubordinatedUsers": [
    0
  ],
  "Specializations": [
    0
  ],
  "AllowedClinics": [
    0
  ]
}
ПараметрТипОпис
ExternalIdstring($uuid)
nullable: true
унікальний ідентифікатор користувача в зовнішній системі
ClinicIdinteger($int32)ідентифікатор філіалу
PrerecordIndexinteger($int32)сортування в попередньому записі
DefaultIntervalinteger($int32) час прийому
OrderIndexinteger($int32)сортування в онлайні
DefaultPageIdinteger($int32)стартова сторінка
AllowRemoteLoginbooleanдозвіл для віддаленого входу
PhoneNumberConfirmedboolean
nullable: true
підтверджений номер телефону
AllowLoginbooleanдозвіл для входу
Bornstring($date-time)
nullable: true
дата народження
Experiencestring($date-time)
nullable: true
стаж
MinimumCostinteger($int32)
nullable: true
мінімальна вартість прийому
Emailstring
nullable: true
електронна адреса
FirstTelephonestring
nullable: true
номер телефону
SecondTelephonestring
nullable: true
номер телефону
Notestring
nullable: true
замітка
UserNamestring
nullable: true
логін для входу в систему
Laststring
nullable: true
прізвище 
Firststring
nullable: true
ім'я 
Middlestring
nullable: true
по батькові
Passportstring
nullable: true
паспортні дані
IdentificationCodestring
nullable: true
РНОКПП
AdditionalInformationstring
nullable: true
додаткова інформація
Educationstring
nullable: true
освіта
ScientificDegreestring
nullable: true
науковий ступінь
QualificationCategorystring
nullable: true
кваліфікація
UserPositionIdinteger($int32)
nullable: true
посада
Photostring
nullable: true
посилання на фото
ExecutorIdinteger($int32)
nullable: true
---
IsOnlinebooleanдозвіл на онлайн
Aclsinteger($int32)
nullable: true
---
UserStoragesinteger($int32)
nullable: true
---
UserEmailSettingsinteger($int32)
nullable: true

1: SendSchedulerOnEmailAnHourBefore

2: SendSchedulerOnEmailAnDayBefore

3: SendFinanceReport

4: NotifyOnPrerecordToTelegram

SubordinatedUsersinteger($int32)
nullable: true
---
Specializationsinteger($int32)
nullable: true
---
AllowedClinicsinteger($int32)
nullable: true
---


Responses:

При успішному виконані запиту повернеться - Code 200 Success


Example Value:

{
  0
}
0ідентифікатор створеного користувача


Якщо якісь вхідні дані будуть не вірного формату, то повернеться Code 400 Bad Request

Якщо повертається Code 402 Payment Required, це означає вихід за межі тарифного плану. Дані обмеження повʼязані з вашим тарифним планом, за детальної інформацією зверніться до менеджера.