Створення замовлення за ehealth рецептом
URI: /api/v2/insurance/order/store-e-health-recipe-pick-up-order
Метод використовується для ство рення замовлення за eHealth рецептом.
Запит виконується методом POST з тілом запиту у json форматі.
⚠️ Запит повинен містити заголовок Accept: application/json
Параметри запиту
| Ім'я | Тип | Обов'язковий | Опис |
|---|---|---|---|
| recipe_number | string | Так | Номер eHealth-рецепта |
| repayment_code | string | Так | Код погашення рецепта |
| drugstore_id | numeric | Так | Ідентифікатор аптеки |
| goods_id | integer | Так | Ідентифікатор товару |
| nds | integer | Так | Ставка ПДВ товару |
| total | numeric | Так | Загальна сума замовлення |
| customer_first_name | string | Так | Ім’я покупця, до 100 символів |
| customer_last_name | string | Так | Прізвище покупця, до 100 символів |
| customer_middle_name | string | Ні | По батькові покупця, до 100 символів |
| customer_phone_number | string | Так | Телефон у форматі 380XXXXXXXXX |
| customer_email | string | Ні | Email покупця |
| customer_insurance_card_number | string | Так | Номер страхової картки, до 100 символів |
| customer_franchising_percentage | numeric | Так | Відсоток франшизи, від 0 до 100 |
| insurance_doctor_name | string | null | Ні | ПІБ лікаря, до 255 символів |
| external_id | string | Ні | Зовнішній номер страхового замовлення, до 255 символів |
| comment | string | Ні | Коментар до замовлення, до 255 символів |
| delivery | object | null | Ні | Дані достав ки |
| delivery.delivery_type_code | string | null | Ні | Код типу доставки |
| delivery.ettn | string | null | Ні | Номер ТТН |
| delivery.postcode | string | null | Ні | Поштовий індекс отримувача |
| delivery.city | string | null | Ні | Місто отримувача |
| delivery.region | string | null | Ні | Область отримувача |
| delivery.district | string | null | Ні | Район отримувача |
| delivery.street | string | null | Ні | Вулиця отримувача |
| delivery.house_number | string | null | Ні | Номер будинку |
| delivery.apartment_number | string | null | Ні | Номер квартири |
| delivery.post_office_box | string | null | Ні | Номер поштової скриньки |
| payment | object | null | Ні | Дані про оплату |
| payment.payment_method_code | string | null | Ні | Код способу оплати |
| payment.total_paid | numeric | null | Ні | Загальна сплачена сума |
Приклади запиту
Запит: /api/v2/insurance/order/store-e-health-recipe-pick-up-order
{
"recipe_number": "0000-0000-0000-0000",
"repayment_code": "1234",
"drugstore_id": 39874,
"goods_id": "1558580",
"customer_first_name": "Тест",
"customer_last_name": "Тест",
"customer_middle_name": "Тест",
"customer_phone_number": "380999808000",
"customer_insurance_card_number": "66675859595",
"customer_franchising_percentage": 0,
"nds": 7,
"total": 0,
"external_id": "7748494940"
}
Параметри відповіді
| Ім'я | Тип | Опис |
|---|---|---|
| data | object | Дані створеного замовлення |
| data.order_number | string | Номер замовлення |
| data.drugstore_order_id | string | null | Ідентифікатор замовлення в аптеці |
| data.drugstore_id | numeric | Ідентифікатор аптеки |
| data.legal_entity_name | string | Назва юридичної особи аптеки |
| data.legal_entity_code | string | Код юридичної особи аптеки |
| data.created_at | string | Дата й час створення, формат Y-m-d H:i:s |
| data.updated_at | string | Дата й час останнього оновлення, формат Y-m-d H:i:s |
| data.order_delivery | object | Дані доставки |
| data.order_delivery.delivery_type_code | string | null | Код типу доставки |
| data.order_delivery.ettn | string | null | Номер ТТН |
| data.order_delivery.postcode | string | null | Поштовий індекс отримувача |
| data.order_delivery.region | string | null | Область отримувача |
| data.order_delivery.city | string | null | Місто отримувача |
| data.order_delivery.district | string | null | Район отримувача |
| data.order_delivery.street | string | null | Вулиця отримувача |
| data.order_delivery.house_number | string | null | Номер будинку |
| data.order_delivery.apartment_number | string | null | Номер квартири |
| data.order_delivery.post_office_box | string | null | Номер поштової скриньки |
| data.order_payment | object | Дані про оплату |
| data.order_payment.payment_method_code | string | null | Код способу оплати |
| data.order_payment.total_paid | numeric | null | Загальна сплачена сума |
| data.order_payment.terminal_id | string | null | Ідентифікатор термінала |
| data.order_payment.epz | string | null | Електронний платіжний засіб |
| data.order_payment.mid | string | null | Merchant ID |
| data.order_payment.card_type | string | null | Тип картки |
| data.order_payment.auth_code | string | null | Код авторизації |
| data.order_payment.rrn | string | null | Ідентифікатор банківської транзакції |
| data.order_payment.datetime | string | null | Дата й час операції |
| data.order_payment.name | string | null | Тип оплати |
| data.order_payment.payment_system | string | null | Платіжна система |
| data.order_payment.cash_register_number | string | numeric | null | Номер касового апарата |
| data.customer | object | Дані покупця |
| data.customer.phone_number | string | Телефон покупця |
| data.customer.last_name | string | null | Прізвище покупця |
| data.customer.first_name | string | null | Ім’я покупця |
| data.customer.middle_name | string | null | По батькові покупця |
| data.customer.email | string | null | Email покупця |
| data.customer.insurance_card_number | string | null | Номер страхової картки |
| data.customer.franchising_percentage | numeric | null | Відсоток франшизи |
| data.insurance | object | Дані страхової компанії |
| data.insurance.name | string | Назва страхової компанії |
| data.insurance.code | string | Код страхової компанії |
| data.insurance.order_number | string | null | Номер замовлення у страховій компанії |
| data.insurance_doctor_name | string | null | ПІБ лікаря |
| data.recipe | object | Дані eHealth-рецепта |
| data.recipe.number | string | Номер рецепта |
| data.recipe.total_include_reimbursement | numeric | Сума з урахуванням реімбурсації (доплата СК + ЗО за наявності франшизи) |
| data.recipe.reimbursement_total | numeric | Загальна сума реімбурсації |
| data.status | object | Статус замовлення |
| data.status.comment | string | null | Опис статусу |
| data.status.name | string | Код статусу |
| data.status.cancel_reason | string | null | Причина скасування; повертається, якщо задана |
| data.comment | string | null | Коментар до замовлення |
| data.goods | list[object] | Перелік товарів у замовленні |
| data.goods.id | numeric | Ідентифікатор товару |
| data.goods.name | string | null | Назва товару |
| data.goods.quantity | numeric | Кількість товару |
| data.goods.nds | numeric | null | Ставка ПДВ товару |
| data.goods.price | numeric | Ціна одиниці товару |
| data.goods.total | numeric | Загальна сума за товар |
| data.goods.surcharge | numeric | Сума доплати за товар |
| data.goods.reimbursement | numeric | Сума компенсації за товар |
| data.total | numeric | Загальна сума замовлення |
| data.total_include_franchising_percentage | numeric | null | Сума до сплати з урахуванням франшизи (доплата ЗО) |
примітка
Сума до сплати СК — різниця чисел (data.recipe.total_include_reimbursement − data.total_include_franchising_percentage).
Приклад успішної відповіді
200 OK
Відповідь: /api/v2/insurance/order/store-e-health-recipe-pick-up-order
{
"data": {
"order_number": "PA-24-AE-T2",
"drugstore_order_id": null,
"drugstore_id": 39874,
"legal_entity_name": "Товариство з обмеженою відповідальністю «АПТЕКА НИЗЬКИХ ЦІН ПЛЮС»",
"legal_entity_code": "37226619",
"created_at": "2026-09-16 10:52:53",
"updated_at": "2026-09-16 10:52:53",
"order_delivery": {
"delivery_type_code": null,
"ettn": null,
"postcode": null,
"region": null,
"city": null,
"district": null,
"street": null,
"house_number": null,
"apartment_number": null,
"post_office_box": null
},
"order_payment": {
"payment_method_code": null,
"total_paid": null,
"terminal_id": null,
"epz": null,
"mid": null,
"card_type": null,
"auth_code": null,
"rrn": null,
"datetime": null,
"name": null,
"payment_system": null,
"cash_register_number": null
},
"customer": {
"phone_number": "380999808000",
"last_name": "Тест",
"first_name": "Тест",
"middle_name": "Тест",
"email": null,
"insurance_card_number": "66675859595",
"franchising_percentage": 0
},
"insurance": {
"name": "ПАТ \"СК \"УСГ\"",
"code": "30859524",
"order_number": "7748494940"
},
"insurance_doctor_name": null,
"recipe": {
"number": "0000-93XM-MEKE-8657",
"total_include_reimbursement": 15.28,
"reimbursement_total": 58.62
},
"status": {
"comment": "Нове замовленння",
"name": "created"
},
"comment": null,
"goods": [
{
"id": 1558580,
"name": "Карведилол табл. 12,5 мг №30",
"quantity": 2,
"nds": 7,
"price": 36.95,
"total": 73.9,
"surcharge": 15.28,
"reimbursement": 58.62
}
],
"total": 73.9,
"total_include_franchising_percentage": 0
}
}