Skip to main content

Overview

The Inscritos API allows you to manage registered participants in the MTB Backend system. Each inscrito represents a confirmed participant with their details, age, category, and registration type.
This endpoint supports draft and publish functionality. Use the publishedAt field to control publication status.

List All Inscritos

Retrieve a list of all registered participants with optional filtering, sorting, and pagination.

Query Parameters

filters
object
Filter participants by field values. Example: filters[categoria][$eq]=Elite
sort
string
Sort participants by field(s). Example: nombreCompleto:asc
pagination[page]
number
default:"1"
Page number for pagination
pagination[pageSize]
number
default:"25"
Number of items per page

Response

data
array
Array of inscrito objects
meta
object
Pagination metadata

Example Request

curl -X GET "https://api.example.com/api/inscritos?filters[categoria][$eq]=Elite&sort=nombreCompleto:asc" \
  -H "Content-Type: application/json"

Example Response

{
  "data": [
    {
      "id": 1,
      "attributes": {
        "nombreCompleto": "Diego Fernández",
        "rut": "11223344-5",
        "edad": 32,
        "categoria": "Elite",
        "tipo": "Federado",
        "publishedAt": "2024-01-20T10:00:00.000Z",
        "createdAt": "2024-01-20T10:00:00.000Z",
        "updatedAt": "2024-01-20T10:00:00.000Z"
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 25,
      "pageCount": 1,
      "total": 1
    }
  }
}

Get a Single Inscrito

Retrieve a specific registered participant by their ID.

Path Parameters

id
number
required
The unique identifier of the participant

Response

data
object
The inscrito object (see List All Inscritos for structure)

Example Request

curl -X GET "https://api.example.com/api/inscritos/1" \
  -H "Content-Type: application/json"

Example Response

{
  "data": {
    "id": 1,
    "attributes": {
      "nombreCompleto": "Diego Fernández",
      "rut": "11223344-5",
      "edad": 32,
      "categoria": "Elite",
      "tipo": "Federado",
      "publishedAt": "2024-01-20T10:00:00.000Z",
      "createdAt": "2024-01-20T10:00:00.000Z",
      "updatedAt": "2024-01-20T10:00:00.000Z"
    }
  }
}

Create an Inscrito

Create a new registered participant entry.

Request Body

data
object
required

Response

data
object
The created inscrito object

Example Request

curl -X POST "https://api.example.com/api/inscritos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "nombreCompleto": "Laura Rojas",
      "rut": "55667788-9",
      "edad": 27,
      "categoria": "Experto",
      "tipo": "Open"
    }
  }'

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Laura Rojas",
      "rut": "55667788-9",
      "edad": 27,
      "categoria": "Experto",
      "tipo": "Open",
      "publishedAt": null,
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T10:00:00.000Z"
    }
  }
}

Update an Inscrito

Update an existing registered participant by their ID.

Path Parameters

id
number
required
The unique identifier of the participant to update

Request Body

data
object
required
Inscrito fields to update (same structure as Create)

Response

data
object
The updated inscrito object

Example Request

curl -X PUT "https://api.example.com/api/inscritos/2" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "categoria": "Elite",
      "tipo": "Federado"
    }
  }'

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Laura Rojas",
      "rut": "55667788-9",
      "edad": 27,
      "categoria": "Elite",
      "tipo": "Federado",
      "publishedAt": null,
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T11:00:00.000Z"
    }
  }
}

Delete an Inscrito

Delete a registered participant by their ID.

Path Parameters

id
number
required
The unique identifier of the participant to delete

Response

data
object
The deleted inscrito object

Example Request

curl -X DELETE "https://api.example.com/api/inscritos/2" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Laura Rojas",
      "rut": "55667788-9",
      "edad": 27,
      "categoria": "Elite",
      "tipo": "Federado",
      "publishedAt": null,
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T11:00:00.000Z"
    }
  }
}
Important: Deleting a participant record is permanent and cannot be undone. Ensure you have proper backups before performing delete operations.

Categories and Types

Available Categories

The categoria field must be one of the following values:
  • Infantil: Children’s category
  • Experto: Expert level riders
  • Enduro: Enduro discipline
  • Elite: Elite professional level
  • Master A: Master category A
  • Master B: Master category B

Available Types

The tipo field must be one of the following values:
  • Open: Open registration for all participants
  • Federado: Federated/official club members only

Age Validation

The edad field must be between 3 and 99 years old.

Build docs developers (and LLMs) love