The Promotions API lets bakers offer discounts on their products. Three promotion types are supported: percentage off, fixed amount off, and happy-hour (percentage discount active only within a specified time window). Customers apply a promotion at order creation by passingDocumentation 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.
promotionId.
Promotion types
| Type | Required fields | Description |
|---|---|---|
PERCENTAGE | discountPct (1–100) | Percentage off the order or product total |
FIXED_AMOUNT | discountAmount (> 0) | Fixed currency amount off |
HAPPY_HOUR | happyHourStart, happyHourEnd, discountPct | Percentage off, active only during specified hours |
Promotion object
Unique promotion ID.
Owning bakery ID.
If set, discount applies only to this product. Empty string = order-wide.
Promotion title shown to customers.
Optional description.
PERCENTAGE, FIXED_AMOUNT, or HAPPY_HOUR.Percentage discount (1–100). Used for PERCENTAGE and HAPPY_HOUR types.
Fixed discount amount. Used for FIXED_AMOUNT type.
Start time in HH:mm format (HAPPY_HOUR only).
End time in HH:mm format (HAPPY_HOUR only).
Whether this promotion is currently active.
Creation epoch ms.
GET /api/v1/promotions
Returns active promotions for a bakery. Public endpoint. Auth required: NoID of the bakery.
GET /api/v1/promotions/me
Returns all promotions (including inactive) for the baker’s bakery. Auth required: Yes — BAKERPOST /api/v1/promotions
Creates a new promotion for the baker’s bakery. Auth required: Yes — BAKERPromotion title.
Optional description.
Promotion type.
Target product ID. Omit for order-wide discount.
Required for PERCENTAGE and HAPPY_HOUR (1–100).
Required for FIXED_AMOUNT (must be > 0).
Start time HH:mm. Required for HAPPY_HOUR.
End time HH:mm. Required for HAPPY_HOUR.
PATCH /api/v1/promotions//toggle
Toggles a promotion active or inactive. Auth required: Yes — BAKERPromotion ID.
DELETE /api/v1/promotions/
Deletes a promotion. Baker must own the promotion’s bakery. Auth required: Yes — BAKERPromotion ID.