Create Prescription
The "Create Prescription" API helps customers send their prescription info for medical items. This makes ordering products with prescriptions easier. Customers can safely upload their prescriptions, so their orders are correct.
Endpoint:
api/customer/prescriptions
Http Method:
POST
Request Body:
key | type | description |
---|---|---|
note | string | Additional notes or comments related to the prescription. |
images | array | An array of prescription images. Customers can upload images of their prescription documents. |
insurance_company_id | integer | The ID of the insurance company associated with the prescription. This is required if the key ENABLE_PRESCRIPTION_INSURANCE_COMPANY is enabled. fetch id from Get Insurance Companies API. |
address_id | integer | The ID of the customer's address where the prescription is intended to be used. you can fetch address from Initialize API under user addresses. |
{
"note": "Prescription note",
"images": [
"http//example.com/image-1.png",
"http//example.com/image-2.png"
],
"insurance_company_id": 1,
"address_id": 49124
}
- Success Response:
Prescription Resource
You can check more details about Prescription Resource.
{
"code": 200,
"message": "success",
"data": [
{
"id": 1,
"note": null,
"images": [
"http//example.com/image-1.png",
"http//example.com/image-2.png"
],
"status": 4,
"created_at": "2023-08-27T10:56:09.000000Z",
"insurance_company": {
"id": 1,
"name_en": "Company 1",
"name_ar": "Company 1",
"logo": "default.png",
"created_at": "2023-08-27T09:00:19.000000Z",
"updated_at": "2023-08-27T09:00:21.000000Z"
},
"creation_date": "2023-08-27 13:56:09",
"user": {
"id": 1017390,
"full_name": "Test Documentation",
"name": "Test Documentation",
"phone": "01111111115",
"is_guest": 0,
//...
},
"address": {
"id": 49124,
"user_id": 1017390,
"formatted_address_ar": "مبني 10, دور 1, شارع test address, شقة 1, المعادي, القاهرة",
"formatted_address_en": "building 10, floor 1, address test address, apartment 1, Maadi, Cairo",
"district": null,
"area": {
"id": 125,
"name": "Maadi",
//...
},
"city": {
"id": 10,
"name": "Cairo",
"name_ar": "القاهرة",
//...
}
},
"cancellation_id": 1,
"cancellation_reason": {
"id": 1,
"text": "Ordered by mistake ",
"text_ar": "تم الطلب بالخطأ",
"user_type": "customer"
},
"cancellation_text": null
}
],
"meta": []
}
info
Check the following section to learn more about the Create Prescriptions API Reference