This endpoint retrieves the complete sorteo document for a group identified by itsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Sufianeh7/AmigoInvisible/llms.txt
Use this file to discover all available pages before exploring further.
adminToken. The full Mongoose document is returned as-is, including all participant data, the current draw status, and any historical pairing records.
Request
Method:GETURL:
/api/sorteos/:adminTokenBody: None required.
Path Parameters
The UUID returned when the group was created via
POST /api/sorteos. This value uniquely identifies the group in MongoDB and authorises access to its data.Example Request
Response
Status:200 OK
The full Mongoose document is returned. Field descriptions follow the MongoDB schema defined in Sorteo.js.
MongoDB-generated document identifier (ObjectId serialised as a hex string).
Display name of the group, as provided at creation time.
Free-text budget description (e.g.
"20€ - 30€"). May be absent if not provided at creation.Planned gift exchange date in ISO 8601 format. May be absent if not provided at creation.
The group’s admin token — mirrors the value used in the request path.
Current lifecycle status of the group. One of:
"borrador"— the group has been created but the draw has not yet been launched."completado"— the draw has been run and reveal emails have been sent.
Historical record of past draws for this group. Each entry contains:
fechaSorteo— timestamp of when the draw took place.parejas— array of{ de, para }pairing objects (both values are email addresses).
[]) until a draw has been launched and completed.ISO 8601 timestamp of when the document was first saved. Added automatically by Mongoose’s
timestamps option.ISO 8601 timestamp of the most recent document update. Added automatically by Mongoose’s
timestamps option.Example Response
Error Responses
| Status | Scenario | Body |
|---|---|---|
404 | No group found for the supplied adminToken, or the token is malformed | { "error": "Sorteo no encontrado o el enlace es inválido." } |
500 | Unexpected database or server error | { "error": "Error interno del servidor" } |