Skip to main content

Overview

The Inscripciones API allows you to manage event registrations in the MTB Backend system. Each registration includes participant information, category, payment details, and Flow payment gateway integration.
This endpoint does NOT support draft and publish functionality. All inscripciones are immediately available once created.

List All Inscripciones

Retrieve a list of all event registrations with optional filtering, sorting, and pagination.

Query Parameters

filters
object
Filter registrations by field values. Example: filters[estadoPago][$eq]=Pagado
sort
string
Sort registrations by field(s). Example: createdAt:desc
pagination[page]
number
default:"1"
Page number for pagination
pagination[pageSize]
number
default:"25"
Number of items per page

Response

data
array
Array of inscripcion objects
meta
object
Pagination metadata

Example Request

curl -X GET "https://api.example.com/api/inscripcions?filters[estadoPago][$eq]=Pagado&sort=createdAt:desc" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": [
    {
      "id": 1,
      "attributes": {
        "nombreCompleto": "Carlos Muñoz",
        "rut": "12345678-9",
        "edad": 28,
        "categoria": "Elite",
        "tipo": "Federado",
        "email": "[email protected]",
        "telefono": "+56912345678",
        "monto": 25000,
        "tokenFlow": "tok_abc123xyz",
        "ordenFlow": "ORD-2024-001",
        "estadoPago": "Pagado",
        "createdAt": "2024-01-20T10:00:00.000Z",
        "updatedAt": "2024-01-20T10:15:00.000Z"
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 25,
      "pageCount": 1,
      "total": 1
    }
  }
}

Get a Single Inscripcion

Retrieve a specific registration by its ID.

Path Parameters

id
number
required
The unique identifier of the registration

Response

data
object
The inscripcion object (see List All Inscripciones for structure)

Example Request

curl -X GET "https://api.example.com/api/inscripcions/1" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": {
    "id": 1,
    "attributes": {
      "nombreCompleto": "Carlos Muñoz",
      "rut": "12345678-9",
      "edad": 28,
      "categoria": "Elite",
      "tipo": "Federado",
      "email": "[email protected]",
      "telefono": "+56912345678",
      "monto": 25000,
      "tokenFlow": "tok_abc123xyz",
      "ordenFlow": "ORD-2024-001",
      "estadoPago": "Pagado",
      "createdAt": "2024-01-20T10:00:00.000Z",
      "updatedAt": "2024-01-20T10:15:00.000Z"
    }
  }
}

Create an Inscripcion

Create a new event registration.

Request Body

data
object
required

Response

data
object
The created inscripcion object

Example Request

curl -X POST "https://api.example.com/api/inscripcions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "nombreCompleto": "Ana Silva",
      "rut": "98765432-1",
      "edad": 25,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56987654321",
      "monto": 20000,
      "estadoPago": "Pendiente"
    }
  }'

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Ana Silva",
      "rut": "98765432-1",
      "edad": 25,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56987654321",
      "monto": 20000,
      "tokenFlow": null,
      "ordenFlow": null,
      "estadoPago": "Pendiente",
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T10:00:00.000Z"
    }
  }
}

Update an Inscripcion

Update an existing registration by its ID. Commonly used to update payment status after processing.

Path Parameters

id
number
required
The unique identifier of the registration to update

Request Body

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

Response

data
object
The updated inscripcion object

Example Request

curl -X PUT "https://api.example.com/api/inscripcions/2" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "data": {
      "estadoPago": "Pagado",
      "tokenFlow": "tok_xyz789abc",
      "ordenFlow": "ORD-2024-002"
    }
  }'

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Ana Silva",
      "rut": "98765432-1",
      "edad": 25,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56987654321",
      "monto": 20000,
      "tokenFlow": "tok_xyz789abc",
      "ordenFlow": "ORD-2024-002",
      "estadoPago": "Pagado",
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T10:30:00.000Z"
    }
  }
}

Delete an Inscripcion

Delete a registration by its ID.

Path Parameters

id
number
required
The unique identifier of the registration to delete

Response

data
object
The deleted inscripcion object

Example Request

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

Example Response

{
  "data": {
    "id": 2,
    "attributes": {
      "nombreCompleto": "Ana Silva",
      "rut": "98765432-1",
      "edad": 25,
      "categoria": "Experto",
      "tipo": "Open",
      "email": "[email protected]",
      "telefono": "+56987654321",
      "monto": 20000,
      "tokenFlow": "tok_xyz789abc",
      "ordenFlow": "ORD-2024-002",
      "estadoPago": "Pagado",
      "createdAt": "2024-01-25T10:00:00.000Z",
      "updatedAt": "2024-01-25T10:30:00.000Z"
    }
  }
}
Important: Deleting a registration is permanent and cannot be undone. Be especially careful with paid registrations. Consider keeping records for accounting purposes.

Payment Status Values

The estadoPago field can have one of the following values:
  • Pendiente (default): Payment is pending
  • Pagado: Payment has been successfully processed
  • Rechazado: Payment was rejected or failed

Build docs developers (and LLMs) love