Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt

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

Restaurant partners — called asociados in the codebase — have a dedicated set of endpoints to manage their presence on the Debuta platform. Partners can maintain their restaurant profile, upload a cover photo and gallery (up to 10 images), manage a menu of up to 30 dishes, view date bookings that were matched to their venue, and review engagement statistics. Every endpoint in this group requires a JWT belonging to a user with rol: 'asociado'.
The asociado role is not self-assignable. It must be granted by a Debuta admin via PUT /api/admin/users/:id/role. Contact the platform team to have your account upgraded.

The Restaurante Object

restaurante
object
The full restaurant profile returned by most partner endpoints.
menu[]
object

Endpoints

GET /api/asociado/restaurante

Get the partner’s restaurant profile.

PUT /api/asociado/restaurante

Update restaurant text information.

POST /api/asociado/restaurante/fotos

Upload restaurant photos to Cloudinary.

DELETE /api/asociado/restaurante/fotos/:publicId

Delete a restaurant photo.

PUT /api/asociado/restaurante/menu

Replace the entire menu array.

POST /api/asociado/restaurante/menu/plato

Add a single menu item.

DELETE /api/asociado/restaurante/menu/:platoId

Remove a menu item.

GET /api/asociado/citas

View date bookings at your restaurant.

GET /api/asociado/estadisticas

View engagement statistics.

GET /api/asociado/restaurante

Returns the restaurant profile linked to the authenticated partner. If no profile exists yet (first login), an empty profile document is automatically created and returned. Authentication: Bearer JWT with rol: 'asociado' required.

Response 200

{
  "restaurante": {
    "_id": "665f3a4b5c6d7e8f9a0b1c2d",
    "asociadoId": "665f000000000000000000aa",
    "nombre": "La Terraza de Sofía",
    "descripcion": "Rooftop restaurant with panoramic city views and Mediterranean fusion.",
    "categoria": "fusión",
    "ambiente": "romántico",
    "direccion": "Calle 93 #13-45, piso 12",
    "ciudad": "Bogotá",
    "telefono": "+57 310 555 0101",
    "horario": "Lunes–Sábado 12:00–23:00, Domingo 12:00–18:00",
    "precio_promedio": "$$$",
    "website": "https://laterrazadesofia.co",
    "instagram": "@laterrazadesofia",
    "foto_portada": {
      "url": "https://res.cloudinary.com/debuta/image/upload/v1/restaurantes/portada.jpg",
      "public_id": "restaurantes/portada"
    },
    "fotos": [],
    "menu": [],
    "latitude": 4.6769,
    "longitude": -74.0478,
    "activo": true,
    "createdAt": "2024-05-01T09:00:00.000Z",
    "updatedAt": "2024-06-04T12:00:00.000Z"
  }
}

curl example

curl -X GET https://api.debuta.app/api/asociado/restaurante \
  -H "Authorization: Bearer <asociado-token>"

PUT /api/asociado/restaurante

Updates any combination of the restaurant’s text fields. Only the fields provided in the request body are modified; omitted fields retain their current values. Runs validators defined in the schema (enum checks for categoria, ambiente, precio_promedio). Authentication: Bearer JWT with rol: 'asociado' required.

Request body (all fields optional)

nombre
string
Restaurant name. Max 150 chars.
descripcion
string
Description. Max 500 chars.
categoria
string
Cuisine category (see enum values in the schema above).
ambiente
string
Atmosphere type (see enum values above).
direccion
string
Street address. Max 300 chars.
ciudad
string
City.
telefono
string
Phone number.
horario
string
Hours description. Max 200 chars.
precio_promedio
string
Price tier: $, $$, $$$, or $$$$.
website
string
Website URL.
instagram
string
Instagram handle.
latitude
number
Geographic latitude. Updates location.coordinates automatically.
longitude
number
Geographic longitude.

Response 200

Returns the full updated restaurante object (same shape as GET above).

