{
"status": "success",
"message": "Order fetched successfully",
"data": {
"order": {
"_id": "64f1a2b3c4d5e6f7890a1234",
"orderNumber": 1,
"user": {
"_id": "64f1a2b3c4d5e6f7890a5678",
"name": "John Doe",
"phone": "+201234567890",
"email": "john@example.com"
},
"vendor": {
"_id": "64f1a2b3c4d5e6f7890a9999",
"name": "Pizza House",
"logoPath": "uploads/vendors/logo.jpg"
},
"assignedDriver": {
"_id": "64f1a2b3c4d5e6f7890a6666",
"name": "Driver Name",
"phone": "+201234567890"
},
"items": [
{
"item": {
"_id": "64f1a2b3c4d5e6f7890a1234",
"name": "Margherita Pizza",
"description": "Classic Italian pizza with fresh mozzarella and basil",
"imagePath": "uploads/items/pizza.jpg",
"optionName": "Large",
"category": {
"_id": "64f1a2b3c4d5e6f7890a1111",
"name": "Pizza"
}
},
"optionId": "64f1a2b3c4d5e6f7890a5555",
"optionValue": "Large",
"quantity": 2,
"unitPrice": 50,
"totalPrice": 100
}
],
"subtotal": 150,
"discount": 20,
"deliveryFee": 15,
"total": 145,
"appliedCoupon": {
"_id": "64f1a2b3c4d5e6f7890a8888",
"code": "SAVE20",
"discount": 20,
"discountType": "percentage"
},
"status": "pending",
"address": {},
"paymentMethod": "cash",
"isPickup": false,
"notes": "Please ring the bell twice",
"rejectionReason": "Out of stock",
"createdAt": "2019-08-24T14:15:22.123Z",
"updatedAt": "2019-08-24T14:15:22.123Z"
}
}
}