### Error Response Example Source: https://developer.mattilda.io/reference/get_schools-1 Example of an error response, indicating a 'Campus not found' scenario. This schema is used for 404 responses. ```json { "id": 404, "mensaje": "Campus no encontrado" } ``` -------------------------------- ### List Schools Example Source: https://developer.mattilda.io/reference/get_schools-1 Example response for the 'List Institutions' endpoint, showing a single school's details. Requires an API key and a valid 'campusID' header. ```json { "id": "ece47738-dc15-476d-ae00-51422ce0896d", "created_at": "2023-05-02 17:42:52.094186", "updated_at": "2023-05-04 22:31:16.000000", "name": "Colegio mattilda", "status": "active", "country": "México", "state": "Ciudad de México", "municipality": "Cuauhtémoc", "city": "Ciudad de México", "suburb": "Juárez", "address": "Insurgentes 64", "zipcode": 6600 } ``` -------------------------------- ### GET /schools Source: https://developer.mattilda.io/reference/get_schools-1 Endpoint para recuperar la lista de todas las escuelas registradas. ```APIDOC ## GET /schools ### Description Este endpoint permite obtener la lista de todas las escuelas registradas en el sistema. ### Method GET ### Endpoint /schools ``` -------------------------------- ### GET /schools Source: https://developer.mattilda.io/reference/get_schools-1 Retrieves a list of all registered schools within the system. Requires a valid campus ID in the header. ```APIDOC ## GET /schools ### Description This endpoint allows you to obtain the list of all schools registered in the system. ### Method GET ### Endpoint /schools ### Parameters #### Header Parameters - **campusID** (string) - Required - ID of the Campus you wish to work with. ### Response #### Success Response (200) - **id** (string) - Unique identifier of the record - **created_at** (string) - Date and time of record creation - **updated_at** (string) - Date and time of record update - **name** (string) - Name of the school - **status** (string) - Status of the school (e.g., active) - **country** (string) - Country where the school is located - **state** (string) - State where the school is located - **municipality** (string) - Municipality where the school is located - **city** (string) - City where the school is located - **suburb** (string) - Suburb where the school is located - **address** (string) - Street address of the school - **zipcode** (integer) - Zip code of the school's location #### Response Example ```json { "id": "ece47738-dc15-476d-ae00-51422ce0896d", "created_at": "2023-05-02 17:42:52.094186", "updated_at": "2023-05-04 22:31:16.000000", "name": "Colegio mattilda", "status": "active", "country": "México", "state": "Ciudad de México", "municipality": "Cuauhtémoc", "city": "Ciudad de México", "suburb": "Juárez", "address": "Insurgentes 64", "zipcode": 6600 } ``` #### Error Response (404) - **id** (integer) - Error code - **mensaje** (string) - Error message #### Error Response Example ```json { "id": 404, "mensaje": "Campus no encontrado" } ``` ``` -------------------------------- ### OpenAPI 3.1.0 Definition Source: https://developer.mattilda.io/reference/get_schools-1 The complete OpenAPI definition for the mattilda API, version 1.0.0. This file describes the available endpoints, request/response schemas, and server configurations. ```json { "openapi": "3.1.0", "info": { "title": "mattilda API", "description": "![mattilda.io](https://assets.mattilda.io/logo-mattilda.svg)\n\nEsta API está diseñada para facilitar la gestión y administración de una institución educativa sobre la plataforma de mattilda. Proporciona una interfaz programática que permite a los desarrolladores acceder y manipular información relevante para el funcionamiento de la institución, como datos de escuelas, campus, programas académicos, facturas, pagos, registros contables, estudiantes y usuarios.\n\nMediante esta API, la institución educativa puede automatizar tareas administrativas, llevar un seguimiento de sus operaciones financieras, gestionar programas académicos y tener un registro centralizado de estudiantes y usuarios. Los desarrolladores pueden interactuar con la API para crear, actualizar, eliminar y obtener información sobre los distintos elementos de la institución, lo que mejora la eficiencia operativa y brinda una mayor flexibilidad en la integración con otros sistemas y aplicaciones.\n\nEn resumen, esta API se crea con el propósito de simplificar y optimizar la administración de una institución educativa, permitiendo una gestión más efectiva de los procesos clave y facilitando el acceso y manipulación de datos relevantes de manera programática.", "contact": { "name": "Omar Martinez", "email": "omar.martinez@mattilda.io" }, "version": "1.0.0" }, "servers": [ { "url": "https://api.mattilda.school/matti_api/v1", "description": "Devel" }, { "url": "https://api.mattilda.net/matti_api/v1", "description": "Staging" }, { "url": "https://api.mattilda.io/matti_api/v1", "description": "Producción" } ], "tags": [ { "name": "Instituciones", "description": "Instituciones es el nivel más alto de un cliente, englobando una o varias escuelas, colegios, universidades o instituciones educativas dentro de mattilda. A cada `Schools` se le asigna uno o varios *api-key* exclusivos que les otorgan el acceso para consumir los distintos endpoints proporcionados por el API." } ], "paths": { "/schools": { "get": { "tags": [ "Instituciones" ], "summary": "Lista Instituciones", "description": "Este endpoint permite obtener la lista de todas las escuelas registradas en el sistema.", "parameters": [ { "$ref": "#/components/parameters/campusID" } ], "responses": { "200": { "description": "Lista Instituciones", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/schools" } }, "examples": { "200": { "$ref": "#/components/examples/schools" } } } } }, "404": { "$ref": "#/components/schemas/errors" } }, "security": [ { "api_key": [] } ] } } }, "components": { "examples": { "schools": { "summary": "School", "value": { "id": "ece47738-dc15-476d-ae00-51422ce0896d", "created_at": "2023-05-02 17:42:52.094186", "updated_at": "2023-05-04 22:31:16.000000", "name": "Colegio mattilda", "status": "active", "country": "México", "state": "Ciudad de México", "municipality": "Cuauhtémoc", "city": "Ciudad de México", "suburb": "Juárez", "address": "Insurgentes 64", "zipcode": 6600 } }, "error": { "summary": "Error", "value": { "id": 404, "mensaje": "Campus no encontrado" } } }, "parameters": { "campusID": { "in": "header", "required": true, "name": "campusID", "description": "ID del Campus que se desea trabajar.", "schema": { "type": "string", "format": "uuid", "default": "8edbb9ed-b5d3-4270-b2d8-c83255bfefb5" }, "example": "15bf5964-ba9c-4773-8479-6dbce10079ec" } }, "schemas": { "base": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "example": "a12a51c4-3f69-464f-93eb-cc8d355f68b2", "description": "Identificador único del registro" }, "created_at": { "type": "string", "format": "date-time", "example": "2023-09-01 14:44:17.600161", "description": "Fecha y hora de creacion del registro" }, "updated_at": { "type": "string", "format": "date-time", "example": "2023-09-01 14:44:17.600161", "description": "Fecha y hora de última actualización del registro" } } }, "schools": { "allOf": [ { "$ref": "#/components/schemas/base" }, { "type": "object", "properties": { "name": { "type": "string", "example": "Colegio mattilda" }, "status": { "type": "string", "enum": [ "active", "inactive" ], "example": "active" }, "country": { "type": "string", "example": "México" }, "state": { "type": "string", "example": "Ciudad de México" }, "municipality": { "type": "string", "example": "Cuauhtémoc" }, "city": { "type": "string", "example": "Ciudad de México" }, "suburb": { "type": "string", "example": "Juárez" }, "address": { "type": "string", "example": "Insurgentes 64" }, "zipcode": { "type": "integer", "example": 6600 } } } ] }, "errors": { "type": "object", "properties": { "id": { "type": "integer", "example": 404 }, "mensaje": { "type": "string", "example": "Campus no encontrado" } } } } } } ``` -------------------------------- ### School Data Model Source: https://developer.mattilda.io/reference/get_schools-1 Defines the structure of school objects including name, status, and geographical address information. ```APIDOC ## School Object ### Description Represents an institution or group of institutions with associated location data. ### Properties - **name** (string) - Name of the institution or group. - **status** (string) - Status of the record (active, deleted). - **country** (string) - Country of the address. - **state** (string) - State or federal entity of the address. - **municipality** (string) - Municipality of the address. - **city** (string) - City or locality of the address. - **suburb** (string) - Neighborhood or suburb of the address. - **address** (string) - Full physical or postal address. - **zipcode** (string) - Postal code associated with the address. ``` -------------------------------- ### Error Handling Source: https://developer.mattilda.io/reference/get_schools-1 Standard error response format for the API. ```APIDOC ## Error Response ### Description Standardized error format returned when a request fails. ### Response #### Error Response (404) - **errors** (array of strings) - A list of error messages. ``` -------------------------------- ### Campus ID Header Parameter Source: https://developer.mattilda.io/reference/get_schools-1 Header parameter for specifying the Campus ID. This is required for most requests to identify the target campus. ```json { "in": "header", "required": true, "name": "campusID", "description": "ID del Campus que se desea trabajar.", "schema": { "type": "string", "format": "uuid", "default": "8edbb9ed-b5d3-4270-b2d8-c83255bfefb5" }, "example": "15bf5964-ba9c-4773-8479-6dbce10079ec" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.