Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jparra-amell/api_solsql/llms.txt

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

Photos are attached to places. Each photo record stores the ID of the place it belongs to, a URL pointing to the image, and an optional description. You can retrieve all photos for a place in one request using the place/{p_place_id} route.

Endpoints

GET /api/Photos

Returns all photos in the system.
curl -X GET https://your-api-host/api/Photos
Response — 200 OK
[
  {
    "photo_id": 1,
    "place_id": 42,
    "url": "https://example.com/photos/plaza-mayor.jpg",
    "description": "Main square at sunset"
  }
]
photo_id
integer
Unique identifier for the photo.
place_id
integer
ID of the place this photo is attached to.
url
string
Public URL of the image.
description
string
Optional human-readable caption for the photo.

GET /api/Photos/

Returns a single photo by its ID.

Path parameters

id
integer
required
The photo_id of the photo to retrieve.
curl -X GET https://your-api-host/api/Photos/1
Response — 200 OK
{
  "photo_id": 1,
  "place_id": 42,
  "url": "https://example.com/photos/plaza-mayor.jpg",
  "description": "Main square at sunset"
}
Response — 404 Not Found
{ "message": "La foto no existe" }
Response — 500 Internal Server Error
{ "message": "Error al obtener la foto", "detail": "<error message>" }

GET /api/Photos/place/

Returns all photos attached to a specific place.

Path parameters

p_place_id
integer
required
The ID of the place whose photos you want to retrieve.
curl -X GET https://your-api-host/api/Photos/place/42
Response — 200 OK
[
  {
    "photo_id": 1,
    "place_id": 42,
    "url": "https://example.com/photos/plaza-mayor.jpg",
    "description": "Main square at sunset"
  },
  {
    "photo_id": 2,
    "place_id": 42,
    "url": "https://example.com/photos/plaza-mayor-night.jpg",
    "description": "Night view"
  }
]
Response — 404 Not Found Returned when no photos exist for the given place.
"No hay fotos para este lugar."

POST /api/Photos

Creates a new photo record attached to a place.

Request body

place_id
integer
required
The ID of the place this photo belongs to.
url
string
required
The public URL of the image.
description
string
An optional caption or description for the photo.
curl -X POST https://your-api-host/api/Photos \
  -H "Content-Type: application/json" \
  -d '{
    "place_id": 42,
    "url": "https://example.com/photos/plaza-mayor.jpg",
    "description": "Main square at sunset"
  }'
Response — 200 OK
{ "message": "Successfully inserted registration." }

PUT /api/Photos/

Updates the URL and description of an existing photo. The place_id is not updated.

Path parameters

id
integer
required
The photo_id of the photo to update.

Request body

url
string
required
The new URL for the image.
description
string
The updated caption or description.
curl -X PUT https://your-api-host/api/Photos/1 \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/photos/plaza-mayor-hd.jpg",
    "description": "Main square at golden hour"
  }'
Response — 200 OK
{ "message": "Successfully updated registration." }

DELETE /api/Photos/

Deletes a photo by its ID.

Path parameters

id
integer
required
The photo_id of the photo to delete.
curl -X DELETE https://your-api-host/api/Photos/1
Response — 204 No Content The photo was deleted successfully. No response body is returned. Response — 404 Not Found
{ "message": "La foto no existe" }
Response — 500 Internal Server Error
{ "message": "Error interno del servidor", "detail": "<error message>" }

Error codes

StatusMeaning
200Request succeeded.
204Photo deleted successfully (no body).
404The requested photo or place has no photos.
500A server or database error occurred. The response body contains message and detail fields.

Build docs developers (and LLMs) love