Endpoint
Retrieve a list of all active stores. Returns stores sorted by creation date (newest first) with owner information populated.
Authentication
No authentication required. This is a public endpoint.
Response
Indicates if the request was successful
Contains the response data Array of store objects Unique identifier for the store
MongoDB ObjectId (same as id)
Store owner ID (camelCase)
Whether the store is active
Active status (camelCase)
Store operating hours configuration
Operating hours (camelCase)
Store image URL (camelCase)
ISO 8601 timestamp of creation
Creation timestamp (camelCase)
ISO 8601 timestamp of last update
Last update timestamp (camelCase)
Example request
curl https://api.campusbite.com/stores
Example response
{
"success" : true ,
"data" : {
"stores" : [
{
"id" : "507f1f77bcf86cd799439011" ,
"_id" : "507f1f77bcf86cd799439011" ,
"name" : "Campus Cafe" ,
"description" : "Your favorite campus coffee shop" ,
"upi_id" : "campuscafe@paytm" ,
"owner_id" : "507f1f77bcf86cd799439012" ,
"ownerId" : "507f1f77bcf86cd799439012" ,
"is_active" : true ,
"isActive" : true ,
"operating_hours" : {
"monday" : { "open" : "08:00" , "close" : "18:00" },
"tuesday" : { "open" : "08:00" , "close" : "18:00" }
},
"operatingHours" : {
"monday" : { "open" : "08:00" , "close" : "18:00" },
"tuesday" : { "open" : "08:00" , "close" : "18:00" }
},
"image_url" : "/uploads/stores/campus-cafe.jpg" ,
"imageUrl" : "/uploads/stores/campus-cafe.jpg" ,
"qr_code_url" : "/uploads/qr-codes/campus-cafe-qr.png" ,
"qrCodeUrl" : "/uploads/qr-codes/campus-cafe-qr.png" ,
"owner_name" : "John Doe" ,
"created_at" : "2024-01-15T10:30:00.000Z" ,
"createdAt" : "2024-01-15T10:30:00.000Z" ,
"updated_at" : "2024-01-20T14:45:00.000Z" ,
"updatedAt" : "2024-01-20T14:45:00.000Z"
}
]
}
}
Only active stores (is_active: true) are returned by this endpoint. Stores are automatically sorted by creation date with the newest stores appearing first.