Overview
Retrieves complete details for a single order. Access is role-based:- Customers: Can only view their own orders
- Store employees: Can only view orders for their store
Authentication
Requires authentication with JWT token. Available to all authenticated users.Endpoint
Path parameters
The unique order ID (MongoDB ObjectId)
Response
Indicates if the request was successful
Complete order details
Example request
Example response (Customer)
Example response (Store Employee)
Error responses
Order status meanings
- placed: Order created, awaiting payment verification
- accepted: Payment confirmed, awaiting preparation
- processing: Order is being prepared by the store
- ready: Order is ready for pickup, OTP generated
- picked_up: Order collected by customer
- cancelled: Order cancelled due to payment failure, timeout, or no-show
When an order reaches
ready status, a 6-digit OTP is generated and sent to the customer. The store must verify this OTP when the customer arrives to collect the order.