Отримання токену доступу
Інструкція з отримання токену - https://medakadem.freshdesk.com/uk/support/solutions/articles/77000530947-отримання-token
Використання токену - https://medakadem.freshdesk.com/uk/support/solutions/articles/77000530917-token
Для використання API потрібні скоупи: "gambit:erp:salepack".
Якщо немає потрібних scope, то повертатиметься помилка - Code 403 Forbidden
Потрібно встановити пареметри по даті початку та кінця (діапазон дати початку та кінця не повинен перевищувати 365 днів dateEnd - DateStart <= 365).
Також потрібно вказати ідентифікатор філіалу для пошуку (встановлення ідентифікатора філіалу не є обв'язковим), наприклад:
HTTP methods: GET
/api/erp/v1/reports/consolidated?dateStart=2024-06-23&dateEnd=2024-06-24&clinicId={clinicId}
Responses:
При успішному виконані запиту повернеться - Code 200 Success
Example Value:
[
{
"PackType": 0,
"ID": 0,
"PatientId": 0,
"PatientLFM": "string",
"PatientTelMob1": "string",
"Born": "2025-05-22T12:31:36.301Z",
"LaboratoryId": 0,
"DiscoveryId": 0,
"DoctorsLFM": "string",
"PackName": "string",
"PackageId": 0,
"ParentPackageId": 0,
"BookingId": 0,
"PriceDiscountCash": 0,
"PriceUndiscountCash": 0,
"PriceDiscountWithoutCash": 0,
"PriceUndiscountWithoutCash": 0,
"PaymentTypeId": 1,
"SalepackId": 0,
"Debt": 0,
"Count": 0,
"ActualTimeToReady": 0,
"AbsoluteTimeToReady": 0,
"Diagnosis": "string",
"ICD10": "string",
"DateCr": "2025-05-22T12:31:36.301Z",
"ClinicId": 0,
"CreatedById": 0,
"Number": "string",
"ContractorId": 0,
"ExecutorId": 0,
"TypeRef": 0,
"GroupName": "string",
"CashDesk": 0,
"BookingMarketingTypeId": 0,
"PatientMarketingTypeId": 0,
"PrerecordMarketingTypeId": 0,
"ContractorCoordinatorId": 0,
"RoomId": 0,
"DiscountTemplateId": 0,
"PromotionId": 0,
"Note": "string",
"PromotionNote": "string",
"DiscountNumber": "string",
"LaboratoryPrice": 0,
"FiscalStatus": 0,
"ContractNumber": "string",
"PriceDiscount": 0,
"PriceUndiscount": 0,
"Cash": 0,
"Terminal": 0,
"Online": 0,
"Account": 0,
"Cashless": 0,
"WithoutCash": 0,
"Discount": 0
}
]| Параметр | Тип | Опис |
| PackType | integer($int32) nullable: true | тип послуги (1 - обстеження, 2 - аналіз) |
| ID | integer($int32) | ідентифікатор запису |
| PatientId | integer($int32) | ідентифікатор пацієнта |
| PatientLFM | string nullable: true | ПІБ пацієнта |
| PatientTelMob1 | string nullable: true | номер телефону |
| Born | string($date-time) nullable: true | дата народження |
| LaboratoryId | integer($int32) nullable: true | ідентифікатор лабораторії |
| DiscoveryId | integer($int32) nullable: true | ідентифікатор обстежуючого лікаря |
| DoctorsLFM | string nullable: true | ПІБ направляючого лікаря лікаря |
| PackName | string nullable: true | назва послуги |
| PackageId | integer($int32) nullable: true | ідентифікатор послуги |
| ParentPackageId | integer($int32) nullable: true | ідентифікатор пакету (якщо надана послуга не є частиною пакета ParentPackageId = PackageId) |
| BookingId | integer($int32) | ідентифікатор чеку |
| PriceDiscountCash | number($double) | зі знижкою готівка |
| PriceUndiscountCash | number($double) | без знижки готівка |
| PriceDiscountWithoutCash | number($double) | без знижки безготівка |
| PriceUndiscountWithoutCash | number($double) | зі знижкожкою безготівка |
| PaymentTypeId | integer($int32) | тип оплати (може бути готівка - 2 і безготівка - 1) |
| SalepackId | integer($int32) | ідентифікатор наданої послуги (ідентифікатор сутності, яка описує оформлену послугу пацієнта, позиції в чеку) |
| Debt | number($double) | борг |
| Count | integer($int32) | кількість |
| ActualTimeToReady | integer($int64) nullable: true | фактичний час виконання (в хв) |
| AbsoluteTimeToReady | integer($int64) nullable: true | час виконання (в хв) |
| Diagnosis | string nullable: true | діагноз |
| ICD10 | string nullable: true | МКХ-10 |
| DateCr | string($date-time) | дата створення |
| ClinicId | integer($int32) | ідентифікатор філіалу |
| CreatedById | integer($int32) nullable: true | ідентифікатор того, хто створив |
| Number | string nullable: true | номер страхового полісу (якщо є) |
| ContractorId | integer($int32) nullable: true | ідентифікатор страхової компанії або організації |
| ExecutorId | integer($int32) nullable: true | ідентифікатор виконавця |
| TypeRef | integer($int32) | тип звернення (1 - самозвернення, 2 - направляючий лікар, 3 - страхова, 4 - оранізація, 5 - замовлення) |
| GroupName | string nullable: true | назва групи |
| CashDesk | integer($int32) | каса |
| BookingMarketingTypeId | integer($int32) nullable: true | джерело звернення замовлення |
| PatientMarketingTypeId | integer($int32) nullable: true | джерело звернення пацієнта |
| PrerecordMarketingTypeId | integer($int32) nullable: true | джерело звернення попереднього запису |
| ContractorCoordinatorId | integer($int32) nullable: true | ідентифікатор координатора страхової компанії |
| RoomId | integer($int32) nullable: true | ідентифікатор кабінету |
| DiscountTemplateId | integer($int32) nullable: true | ідентифікатор шаблону знижки |
| PromotionId | integer($int32) nullable: true | ідентифікатор акції |
| Note | string nullable: true | коментар |
| PromotionNote | string nullable: true | коментар до акції |
| DiscountNumber | string nullable: true | номер дисконтної картки |
| LaboratoryPrice | number($double) nullable: true | ціна виконання в лабораторії |
| FiscalStatus | integer($int32) | статус фіскалізації (1 - продаж, 2 - проведення, 0 - не був проданий) |
| ContractNumber | string nullable: true | номер договору |
| PriceDiscount | number($double) readOnly: true | зі знижка |
| PriceUndiscount | number($double) readOnly: true | без знижки |
| Cash | number($double) readOnly: true | сума до сплати за типом оплати готівка |
| Terminal | number($double) readOnly: true | сума до сплати за типом оплати карта |
| Online | number($double) readOnly: true | сума до сплати за типом оплати онлайн |
| Account | number($double) readOnly: true | сума до сплати за типом оплати рахунок |
| Cashless | number($double) readOnly: true | сума до сплати за типом оплати безготівка |
| WithoutCash | number($double) readOnly: true | уся не готівкова частина |
| Discount | number($double) readOnly: true | знижка |