Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Pana-Baker/llms.txt

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

Products are the items a bakery sells. Each product carries a name, price, emoji icon, category, availability status, and a stock count. The app manages stock separately from other product fields — stock updates go through a dedicated endpoint so the baker can adjust counts from the product list without opening the full edit form.

GET /products/my

Returns all products belonging to the authenticated bakery.
curl https://your-backend.com/api/v1/products/my \
  -H "Authorization: Bearer <token>" \
  -H "X-User-Name: María"

Response

Returns an array of product objects.
{
  "data": [
    {
      "id": "prd_001",
      "name": "Pan de masa madre",
      "description": "Horneado cada mañana con masa madre de 5 años.",
      "price": 12000,
      "emoji": "🍞",
      "category": "bread",
      "stock": 8,
      "available": true,
      "availabilityStatus": "READY_NOW",
      "advanceMinutes": 0,
      "imageUrl": "https://cdn.example.com/products/prd_001.jpg"
    }
  ]
}
id
string
Unique product identifier.
name
string
Display name of the product.
description
string
Optional description of the product.
price
number
Unit price in COP.
emoji
string
Single emoji character representing the product (e.g. "🥐").
category
string
Product category. App-defined values: bread, pastelería, galletas, bebidas, otro.
stock
number
Current stock count.
available
boolean
Whether the product is available for ordering. The app derives this as stock > 0 when the field is absent.
availabilityStatus
string
Granular availability. One of READY_NOW, READY_IN_20, READY_IN_60, ADVANCE_ORDER_ONLY, or OUT_OF_STOCK.
advanceMinutes
number
Minutes of advance notice required, used when availabilityStatus is ADVANCE_ORDER_ONLY.
imageUrl
string
URL of the product photo, or an empty string if none has been uploaded.

POST /products

Creates a new product for the authenticated bakery.

Request body

{
  "name": "Croissant de mantequilla",
  "description": "Hojaldrado, con mantequilla francesa.",
  "price": 8500,
  "emoji": "🥐",
  "category": "pastelería",
  "stock": 12,
  "available": true,
  "availabilityStatus": "READY_NOW",
  "advanceMinutes": 0
}
name
string
required
Display name of the product.
price
number
required
Unit price in COP as a float.
emoji
string
Single emoji character. Defaults to "🍞" in the app.
category
string
Product category. Accepted values: bread, pastelería, galletas, bebidas, otro.
description
string
Optional product description.
stock
number
Initial stock count. Integer.
available
boolean
Whether the product is immediately available. The app derives this as stock > 0.
availabilityStatus
string
Granular availability status. One of READY_NOW, READY_IN_20, READY_IN_60, ADVANCE_ORDER_ONLY, or OUT_OF_STOCK.
advanceMinutes
number
Minutes of advance notice required. Only meaningful when availabilityStatus is ADVANCE_ORDER_ONLY.

Response

Returns the created product object, including the server-assigned id.
After creating a product, the app immediately calls PATCH /products/:id/stock to set the stock count and then optionally calls POST /upload/product/:id to attach a photo. The id from this response is needed for both follow-up calls.

PATCH /products/:id

Updates editable fields on an existing product. Stock is managed separately via PATCH /products/:id/stock.

Path parameters

id
string
required
The unique product ID.

Request body

Send only the fields you want to update. Accepted fields are the same as POST /products, excluding stock and available.
{
  "name": "Croissant de mantequilla",
  "description": "Hojaldrado, con mantequilla francesa.",
  "price": 9000,
  "emoji": "🥐",
  "category": "pastelería",
  "availabilityStatus": "READY_NOW",
  "advanceMinutes": 0
}

Response

Returns the updated product object.

PATCH /products/:id/stock

Updates only the stock count for a product. The app calls this endpoint from the inline stepper on the products list without requiring the baker to open the edit form.

Path parameters

id
string
required
The unique product ID.

Request body

{
  "stock": 5
}
stock
number
required
New stock count. Must be a non-negative integer. The app clamps to Math.max(0, value).

Response

Returns the updated product object with the new stock value.

DELETE /products/:id

Permanently deletes a product from the bakery’s catalogue. This action cannot be undone.

Path parameters

id
string
required
The unique product ID.

Response

Returns a success indicator or the deleted product object, depending on the server implementation. The app removes the product from the local list on success.

POST /products/seed

Loads a set of demo products into the authenticated bakery’s catalogue. Use this to populate a fresh bakery with sample data for testing or onboarding.
curl -X POST https://your-backend.com/api/v1/products/seed \
  -H "Authorization: Bearer <token>" \
  -H "X-User-Name: María"
No request body is required.

Response

Returns the list of seeded products.
Calling this endpoint on a bakery that already has products will add the demo products on top of the existing catalogue. It does not clear existing products first.

Build docs developers (and LLMs) love