1. Orders - User
3enab
👤 User Application
  • 👤 User Application
  • 🏪 Vendor Application
  • 👨‍💼 Admin Application
  • 🚚 Delivery Application
  • Auth - User
    • Register a new user
      POST
    • Login user
      POST
    • Logout user
      POST
    • Refresh access token
      POST
    • Send phone OTP
      POST
    • Verify phone OTP
      POST
    • Send password reset OTP
      POST
    • Verify password reset OTP
      POST
    • Reset password
      POST
  • Addresses - User
    • Create a new address
      POST
    • Get all addresses
      GET
    • Get default address
      GET
    • Get address by ID
      GET
    • Update address
      PUT
    • Delete address
      DELETE
    • Set as default address
      PATCH
  • Ads - User
    • Get all advertisements
      GET
    • Get a specific advertisement by ID
      GET
  • Coupons - User
    • Get available coupons
      GET
  • Delivery Areas - User
    • Get all active delivery areas
      GET
  • Items - User
    • Get all items
    • Get a specific item by ID
    • Get variants of an item
    • Get all items (Direct Access)
    • Get all items for a specific vendor (Direct Access)
    • Get item by ID (Direct Access)
  • Menu Categories - User
    • Get all active menu categories for a vendor
    • Get a menu category by ID
  • Orders - User
    • Preview order pricing
      POST
    • Get all orders
      GET
    • Create a new order
      POST
    • Get order by ID
      GET
    • Cancel order
      DELETE
  • Rates - User
    • Create a new rating for a vendor
    • Get all ratings for a vendor
    • Get a specific rating by ID
    • Update a rating
    • Delete a rating
  • Users - User
    • Get current user profile
    • Update current user profile
    • Delete current user account
    • Change user password
  • Vendor Categories - User
    • Get all active vendor categories
    • Get a vendor category by ID
  • Vendors - User
    • Get all active vendors
    • Get vendor by ID
    • Get vendor logo
  • Versions - User
    • Get the latest version for User app
  • App Notices - User
    • Get active app notices
  1. Orders - User

Get order by ID

GET
/api/v1/orders/{orderId}
Retrieve a specific order by its ID. Only the order owner can access it

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Path Params

Responses

🟢200OK
application/json
Order retrieved successfully
Body

Example
{
    "status": "success",
    "message": "Order fetched successfully",
    "data": {
        "order": {
            "_id": "64f1a2b3c4d5e6f7890a1234",
            "orderNumber": 1,
            "user": "64f1a2b3c4d5e6f7890a5678",
            "vendor": "64f1a2b3c4d5e6f7890a9999",
            "assignedDriver": "64f1a2b3c4d5e6f7890a6666",
            "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": "64f1a2b3c4d5e6f7890a8888",
            "status": "pending",
            "address": "64f1a2b3c4d5e6f7890a7777",
            "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"
        }
    }
}
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
Modified at 2026-04-08 13:48:58
Previous
Create a new order
Next
Cancel order
Built with