Skip to main content

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.

The Search API lets customers find bakeries and products with a single query. It searches bakery names and product names and categories simultaneously, returning both matching bakeries and matching products with their parent bakery info.

GET /api/v1/search

Auth required: No
q
string
required
Search term (minimum 2 characters). Matched against bakery names and product names/categories.
lat
number
User latitude. Required if using radius filtering.
lng
number
User longitude. Required if using radius filtering.
radius
number
Filter radius in kilometers. Default: 10. Only applied when lat and lng are provided.
category
string
Filter products by category label.

Response

bakeries
Bakery[]
Matching active bakeries.
products
ProductSearchResult[]
Matching available products with their parent bakery and optional distance.

Examples

Search without location:
curl "http://localhost:8080/api/v1/search?q=croissant"
Search with location filter:
curl "http://localhost:8080/api/v1/search?q=pan&lat=4.6097&lng=-74.0817&radius=5"
Search with category filter:
curl "http://localhost:8080/api/v1/search?q=chocolate&category=Pasteles"

Sample response

{
  "success": true,
  "data": {
    "bakeries": [
      {
        "id": "bak001",
        "name": "Panadería El Trigal",
        "rating": 4.8,
        "isOpen": true,
        "status": "ACTIVE"
      }
    ],
    "products": [
      {
        "product": {
          "id": "prod001",
          "name": "Pan de Chocolate",
          "price": 2.5,
          "emoji": "🍫",
          "availabilityStatus": "READY_NOW",
          "available": true
        },
        "bakery": { "id": "bak001", "name": "Panadería El Trigal" },
        "distanceKm": 1.3
      }
    ]
  }
}

Build docs developers (and LLMs) love