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.

The Reactions API lets users express a reaction to a place using a reaction_type string value. Each reaction links a single user to a single place. You can look up or remove a reaction using either its auto-generated id or the user_id + place_id combination, which is useful when you know the context but not the reaction’s primary key.

GET /api/Reactions

Returns all reactions in the system.

Response

id
integer
Unique identifier for the reaction.
user_id
integer
ID of the user who reacted.
name_user
string
Display name of the user.
place_id
integer
ID of the place that was reacted to.
name_place
string
Display name of the place.
reaction_type
string
The type of reaction (e.g., "like", "love").
reaction_date
string (datetime)
ISO 8601 timestamp of when the reaction was recorded.
curl -X GET https://your-api-host/api/Reactions

GET /api/Reactions/

Returns a single reaction by its ID.

Path parameters

id
integer
required
The unique ID of the reaction to retrieve.

Response

Returns a single Reactions object. See field descriptions under GET /api/Reactions.
curl -X GET https://your-api-host/api/Reactions/15

Error codes

CodeDescription
404No reaction found with the given id.
500Internal server error.

GET /api/Reactions/user//place/

Returns the reaction a specific user recorded for a specific place. Use this endpoint to check whether the current user has already reacted to a place before showing a react button.

Path parameters

userId
integer
required
The ID of the user.
placeId
integer
required
The ID of the place.

Response

Returns a single Reactions object. See field descriptions under GET /api/Reactions.
curl -X GET https://your-api-host/api/Reactions/user/3/place/7

Error codes

CodeDescription
404No reaction found for the given userId and placeId.
500Internal server error.
Use this endpoint to avoid duplicate-reaction UI states: if you get a 404, the user has not yet reacted to that place.

POST /api/Reactions

Records a new reaction from a user on a place.

Request body

user_id
integer
required
ID of the user posting the reaction.
place_id
integer
required
ID of the place being reacted to.
reaction_type
string
required
The reaction value (e.g., "like", "love").

Response

Returns 200 OK with a JSON success message:
{
  "mensaje": "Reacción registrada correctamente."
}
curl -X POST https://your-api-host/api/Reactions \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 3,
    "place_id": 7,
    "reaction_type": "like"
  }'

Error codes

CodeDescription
500Internal server error.

PUT /api/Reactions/

Updates the reaction_type of an existing reaction.

Path parameters

id
integer
required
The ID of the reaction to update.

Request body

reaction_type
string
required
The new reaction value.

Response

Returns 200 OK with a JSON success message:
{
  "mensaje": "Reacción actualizada correctamente."
}
curl -X PUT https://your-api-host/api/Reactions/15 \
  -H "Content-Type: application/json" \
  -d '{
    "reaction_type": "love"
  }'

Error codes

CodeDescription
500Internal server error.

DELETE /api/Reactions/

Deletes a reaction by its ID.

Path parameters

id
integer
required
The ID of the reaction to delete.

Response

Returns 200 OK with a JSON success message:
{
  "mensaje": "Reacción eliminada correctamente."
}
curl -X DELETE https://your-api-host/api/Reactions/15

Error codes

CodeDescription
500Internal server error.

DELETE /api/Reactions/usuario//lugar/

Deletes a reaction identified by the user and place combination. Use this when you know the user and place context but not the reaction’s primary key.

Path parameters

idUsuario
integer
required
The ID of the user whose reaction you want to delete.
idLugar
integer
required
The ID of the place the reaction was recorded on.

Response

Returns 204 No Content on successful deletion.
curl -X DELETE https://your-api-host/api/Reactions/usuario/3/lugar/7

Error codes

CodeDescription
400Database error — could not delete the reaction (e.g., constraint).
500Internal server error.

Build docs developers (and LLMs) love