The Orders API manages the complete lifecycle of a customer order — from placement through QR-code-verified pickup. Customers create orders and track their status; bakers manage fulfillment and scan QR codes at pickup; admins can view all orders across the platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Panahashi-Backend/llms.txt
Use this file to discover all available pages before exploring further.
Order statuses
| Status | Description |
|---|---|
PENDING | Order placed, awaiting baker confirmation |
CONFIRMED | Baker confirmed the order |
BAKING | Baker is preparing the order |
READY | Order is ready for pickup |
COMPLETED | Customer picked up — QR verified |
CANCELLED | Order was cancelled (stock is restored) |
Order object
Unique order ID.
Firebase UID of the customer.
Customer display name.
ID of the bakery.
Name of the bakery.
List of ordered items with productId, name, price, emoji, qty.
Total price after any discount.
Current order status.
UUID string for QR pickup verification.
Requested pickup time string (e.g. “10:30”).
Optional scheduled pickup epoch ms.
Baker-set estimated ready epoch ms.
Discount applied from a promotion.
ID of applied promotion, if any.
One of:
PENDING, APPROVED, REJECTED, REFUNDED.One of:
CREDIT_CARD, DEBIT_CARD, PSE, CASH_ON_PICKUP.Optional customer notes.
Creation epoch ms.
POST /api/v1/orders
Places a new order. The bakery must be open, products must be in stock, and pickup time must fall within the bakery’s hours. Auth required: Yes — CUSTOMERPass the customer’s display name in the
X-User-Name request header. It is stored on the order and shown to the baker. If omitted, it defaults to "Cliente".Target bakery ID.
Array of items to order.
Requested pickup time, e.g. “10:30”.
Epoch ms for advance scheduled orders.
Optional notes for the baker.
One of:
CREDIT_CARD, DEBIT_CARD, PSE, CASH_ON_PICKUP.Optional promotion ID to apply a discount.
For CASH_ON_PICKUP orders, the baker is notified via FCM immediately after order creation. For card payments, the notification fires after payment is approved via the Payments API.
GET /api/v1/orders/me
Returns the authenticated customer’s orders, newest first. Auth required: Yes — CUSTOMERPage number (1-indexed). Default:
1.Results per page. Default:
20.GET /api/v1/orders/
Returns a single order. Customers can only retrieve their own orders. Auth required: Yes — CUSTOMEROrder ID.
PATCH /api/v1/orders//status
Updates the status of an order. Baker must own the order’s bakery. Auth required: Yes — BAKEROrder ID.
New status:
CONFIRMED, BAKING, READY, or CANCELLED.Cancelling an order (
CANCELLED) automatically restores stock for all items. Completing an order adds a loyalty stamp for the customer.PATCH /api/v1/orders//estimated-ready
Sets the baker’s estimated ready time for an order, sent to the customer via FCM notification. Auth required: Yes — BAKEROrder ID.
Epoch milliseconds of estimated ready time.
POST /api/v1/orders/verify-qr
Verifies a customer’s QR code at pickup. The order must be inREADY status; on success, status is set to COMPLETED.
Auth required: Yes — BAKER
QR code string from the customer’s order.
Baker order views
GET /api/v1/orders/bakery
All orders for the baker’s bakery, paginated. Auth required: Yes — BAKERPage. Default:
1.Per page. Default:
20.GET /api/v1/orders/bakery/pending
OnlyPENDING orders for the baker’s bakery.
Auth required: Yes — BAKER
GET /api/v1/orders/bakery/active
Active orders in statusesPENDING, CONFIRMED, or BAKING.
Auth required: Yes — BAKER
GET /api/v1/orders/all
Returns all orders across the platform, paginated. Auth required: Yes — ADMINPage. Default:
1.Per page. Default:
20.