Every object returned by the Panahashi API maps directly to a Kotlin data class defined inDocumentation 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.
Models.kt and stored as a Firestore document. All timestamps are Unix epoch milliseconds (Long). All monetary amounts are Double values in Colombian pesos (COP). The sections below document each model’s fields, the enum values they reference, and example JSON for the most commonly used types.
Enums
UserRole
UserRole
Determines what API endpoints a user can access.
| Value | Description |
|---|---|
CUSTOMER | Default role. Can place orders, manage cart, and write reviews. |
BAKER | Manages a single bakery’s products and orders. |
ADMIN | Full platform access including role management and refunds. |
BakeryStatus
BakeryStatus
Controls whether a bakery is visible and operational.
| Value | Description |
|---|---|
ACTIVE | Bakery is live and visible to customers. |
INACTIVE | Bakery is not yet published or has been deactivated. |
SUSPENDED | Bakery has been suspended by an admin. |
ProductAvailabilityStatus
ProductAvailabilityStatus
Indicates when a product can be picked up.
| Value | Description |
|---|---|
READY_NOW | Available immediately. |
READY_IN_20 | Ready in approximately 20 minutes. |
READY_IN_60 | Ready in approximately 60 minutes. |
ADVANCE_ORDER_ONLY | Must be ordered in advance. See advanceMinutes. |
OUT_OF_STOCK | Not currently available. |
OrderStatus
OrderStatus
Tracks an order through its lifecycle.
| Value | Description |
|---|---|
PENDING | Order placed but not yet confirmed by the bakery. |
CONFIRMED | Bakery has accepted the order. |
BAKING | Order is being prepared. |
READY | Order is ready for pickup. |
COMPLETED | Customer has picked up the order. |
CANCELLED | Order was cancelled. |
PaymentStatus
PaymentStatus
Tracks payment state for an order.
| Value | Description |
|---|---|
PENDING | Payment has not yet been processed. |
APPROVED | Payment was successful. |
REJECTED | Payment was declined. |
REFUNDED | Payment has been refunded by an admin. |
PaymentMethod
PaymentMethod
The method used to pay for an order.
| Value | Description |
|---|---|
CREDIT_CARD | Simulated credit card payment. |
DEBIT_CARD | Simulated debit card payment. |
PSE | Colombian online bank transfer (PSE). |
CASH_ON_PICKUP | Customer pays with cash at pickup. |
PromotionType
PromotionType
Determines how a discount is calculated.
| Value | Description |
|---|---|
PERCENTAGE | Discount as a percentage of the order total. Uses discountPct. |
FIXED_AMOUNT | Flat amount deducted from the total. Uses discountAmount. |
HAPPY_HOUR | Discount active only between happyHourStart and happyHourEnd. |
Bakery
Represents a bakery on the platform.Firestore document ID. Auto-generated on creation.
Display name of the bakery.
Short description shown on the bakery’s profile page.
Street address for pickup.
Latitude coordinate used for the nearby bakeries query.
Longitude coordinate used for the nearby bakeries query.
Contact phone number.
URL of the bakery’s logo image.
URL of the bakery’s banner image.
Whether the bakery is currently accepting orders.
Opening time in
HH:mm format. Default "07:00".Closing time in
HH:mm format. Default "20:00".Average review rating, recalculated on each new review submission.
Total number of reviews submitted for this bakery.
One of
ACTIVE, INACTIVE, or SUSPENDED. Default INACTIVE.Firebase UID of the
BAKER user who owns this bakery.Unix epoch milliseconds when the bakery was created.
Product
Represents a baked good offered by a bakery.Firestore document ID.
ID of the bakery that owns this product.
Display name of the product.
Price in COP.
Single emoji character used as a quick visual indicator.
One of
READY_NOW, READY_IN_20, READY_IN_60, ADVANCE_ORDER_ONLY, or OUT_OF_STOCK. Default READY_NOW.Current units in stock.
Free-text category label (e.g.
"Pan", "Postres").Longer description of the product.
URL of the product image, set via
POST /api/v1/upload/product/{productId}.Whether the product is currently listed. Default
true.Minutes in advance required to order. Only relevant when
availabilityStatus is ADVANCE_ORDER_ONLY.Example Product
Order
Tracks a customer order from placement through pickup.Firestore document ID.
Firebase UID of the customer who placed the order.
Display name of the customer at the time of order.
ID of the bakery fulfilling the order.
Display name of the bakery at the time of order.
Final order total in COP, after any discount.
Lifecycle status. One of
PENDING, CONFIRMED, BAKING, READY, COMPLETED, CANCELLED.Unix epoch milliseconds when the order was placed.
Human-readable pickup time string (e.g.
"15:30").Unix epoch milliseconds for scheduled advance orders.
null for immediate orders.QR code payload used by bakers to verify pickup via
POST /api/v1/orders/verify-qr.Customer notes for the bakery (e.g.
"Sin azúcar").Unix epoch milliseconds when the order is expected to be ready. Set by the baker.
Amount deducted by a promotion, in COP.
0 if no promotion applied.ID of the applied promotion, or
null if none.One of
PENDING, APPROVED, REJECTED, REFUNDED.One of
CREDIT_CARD, DEBIT_CARD, PSE, CASH_ON_PICKUP.Example Order
CartItem
A snapshot of a product at the time it is added to an order. Embedded insideOrder.items.
ID of the source product.
Product name at the time the item was added.
Unit price in COP at the time the item was added.
Product emoji at the time the item was added.
Quantity ordered.
UserProfile
Stores metadata for an authenticated user in theusers Firestore collection.
Firebase UID. Used as the Firestore document ID.
User’s display name from Firebase Auth.
User’s email address.
Contact phone number.
One of
CUSTOMER, BAKER, or ADMIN. Default CUSTOMER.ID of the bakery linked to this user. Non-empty only for
BAKER users.Firebase Cloud Messaging token for push notifications.
Unix epoch milliseconds when the profile was created.
Payment
Records a payment transaction for an order.Firestore document ID.
ID of the order this payment belongs to.
Firebase UID of the paying customer.
Amount charged in COP.
One of
CREDIT_CARD, DEBIT_CARD, PSE, CASH_ON_PICKUP.One of
PENDING, APPROVED, REJECTED, REFUNDED.Last four digits of the simulated card, used for display in the client. Empty for non-card methods.
Unix epoch milliseconds when the payment record was created.
Unix epoch milliseconds when the payment record was last updated (e.g. after a refund).
Review
A customer review submitted after a completed order.Firestore document ID.
ID of the bakery being reviewed.
Firebase UID of the reviewer.
Display name of the reviewer at the time of submission.
ID of the completed order associated with this review.
Integer rating from 1 to 5.
Free-text review body.
Unix epoch milliseconds when the review was submitted.
LoyaltyCard
Tracks a customer’s stamp-card progress at a specific bakery.Firestore document ID.
Firebase UID of the card holder.
ID of the bakery this card belongs to.
Current stamp count toward the next reward.
Number of stamps required to earn one free item. Default
9.Cumulative number of rewards earned across all time.
Number of unredeemed free items the customer can claim.
Unix epoch milliseconds when the card was last updated.
Promotion
A discount applied to an order at checkout.Firestore document ID.
ID of the bakery that created this promotion.
ID of the specific product this promotion applies to. Empty string if bakery-wide.
Short display name shown in the client.
Longer explanation of the promotion terms.
One of
PERCENTAGE, FIXED_AMOUNT, or HAPPY_HOUR.Percentage discount (0–100). Used when
type is PERCENTAGE.Fixed discount in COP. Used when
type is FIXED_AMOUNT.Happy hour start time in
HH:mm format. Used when type is HAPPY_HOUR.Happy hour end time in
HH:mm format. Used when type is HAPPY_HOUR.Whether the promotion is currently live. Default
true.Unix epoch milliseconds when the promotion was created.
Response wrappers
All Panahashi endpoints return data wrapped in one of two envelope types.ApiResponse<T>
Used for single-object and action responses.true if the request succeeded, false on error.The response payload.
null on error responses.Human-readable message. Present on errors and some success responses.
Example ApiResponse
PagedResponse<T>
Used for list endpoints that support pagination.The current page of results.
Current page index (1-based).
Number of items per page.
Total number of items across all pages.
true if there are additional pages beyond the current one.Example PagedResponse