Skip to main content

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.

The Restaurants API lets an authenticated restaurant owner read and update the core details of their establishment. Both endpoints are scoped to the requesting user — the server resolves the restaurant by primary key and verifies that propietario == request.user, so one owner can never read or modify another owner’s restaurant. Restaurant images are stored on Cloudinary; the image field is managed separately from the core detail fields on the edit endpoint.
Both endpoints require authentication via JWT Bearer token or an active Django session. Requests that arrive without credentials receive 401 Unauthorized. A valid token for a user who does not own the specified restaurant returns 404 Not Found.

Retrieve Restaurant Details

Returns the core fields of a single restaurant identified by its primary key. GET /api/restaurantes/<pk>/

Path Parameters

pk
integer
required
Primary key of the restaurant to retrieve. The authenticated user must be the owner of this restaurant.

Example Request

curl -s https://gastromovil.online/api/restaurantes/3/ \
  -H "Authorization: Bearer <access_token>"

Response

200 OK
id
integer
Unique database identifier of the restaurant.
nombre
string
Display name of the restaurant.
direccion
string
Street address of the restaurant.
telefono
string
Contact phone number (up to 15 characters).
activo
boolean
Whether the restaurant is currently accepting orders. true means the restaurant appears in the public listing.
{
  "id": 3,
  "nombre": "Beer & Grill",
  "direccion": "Calle 45 #23-10, Medellín",
  "telefono": "3001234567",
  "activo": true
}
404 Not Found — restaurant does not exist or belongs to another user.
{
  "detail": "No Restaurante matches the given query."
}

Update Restaurant Details

Performs a partial update on a restaurant’s core fields. Only the fields included in the request body are changed; omitted fields retain their current values. PUT /api/restaurantes/<pk>/editar/

Path Parameters

pk
integer
required
Primary key of the restaurant to update. The authenticated user must be the owner.

Request Body

All body fields are optional — send only what you want to change.
nombre
string
New display name for the restaurant (max 200 characters).
direccion
string
Updated street address (max 200 characters).
telefono
string
Updated contact phone number (max 15 characters).
activo
boolean
Set to false to take the restaurant offline and stop it appearing in the public restaurant listing.

Example Request

curl -s -X PUT https://gastromovil.online/api/restaurantes/3/editar/ \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Beer & Grill Premium",
    "telefono": "3009876543",
    "activo": true
  }'

Responses

200 OK — fields updated successfully.
{
  "mensaje": "Guardado correctamente"
}
404 Not Found — restaurant does not exist or belongs to another user.
{
  "detail": "No Restaurante matches the given query."
}
401 Unauthorized — missing or expired token.
{
  "detail": "Authentication credentials were not provided."
}
The restaurante_editar_api endpoint accepts nombre, direccion, telefono, and activo. Restaurant image management is handled separately through the admin panel and Cloudinary; the image field is not accepted by this endpoint.

Build docs developers (and LLMs) love