REST API Endpoint Reference#
The udala.tablon package extends Plone 6's core REST API with a dedicated router at the /@tablon path. This endpoint provides dynamic, language-agnostic access to the Electronic Notice Board, utilizing the Shared UID architecture.
1. Create Document (POST /@tablon)#
Creates a new DocumentoTablon and its associated AcreditedFile children. It orchestrates automatic translation generation if Plone App Multilingual is installed.
Request Body#
The JSON payload uses a dynamic translations dictionary, allowing it to scale to any number of languages or monolingual setups without rigid _eu/_es suffixes.
{
"record_number": "2024/001",
"date_start": "2024-03-01T00:00:00",
"date_end": "2024-03-31T23:59:59",
"origin": "external",
"translations": {
"eu": {
"origin_department": "Kultura Saila",
"origin_details": "Udaletxea",
"description": "Kultur egitarauaren diru-laguntzak",
"publication_url": "https://www.donostia.eus"
},
"es": {
"origin_department": "Departamento de Cultura",
"origin_details": "Ayuntamiento",
"description": "Subvenciones para programas culturales",
"publication_url": "https://www.donostia.eus/es"
}
},
"documents": [
{
"language": null,
"filename": "deialdia_convocatoria.pdf",
"contents": "JVBERi0xLjMKJc...",
"titles": {
"eu": "Deialdia",
"es": "Convocatoria"
}
}
]
}
Responses#
201 Created: Contains the generatedShared UUIDand the absolute physical URLs to the new Plone items. The returned keys (for example,url_eu,url_es,url_en) will dynamically match the language block provided in the payload'stranslationsdictionary.400 Bad Request: Validation errors (for example, missing fields in a specific language block).500 Internal Server Error: NoTabloncontainer found in the system.
3. Get Expired Documents (GET /@tablon-expired)#
Retrieves a list of documents that have expired on a specific date.
Query Parameters#
date: (Optional) An ISO-formatted date string (for example,YYYY-MM-DD). Defaults to the current date if omitted.
Response#
Returns an array of serialized DocumentoTablon JSON objects.