Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Panahashi/llms.txt

Use this file to discover all available pages before exploring further.

The orders resource lets authenticated users place pickup orders, browse their history, and inspect individual order records. All endpoints require Firebase authentication.
Every orders endpoint requires an Authorization: Bearer <token> header. Calls made without a valid Firebase token will be rejected.

POST /orders — createOrder({...})

Places a new pickup order on behalf of the authenticated user.

Request parameters

bakeryId
string
required
ID of the bakery to order from.
items
object[]
required
Array of items to include in the order.
pickupTime
string
required
Desired pickup time in HH:mm format (e.g. "09:30").
notes
string
Optional instructions for the bakery (e.g. dietary preferences).
paymentMethod
string
default:"CASH_ON_PICKUP"
Payment method for the order. One of CASH_ON_PICKUP, CREDIT_CARD, DEBIT_CARD, or PSE. Defaults to CASH_ON_PICKUP.
promotionId
string
ID of a promotion to apply to this order. Optional.

Response fields

id
string
Unique identifier for the newly created order.
status
string
Current order status (e.g. PENDING, CONFIRMED, READY, COMPLETED).
qrCode
string
QR code value the bakery scans to confirm pickup.

Example

import { createOrder } from './services/api';

const order = await createOrder({
  bakeryId: 'bakery-id-123',
  items: toApiItems(),
  pickupTime: '09:30',
  notes: 'Sin azúcar',
  paymentMethod: 'CREDIT_CARD',
});

GET /orders/me — fetchMyOrders(page, pageSize)

Returns a paginated list of all orders placed by the authenticated user.

Request parameters

page
number
default:"1"
Page number to retrieve. Defaults to 1.
pageSize
number
default:"20"
Number of orders per page. Defaults to 20.

Response fields

Returns a paginated array of order objects. Each object has the same shape as the response from createOrder(), plus any additional metadata the backend includes (e.g. createdAt, bakeryName).

Example

import { fetchMyOrders } from './services/api';

const orders = await fetchMyOrders(1, 20);

GET /orders/:id — fetchOrderById(id)

Returns the full details of a single order.

Request parameters

id
string
required
The unique identifier of the order to fetch.

Response fields

Returns a single order object with the same shape as the response from createOrder().

Example

import { fetchOrderById } from './services/api';

const order = await fetchOrderById('order-id-789');

Build docs developers (and LLMs) love