Loyalty cards track the stamps a user earns at each bakery. Each completed order earns stamps, and once the threshold is reached the user receives a free item reward. All loyalty endpoints require Firebase authentication. Active promotions for a bakery can be fetched without authentication via the promotions endpoint documented below.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.
GET /loyalty — fetchMyLoyaltyCards()
Returns all loyalty cards belonging to the authenticated user, one per bakery.
Response fields
Unique loyalty card identifier.
ID of the bakery this card is associated with.
Current number of stamps on the card.
Number of stamps required to earn one free-item reward.
Number of unredeemed free-item rewards currently available.
Cumulative rewards earned on this card since it was created.
Example
GET /loyalty/:bakeryId — fetchLoyaltyCard(bakeryId)
Returns the loyalty card for a specific bakery, for the authenticated user.
Request parameters
ID of the bakery whose loyalty card you want to retrieve.
Response fields
Returns a single loyalty card object with the same shape as an entry fromfetchMyLoyaltyCards().
Example
GET /promotions?bakeryId= — fetchPromotions(bakeryId)
Returns the active promotions for a given bakery. No authentication required.
This endpoint is public. No
Authorization header is needed.Request parameters
ID of the bakery whose active promotions you want to list.
Response fields
Returns an array of promotion objects. Each promotion can be referenced by its ID when creating an order viacreateOrder({ promotionId }).