Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/gestor-backend/llms.txt

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

Notices are news articles and announcements published within a tournament event. Each notice is linked to a specific event and can include a title, written content, author attribution, images, and video. They are the primary way tournament organizers communicate updates, results, and highlights to participants and spectators. All write operations — registering, updating, and removing notices — require a valid JWT passed in the access-token header. Listing endpoints are fully public and require no authentication.

Notice Object

The following fields are returned whenever a notice object appears in an API response.
_id
string
Unique MongoDB ObjectId for the notice.
event
object
The tournament event this notice belongs to.
title
string
Headline of the notice.
content
string
Full body text of the notice.
author
string
Display name of the notice author.
noticeImg
array of strings
List of image URLs hosted on Google Cloud Storage attached to the notice.
videoUrl
array of strings
List of video file URLs or external video links attached to the notice.
createdAt
string (ISO 8601)
Timestamp when the notice was first created.
updatedAt
string (ISO 8601)
Timestamp of the most recent update to the notice.

POST /api/notice/register-notice/:eventId

Creates a new notice and links it to the specified tournament event. Accepts multipart/form-data to support image and video file uploads alongside the text fields. Auth: Token required
eventId
string
required
ObjectId of the event this notice should be published under.
title
string
required
Headline for the notice.
content
string
required
Full body text of the notice.
author
string
required
Display name of the person or entity publishing the notice.
noticeImg
file
One or more image files to attach to the notice. Uploaded to Google Cloud Storage.
videoUrl
file or string
A video file to upload, or a URL string pointing to an external video resource.
curl -X POST "https://api.example.com/api/notice/register-notice/64a1f2c3e4b09d3a1c8e7f00" \
  -H "access-token: <jwt_token>" \
  -F "title=Semifinal Results" \
  -F "content=Team A defeated Team B 3-1 in a thrilling semifinal match." \
  -F "author=Tournament Staff" \
  -F "noticeImg=@/path/to/match-photo.jpg" \
  -F "videoUrl=@/path/to/highlight-reel.mp4"
status
boolean
true when the notice was successfully created.
notice
object
The full newly created notice object. See Notice Object for field details.

POST /api/notice/update-notice/:noticeId

Updates an existing notice. Only the original author of the notice may perform this action. All fields are optional — only the fields included in the request will be updated. Auth: Token required (author only)
noticeId
string
required
ObjectId of the notice to update.
title
string
New headline for the notice. Omit to leave unchanged.
content
string
Updated body text. Omit to leave unchanged.
noticeImg
file
Replacement image file(s) for the notice.
videoUrl
file or string
Replacement video file or external video URL.
Only the author who originally created the notice is authorized to update it. Requests from other authenticated users will be rejected.
curl -X POST "https://api.example.com/api/notice/update-notice/64b3c9a1e4b09d3a1c8e7f22" \
  -H "access-token: <jwt_token>" \
  -F "title=Semifinal Results — Updated" \
  -F "content=Corrected score: Team A defeated Team B 3-2 after extra time." \
  -F "noticeImg=@/path/to/updated-photo.jpg"
status
boolean
true when the notice was successfully updated.
notice
object
The updated notice object. See Notice Object for field details.

POST /api/notice/remove-notice/:noticeId

Permanently deletes a notice by its ID. Only the author who created the notice may delete it. Auth: Token required (author only)
noticeId
string
required
ObjectId of the notice to delete.
This action is irreversible. The notice and all associated metadata will be permanently removed.
curl -X POST "https://api.example.com/api/notice/remove-notice/64b3c9a1e4b09d3a1c8e7f22" \
  -H "access-token: <jwt_token>"
status
boolean
true when the notice was successfully deleted.

POST /api/notice/list-notice/:eventId/:pag?/:perpage?

Returns a paginated list of notices published under a specific tournament event. Only notices belonging to active events are included in results. Auth: None
This endpoint only returns notices for events where stade is true. Notices linked to inactive or archived events are excluded from results.
eventId
string
required
ObjectId of the event whose notices should be listed.
pag
number
Page number to retrieve. Defaults to 1 if omitted.
perpage
number
Number of notices to return per page. Defaults to the server’s configured page size if omitted.
curl -X POST "https://api.example.com/api/notice/list-notice/64a1f2c3e4b09d3a1c8e7f00/1/10"
# Without pagination (uses defaults)
curl -X POST "https://api.example.com/api/notice/list-notice/64a1f2c3e4b09d3a1c8e7f00"
status
boolean
true when the request was processed successfully.
data
array of objects
List of notice objects for the specified event. See Notice Object for field details.
pagination
object
Pagination metadata for the result set.

POST /api/notice/list-notice-id/:noticeId

Retrieves a single notice by its unique ID. No authentication or event context is required. Auth: None
noticeId
string
required
ObjectId of the notice to retrieve.
curl -X POST "https://api.example.com/api/notice/list-notice-id/64b3c9a1e4b09d3a1c8e7f22"
status
boolean
true when a matching notice was found and returned.
notice
object
The requested notice object. See Notice Object for field details.

POST /api/notice/list-notice-home/:pag?/:perpage?

Returns a blended, paginated feed of notices suitable for display on a frontend home page. The response combines the most recently published notices with a random selection to provide editorial variety without requiring the caller to specify an event. Auth: None
Use this endpoint to populate a homepage or dashboard feed. Because it mixes recent and random notices across all active events, it is ideal for discovery — no event filter needed.
pag
number
Page number to retrieve. Defaults to 1 if omitted.
perpage
number
Number of notices to return per page. Defaults to the server’s configured page size if omitted.
curl -X POST "https://api.example.com/api/notice/list-notice-home/1/12"
# Without pagination (uses defaults)
curl -X POST "https://api.example.com/api/notice/list-notice-home"
The home feed blends two result sets: the most recently created notices and a randomly sampled subset. Duplicate entries are deduplicated before the page is returned, so every notice in the response is unique.
status
boolean
true when the feed was successfully assembled.
data
array of objects
Mixed list of recent and random notice objects. See Notice Object for field details.
pagination
object
Pagination metadata for the home feed result set.

Build docs developers (and LLMs) love