Skip to main content
Educational programs (ProgramaEducativo) represent longer-form structured curricula offered by the park — distinct from the shorter workshop-style Educational Services. A program has a title, a description, an optional cover image, and an ordered list of curriculum items (ProgramaItem). Items are replaced wholesale on update. The EducationPrograms frontend component renders these programs in the Servicios Educativos page.
No permission classes are configured on ProgramaEducativoViewSet or ProgramaItemViewSet in the current codebase, meaning all endpoints are accessible without authentication. Apply appropriate permissions before deploying to production.

The ProgramaEducativo object

id
integer
Unique identifier for the program.
title
string
Program title (max 100 characters).
description
string
Full description of the program’s goals, target audience, and content.
image
string | null
URL or relative path to the program’s cover image. Stored under the programas/ media directory. null if no image has been uploaded.
items
object[]
Ordered list of curriculum items nested within the program.

List educational programs

GET /api/programas_educativos/
Returns all programs with their nested items. Example response
[
  {
    "id": 1,
    "title": "Guardianes del Océano",
    "description": "Programa de 8 semanas orientado a estudiantes de primaria. Combina visitas guiadas, talleres prácticos y proyectos de investigación marina.",
    "image": "https://api.example.com/media/programas/guardianes_oceano.jpg",
    "items": [
      { "id": 1, "programa": 1, "text": "Introducción a los ecosistemas marinos" },
      { "id": 2, "programa": 1, "text": "Biodiversidad del Pacífico Sur costarricense" },
      { "id": 3, "programa": 1, "text": "Impacto del plástico en los océanos" },
      { "id": 4, "programa": 1, "text": "Proyecto de limpieza de playa" }
    ]
  }
]

Create a program

POST /api/programas_educativos/create/
Items can be created inline with the parent program. On creation, each item in the items array is inserted and linked to the new program.
title
string
required
Program title. Maximum 100 characters.
description
string
required
Full description of the program.
image
file
Optional cover image. Uploaded as multipart/form-data. Stored under programas/.
items
object[]
Optional array of curriculum items to create together with the program.
Example request body
{
  "title": "Exploradores Marinos",
  "description": "Programa de introducción a la biología marina para grupos escolares de secundaria.",
  "items": [
    { "text": "Historia del Parque Marino" },
    { "text": "Especies en peligro de extinción" },
    { "text": "Técnicas de observación subacuática" }
  ]
}
Example response201 Created
{
  "id": 2,
  "title": "Exploradores Marinos",
  "description": "Programa de introducción a la biología marina para grupos escolares de secundaria.",
  "image": null,
  "items": [
    { "id": 5, "programa": 2, "text": "Historia del Parque Marino" },
    { "id": 6, "programa": 2, "text": "Especies en peligro de extinción" },
    { "id": 7, "programa": 2, "text": "Técnicas de observación subacuática" }
  ]
}

Retrieve a program

GET /api/programas_educativos/{id}/detail/
id
integer
required
The numeric ID of the program.

Update a program

PUT /api/programas_educativos/{id}/update/
id
integer
required
The numeric ID of the program to update.
title
string
Updated title.
description
string
Updated description.
image
file
Replacement cover image.
items
object[]
Replacement item list. All existing items are deleted and replaced with the items provided in this array. To preserve existing items, include them in the request.
The update serializer deletes all existing ProgramaItem records for the program before creating the new ones. Partial item updates are not supported — always send the complete desired item list.

Delete a program

DELETE /api/programas_educativos/{id}/delete/
id
integer
required
The numeric ID of the program to delete.
Returns 204 No Content on success. All associated ProgramaItem records are deleted via cascade.

Program Items

Items can also be managed independently via the /items/ sub-endpoints.

The ProgramaItem object

id
integer
Item record ID.
programa
integer
Foreign key to the parent ProgramaEducativo.
text
string
Curriculum item text (max 255 characters).

Item endpoints

MethodEndpointDescription
GET/api/programas_educativos/items/List all items across all programs
POST/api/programas_educativos/items/create/Create a standalone item
GET/api/programas_educativos/items/{id}/detail/Retrieve a single item
PUT/api/programas_educativos/items/{id}/update/Update an item
DELETE/api/programas_educativos/items/{id}/delete/Delete an item
programa
integer
required
ID of the parent program when creating a standalone item.
text
string
required
Item text. Maximum 255 characters.

Build docs developers (and LLMs) love