The Upload API stores images to Firebase Storage and automatically updates the related product or bakery record with the new URL. All uploads use multipart form data with the field nameDocumentation 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.
image.
Accepted formats
| Format | MIME type |
|---|---|
| JPEG | image/jpeg |
| PNG | image/png |
| WebP | image/webp |
Response
Upload endpoints return the updated record (Product or Bakery) with the new image URL already saved:The image URL is automatically saved to the product or bakery record. No additional PATCH call is needed.
POST /api/v1/upload/product/
Uploads an image for a product and saves the URL to the product’simageUrl field. The baker must own the product’s bakery. If the product already has an image, the old one is deleted from Storage first.
Auth required: Yes — BAKER
ID of the product to attach the image to.
Image file (multipart/form-data, field name must be
image).POST /api/v1/upload/bakery/logo
Uploads a logo for the authenticated baker’s bakery and saves the URL tologoUrl. If a logo already exists, the old one is deleted first.
Auth required: Yes — BAKER
Logo image file (multipart/form-data, field name must be
image).POST /api/v1/upload/bakery/banner
Uploads a banner image for the authenticated baker’s bakery and saves the URL tobannerUrl. If a banner already exists, the old one is deleted first.
Auth required: Yes — BAKER
Banner image file (multipart/form-data, field name must be
image).POST /api/v1/upload/bakery//logo
Admin endpoint to upload a logo for any bakery. Auth required: Yes — ADMINID of the bakery.
Logo image file (multipart/form-data, field name must be
image).