Cancel Prescription
The "Cancel Prescription" API simplifies the process of canceling prescriptions, providing users with an easy and efficient way to enhance their prescription experience by facilitating cancellations.
Endpoint:
api/customer/prescriptions/{prescription_id}/cancel
Http Method:
POST
Request Parameters:
prescription_id
: The ID of the prescription to be cancelled.
Request Body:
cancellation_id
: The ID of the cancellation reason. Users can choose from the list provided by the Prescription Cancellation Reasons API.
Success Response:
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": []
}
Check the following section to learn more about the Prescription Cancellation Reasons API Reference
Prescription Cancellation Reasons
The "Prescription Cancellation Reasons" API provides a way to retrieve a list of reasons for canceling prescriptions. This feature enhances user experience by offering predefined options for cancelling prescriptions.
Endpoint:
api/customer/prescription_cancellation_reasons
Http Method:
GET
Success Response:
Key | Type | Description |
---|---|---|
id | Integer | The ID of the cancellation reason. |
text | String | The title of the cancellation reason. |
{
"code": 200,
"data": [
{
"id": 1,
"text": "Ordered by mistake "
},
{
"id": 5,
"text": "Find a better offer elsewhere"
},
{
"id": 6,
"text": "Shipping Delay"
},
{
"id": 7,
"text": "Changed my opinion "
},
{
"id": 8,
"text": "Other"
}
]
}
Check the following section to learn more about the Prescription Cancellation Reasons API Reference