curl example

curl -X PUT https://api.debuta.app/api/asociado/restaurante \
  -H "Authorization: Bearer <asociado-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "La Terraza de Sofía",
    "categoria": "fusión",
    "ambiente": "romántico",
    "precio_promedio": "$$$",
    "horario": "Lunes–Sábado 12:00–23:00",
    "latitude": 4.6769,
    "longitude": -74.0478
  }'

POST /api/asociado/restaurante/fotos

Uploads one or more restaurant photos to Cloudinary. Accepts images as base64 strings. Set esPortada: true to designate the first uploaded image as the cover photo — any previously stored cover is deleted from Cloudinary first. Gallery photos are appended up to a maximum of 10 images. Authentication: Bearer JWT with rol: 'asociado' required. Content-Type: application/json

Request body

fotos
string | string[]
required
A single base64 image string, or an array of base64 strings to upload in batch.
esPortada
boolean
If true, treats the first image in fotos as the new cover photo (foto_portada). Defaults to false.

Response 200

{
  "restaurante": { "...": "full restaurante object" },
  "fotosSubidas": [
    {
      "url": "https://res.cloudinary.com/debuta/image/upload/v1/restaurantes/abc.jpg",
      "public_id": "restaurantes/abc"
    }
  ]
}

Error responses

StatusCondition
400Gallery already has 10 photos (non-cover upload).
401Missing or invalid JWT / wrong role.

curl example

PHOTO_B64=$(base64 -w 0 /path/to/restaurant.jpg)

# Upload cover photo
curl -X POST https://api.debuta.app/api/asociado/restaurante/fotos \
  -H "Authorization: Bearer <asociado-token>" \
  -H "Content-Type: application/json" \
  -d "{\"fotos\": \"${PHOTO_B64}\", \"esPortada\": true}"

# Upload multiple gallery photos
curl -X POST https://api.debuta.app/api/asociado/restaurante/fotos \
  -H "Authorization: Bearer <asociado-token>" \
  -H "Content-Type: application/json" \
  -d "{\"fotos\": [\"${PHOTO_B64}\", \"${PHOTO_B64}\"]}"

DELETE /api/asociado/restaurante/fotos/:publicId

Deletes a restaurant photo from both the database and Cloudinary. Works for both cover photos and gallery images. The publicId must be URL-encoded if it contains slashes (e.g. restaurantes%2Fabc). Authentication: Bearer JWT with rol: 'asociado' required.

Path parameters

publicId
string
required
URL-encoded Cloudinary public_id of the photo to delete.

Response 200

Returns the full updated restaurante object.

Error responses

StatusCondition
404Restaurant profile not found, or photo with that public_id does not exist.

curl example

curl -X DELETE \
  "https://api.debuta.app/api/asociado/restaurante/fotos/restaurantes%2Fabc123" \
  -H "Authorization: Bearer <asociado-token>"

PUT /api/asociado/restaurante/menu

Replaces the restaurant’s entire menu array in a single operation. Useful for bulk imports or reordering. The array must not exceed 30 items. Authentication: Bearer JWT with rol: 'asociado' required.

Request body

menu
object[]
required
Full replacement menu array. Each element is a MenuItem:
FieldTypeRequiredDescription
nombrestringDish name
descripcionstringDish description
preciostringPrice label, e.g. "$18.000"

Response 200

Returns the full updated restaurante object.

curl example

curl -X PUT https://api.debuta.app/api/asociado/restaurante/menu \
  -H "Authorization: Bearer <asociado-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "menu": [
      { "nombre": "Burrata con tomate", "descripcion": "Fresh burrata, heirloom tomato, basil oil", "precio": "$28.000" },
      { "nombre": "Pasta al tartufo", "descripcion": "Tagliatelle with black truffle cream", "precio": "$45.000" }
    ]
  }'

POST /api/asociado/restaurante/menu/plato

