1. Orders - Admin
3enab
👨‍💼 Admin Application
  • 👤 User Application
  • 🏪 Vendor Application
  • 👨‍💼 Admin Application
  • 🚚 Delivery Application
  • Auth - Admin
    • Register a new admin
      POST
    • Login admin
      POST
    • Logout admin
      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
  • Ads - Admin
    • Create a new advertisement
      POST
    • Update an advertisement
      PUT
    • Delete an advertisement
      DELETE
    • Upload advertisement image
      POST
    • Activate an advertisement
      PATCH
    • Deactivate an advertisement
      PATCH
    • Get all ads for admin
      GET
  • Coupons - Admin
    • Create a new coupon
      POST
    • Get all coupons
      GET
    • Get coupon by ID
      GET
    • Update coupon
      PUT
    • Delete coupon
      DELETE
    • Update coupon active status
      PATCH
  • Delivery Areas - Admin
    • Create a new delivery area
    • Get all delivery areas
    • Get delivery area by ID
    • Update delivery area
    • Delete delivery area
  • Items - Admin
    • Get all items for admin
    • Create a new item
    • Get a single item by ID
    • Update an item
    • Delete an item
    • Upload item image
    • Update item availability
    • Update item group availability
    • Update item active status
    • Update item discount
    • Remove item discount
    • Apply discount to all vendor items
    • Remove discount from all vendor items
    • Update items order
    • Create a variant for an item
    • Get all variants of an item
    • Get all items (Direct Access - Public)
    • Get all items for a specific vendor (Direct Access - Public)
    • Get item by ID (Direct Access - Public)
  • Menu Categories - Admin
    • Get all menu categories for admin
    • Create menu category (Admin)
    • Get menu category by ID (Admin)
    • Update menu category (Admin)
    • Delete menu category (Admin)
    • Update menu category active status (Admin)
    • Update menu category order (Admin)
  • Rates - Admin
    • Get all ratings for a vendor (Admin)
    • Get a specific rating by ID (Admin)
    • Delete a rating (Admin)
  • Users - Admin
    • Get current admin user profile
    • Update current admin user profile
    • Delete current admin user account
    • Change admin user password
    • Get all users with pagination
    • Create user (Admin)
    • Reset user password (Admin)
    • Mark user phone as verified (Admin)
    • Get user by ID
    • Update user by ID
    • Delete user by ID
  • Vendor Categories - Admin
    • Create a new vendor category
    • Get all vendor categories
    • Get a vendor category by ID
    • Update a vendor category
    • Delete a vendor category
    • Upload vendor category image
    • Update vendor category active status
    • Reorder vendor categories
  • Vendors - Admin
    • Get all vendors for admin
    • Create vendor
    • Get vendor by ID
    • Update vendor
    • Delete vendor
    • Upload vendor logo
    • Update vendor active status
    • Update vendor availability status (Admin)
    • Update vendor free delivery status
    • Reorder vendors
    • Create or update vendor notice
    • Upload vendor cover image
    • Delete vendor notice
    • Delete vendor cover image
    • Upload notice image
    • Update vendor preparation time (Admin)
    • Delete notice image
  • Notifications - Admin
    • Send broadcast notification to users
    • Send notification to specific users
  • Versions - Admin
    • Create a new version
    • Get all versions
    • Get the latest version
    • Update a version
    • Delete a version
  • Orders - Admin
    • Get all orders (Admin)
      GET
    • Get order by ID (Admin)
      GET
    • Delete order permanently (Admin)
      DELETE
    • Cancel order by admin
      PATCH
  • App Notices - Admin
    • Create a new app notice
    • Get all app notices (paginated)
    • Get notice by ID
    • Update notice
    • Delete notice
    • Upload notice image
    • Delete notice image
  1. Orders - Admin

Get all orders (Admin)

GET
/api/v1/admin/orders
Admin endpoint to retrieve all orders in the system.
Can filter by multiple statuses using query parameters.
Examples:
Get all orders: GET /api/v1/admin/orders
Get pending orders: GET /api/v1/admin/orders?status=pending
Get multiple statuses: GET /api/v1/admin/orders?status=pending&status=preparing&status=out_for_delivery

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
Query Params

Header Params

Responses

🟢200OK
application/json
Orders retrieved successfully
Body

Example
{
    "status": "success",
    "message": "Orders fetched successfully",
    "data": {
        "orders": [
            {
                "_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"
            }
        ],
        "pagination": {
            "page": 1,
            "limit": 10,
            "total": 150,
            "totalPages": 15
        }
    }
}
🟠401Unauthorized
🟠403Forbidden
Modified at 2026-04-08 13:49:39
Previous
Delete a version
Next
Get order by ID (Admin)
Built with