The Products API exposes four endpoints that give a restaurant owner full control over their menu items. All endpoints are protected — the server verifies that the product belongs to a category that belongs to the authenticated user’s restaurant (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lffiesco-svg/gastromovil/llms.txt
Use this file to discover all available pages before exploring further.
categoria__restaurante__propietario=request.user). Product images are stored on Cloudinary and are returned as absolute URLs. Use multipart/form-data when uploading images; use application/json for all other requests.
All four endpoints require authentication. Send a
Bearer token in the Authorization header or maintain an active Django session. An unauthenticated request returns 401 Unauthorized.List Products
Returns all menu products belonging to the authenticated restaurant, across all categories.GET /api/productos/
Example Request
Response
200 OK — array of product objects.
Unique database identifier of the product.
Display name of the product.
Unit price as a decimal string (e.g.
"12500.00").Free-text description of the product.
Whether the product is currently available for ordering.
Absolute URL of the Cloudinary-hosted product image, or
null if no image has been uploaded.Human-readable name of the category this product belongs to.
Foreign key of the category.
Foreign key of the restaurant that owns the category.
Create a Product
Creates a new product and associates it with one of the authenticated restaurant’s categories. Send the request asmultipart/form-data when including an image file.
POST /api/productos/crear/
Request Body
Display name of the product (max 200 characters).
Unit price as a decimal number (e.g.
18500.00). Must be a valid decimal value.Optional free-text description of the product.
Whether the product is available for ordering. Defaults to
true. Accepted string values: "true", "True", or the boolean true.Optional product image. Submit as a file field in a
multipart/form-data request. Uploaded to Cloudinary automatically.Primary key of the category this product belongs to. Must be a category owned by the authenticated restaurant. Omit to create a product with no category.
Example Request (JSON, no image)
Example Request (multipart, with image)
Responses
201 Created — product created successfully.
400 Bad Request — missing required fields or invalid price format.
Update a Product
Performs a partial update on an existing product. Only the fields included in the request body are changed.PUT /api/productos/<pk>/editar/
Path Parameters
Primary key of the product to update. Must belong to a category of the authenticated user’s restaurant.
Request Body
All fields are optional — include only those you want to change.New display name (max 200 characters).
New unit price as a decimal value.
New description text.
Pass
false to hide the product from menus without deleting it.Replacement image file. Submit as
multipart/form-data. Existing Cloudinary asset is replaced.Primary key of the new category. Must belong to the authenticated user’s restaurant.
Example Request
Responses
200 OK
404 Not Found — product does not exist or belongs to another restaurant.
Delete a Product
Permanently removes a product. This action cannot be undone.DELETE /api/productos/<pk>/eliminar/
Path Parameters
Primary key of the product to delete. Must belong to a category of the authenticated user’s restaurant.
Example Request
Responses
200 OK — product deleted.
404 Not Found — product not found or owned by a different user.