Adds a single dish to the menu. Optionally accepts a base64 photo for the dish. The menu cannot exceed 30 items; a 400 is returned if the limit is reached. Authentication: Bearer JWT with rol: 'asociado' required.

Request body

nombre
string
required
Dish name. Cannot be blank.
descripcion
string
Description of the dish.
precio
string
Price label (free-form, e.g. "$32.000").
fotoBase64
string
Optional base64-encoded dish photo uploaded to Cloudinary.

Response 200

Returns the full updated restaurante object with the new dish appended to menu.

Error responses

StatusCondition
400nombre is missing or blank.
400Menu already has 30 items.

curl example

curl -X POST https://api.debuta.app/api/asociado/restaurante/menu/plato \
  -H "Authorization: Bearer <asociado-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Tiramisu della casa",
    "descripcion": "House-made tiramisu with espresso and Marsala",
    "precio": "$18.000"
  }'

DELETE /api/asociado/restaurante/menu/:platoId

Removes a single dish from the menu by its MongoDB _id. If the dish has a Cloudinary photo, it is also deleted from Cloudinary. Authentication: Bearer JWT with rol: 'asociado' required.

Path parameters

platoId
string
required
MongoDB ObjectId of the dish to remove (available as _id in the menu array).

Response 200

Returns the full updated restaurante object.

Error responses

StatusCondition
404Restaurant not found, or platoId not in the menu.

curl example

curl -X DELETE \
  "https://api.debuta.app/api/asociado/restaurante/menu/665f4a5b6c7d8e9f0a1b2c3d" \
  -H "Authorization: Bearer <asociado-token>"

GET /api/asociado/citas

Returns a list of confirmed date bookings at the partner’s restaurant. A booking is created when the Debuta matching algorithm recommends the restaurant to a matched couple and both users accept the recommendation. Authentication: Bearer JWT with rol: 'asociado' required.

Response 200

{
  "citas": [
    {
      "matchId": "665f5a6b7c8d9e0f1a2b3c4d",
      "pareja": [
        {
          "_id": "665f000000000000000000aa",
          "first_name": "Sofía",
          "last_name": "Ramírez",
          "username": "sofi.r",
          "profile_picture": { "url": "...", "public_id": "..." }
        },
        {
          "_id": "665f000000000000000000bb",
          "first_name": "Carlos",
          "last_name": "Mendoza",
          "username": "carlos.m",
          "profile_picture": { "url": "...", "public_id": "..." }
        }
      ],
      "fechaSugerida": "2024-06-10",
      "fechaAceptacion": "2024-06-04T15:30:00.000Z",
      "estado": "aceptada"
    }
  ]
}
citas[].matchId
string
ObjectId of the match document.
citas[].pareja
object[]
Array of two populated user objects (the couple).
citas[].fechaSugerida
string
Suggested date string, if one was set during recommendation.
citas[].fechaAceptacion
string
ISO 8601 timestamp of when both users accepted.
citas[].estado
string
Always "aceptada" in this list.

curl example

curl -X GET https://api.debuta.app/api/asociado/citas \
  -H "Authorization: Bearer <asociado-token>"

GET /api/asociado/estadisticas

Returns aggregate engagement statistics for the partner’s restaurant. Authentication: Bearer JWT with rol: 'asociado' required.

Response 200

{
  "estadisticas": {
    "totalCitas": 47,
    "citasMes": 8,
    "citasPendientes": 3
  }
}
estadisticas.totalCitas
number
Total number of confirmed (accepted) date bookings at this restaurant since it joined the platform.
estadisticas.citasMes
number
Confirmed bookings in the current calendar month (resets on the 1st).
estadisticas.citasPendientes
number
Recommendations that have been made but not yet accepted by both users.

curl example

curl -X GET https://api.debuta.app/api/asociado/estadisticas \
  -H "Authorization: Bearer <asociado-token>"

Build docs developers (and LLMs) love