{"openapi":"3.1.0","info":{"title":"EdTools Client API","version":"1.0.0","description":"Stable server-to-server API for tenant-owned EdTools integrations. Public docs disable the playground; use your own secure client or Postman workspace for real tokens."},"servers":[{"url":"https://app.edtools.co/api/client","description":"Production"},{"url":"http://localhost:3000/api/client","description":"Local development"}],"tags":[{"name":"Client API","description":"Identity and token introspection."},{"name":"Students","description":"Student reads, writes and external-id sync."},{"name":"Admissions","description":"Admission applications, pipeline statuses and contacts."},{"name":"Payments","description":"Payment and obligation reads, writes and external-id sync."},{"name":"Programs","description":"Current academic program catalog."},{"name":"Courses","description":"Current academic course catalog."},{"name":"Forms","description":"Read-only form templates and submissions."},{"name":"Vault","description":"Document types, documents, requirements and requests."}],"security":[{"bearerAuth":[]}],"x-edtools-scopeCatalog":[{"scope":"students:read","status":"active","kind":"read","resource":"students","label":"Leer estudiantes","description":"Consulta estudiantes y sus campos públicos de integración."},{"scope":"students:write","status":"active","kind":"write","resource":"students","label":"Escribir estudiantes","description":"Crea, actualiza y sincroniza estudiantes cuando el SoR lo permite."},{"scope":"admissions:read","status":"active","kind":"read","resource":"admissions","label":"Leer admisiones","description":"Consulta postulaciones y estados del pipeline de admisiones."},{"scope":"admissions:write","status":"active","kind":"write","resource":"admissions","label":"Escribir admisiones","description":"Crea, actualiza y vincula contactos a postulaciones cuando el SoR lo permite."},{"scope":"payments:read","status":"active","kind":"read","resource":"payments","label":"Leer pagos","description":"Consulta pagos y obligaciones del tenant."},{"scope":"payments:write","status":"active","kind":"write","resource":"payments","label":"Escribir pagos","description":"Crea, actualiza y sincroniza pagos cuando el SoR lo permite."},{"scope":"programs:read","status":"active","kind":"read","resource":"programs","label":"Leer programas","description":"Consulta el catalogo actual de programas academicos."},{"scope":"courses:read","status":"active","kind":"read","resource":"courses","label":"Leer cursos","description":"Consulta el catalogo actual de cursos academicos."},{"scope":"vault:read","status":"active","kind":"read","resource":"vault","label":"Leer Vault","description":"Consulta documentos, tipos, requisitos y solicitudes documentales."},{"scope":"vault:write","status":"active","kind":"write","resource":"vault","label":"Escribir Vault","description":"Crea cargas, enlaces y solicitudes documentales de Vault."},{"scope":"forms:read","status":"active","kind":"read","resource":"forms","label":"Leer formularios","description":"Consulta plantillas y respuestas de formularios del tenant."},{"scope":"forms:write","status":"reserved","kind":"write","resource":"forms","label":"Escribir formularios","description":"Reservado para endpoints write de Forms en una fase futura."}],"x-edtools-endpointCatalog":[{"id":"me.get","resource":"identity","resourceLabel":"Identidad","method":"GET","path":"/me","description":"Confirma tenant, scopes, dominios maestro y rate limit del token.","kind":"read","scope":null,"sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations"]},{"id":"students.list","resource":"students","resourceLabel":"Estudiantes","method":"GET","path":"/students","description":"Lista estudiantes del tenant.","kind":"read","scope":"students:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_students"]},{"id":"students.get","resource":"students","resourceLabel":"Estudiantes","method":"GET","path":"/students/{id}","description":"Consulta un estudiante por id interno.","kind":"read","scope":"students:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_students"]},{"id":"students.create","resource":"students","resourceLabel":"Estudiantes","method":"POST","path":"/students","description":"Crea un estudiante.","kind":"write","scope":"students:write","sorDomain":"students","idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_students"]},{"id":"students.patch","resource":"students","resourceLabel":"Estudiantes","method":"PATCH","path":"/students/{id}","description":"Actualiza campos de un estudiante.","kind":"write","scope":"students:write","sorDomain":"students","idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_students"]},{"id":"students.upsertExternal","resource":"students","resourceLabel":"Estudiantes","method":"PUT","path":"/students/external/{externalId}","description":"Crea o actualiza un estudiante por externalId.","kind":"write","scope":"students:write","sorDomain":"students","idempotency":"natural","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_students"]},{"id":"admissions.pipeline.statuses.list","resource":"admissions","resourceLabel":"Admisiones","method":"GET","path":"/admissions/pipeline/statuses","description":"Lista estados configurados del pipeline de admisiones.","kind":"read","scope":"admissions:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.list","resource":"admissions","resourceLabel":"Admisiones","method":"GET","path":"/admissions/applications","description":"Lista postulaciones de admisión.","kind":"read","scope":"admissions:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.get","resource":"admissions","resourceLabel":"Admisiones","method":"GET","path":"/admissions/applications/{id}","description":"Consulta una postulación por id interno.","kind":"read","scope":"admissions:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.create","resource":"admissions","resourceLabel":"Admisiones","method":"POST","path":"/admissions/applications","description":"Crea una postulación.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.patch","resource":"admissions","resourceLabel":"Admisiones","method":"PATCH","path":"/admissions/applications/{id}","description":"Actualiza campos de una postulación.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.contacts.create","resource":"admissions","resourceLabel":"Admisiones","method":"POST","path":"/admissions/applications/{id}/contacts","description":"Vincula un contacto canónico a una postulación.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.contacts.patch","resource":"admissions","resourceLabel":"Admisiones","method":"PATCH","path":"/admissions/applications/{id}/contacts/{linkId}","description":"Actualiza el contexto de un contacto vinculado a una postulación.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.contacts.delete","resource":"admissions","resourceLabel":"Admisiones","method":"DELETE","path":"/admissions/applications/{id}/contacts/{linkId}","description":"Elimina el vínculo de un contacto con una postulación.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"admissions.upsertExternal","resource":"admissions","resourceLabel":"Admisiones","method":"PUT","path":"/admissions/applications/external/{externalId}","description":"Crea o actualiza una postulación por externalId.","kind":"write","scope":"admissions:write","sorDomain":"enrollment","idempotency":"natural","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_admissions"]},{"id":"payments.list","resource":"payments","resourceLabel":"Pagos","method":"GET","path":"/payments","description":"Lista pagos y obligaciones.","kind":"read","scope":"payments:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_payments"]},{"id":"payments.get","resource":"payments","resourceLabel":"Pagos","method":"GET","path":"/payments/{id}","description":"Consulta un pago por id interno.","kind":"read","scope":"payments:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_payments"]},{"id":"payments.create","resource":"payments","resourceLabel":"Pagos","method":"POST","path":"/payments","description":"Crea un pago u obligación.","kind":"write","scope":"payments:write","sorDomain":"payments","idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_payments"]},{"id":"payments.patch","resource":"payments","resourceLabel":"Pagos","method":"PATCH","path":"/payments/{id}","description":"Actualiza campos de un pago.","kind":"write","scope":"payments:write","sorDomain":"payments","idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_payments"]},{"id":"payments.upsertExternal","resource":"payments","resourceLabel":"Pagos","method":"PUT","path":"/payments/external/{externalId}","description":"Crea o actualiza un pago por externalId.","kind":"write","scope":"payments:write","sorDomain":"payments","idempotency":"natural","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_payments"]},{"id":"programs.list","resource":"programs","resourceLabel":"Programas","method":"GET","path":"/programs","description":"Lista programas académicos.","kind":"read","scope":"programs:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_programs"]},{"id":"programs.get","resource":"programs","resourceLabel":"Programas","method":"GET","path":"/programs/{id}","description":"Consulta un programa académico.","kind":"read","scope":"programs:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_programs"]},{"id":"courses.list","resource":"courses","resourceLabel":"Cursos","method":"GET","path":"/courses","description":"Lista cursos académicos.","kind":"read","scope":"courses:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_courses"]},{"id":"courses.get","resource":"courses","resourceLabel":"Cursos","method":"GET","path":"/courses/{id}","description":"Consulta un curso académico.","kind":"read","scope":"courses:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"platform_integrations","requiredModules":["platform_integrations","staff_courses"]},{"id":"vault.documentTypes.list","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/document-types","description":"Lista tipos documentales activos de Vault.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.list","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/documents","description":"Lista documentos de Vault.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.get","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/documents/{id}","description":"Consulta un documento de Vault.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.createUploadIntent","resource":"vault","resourceLabel":"Vault","method":"POST","path":"/vault/documents/upload-intents","description":"Crea un documento y una URL firmada de carga.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.refreshUploadUrl","resource":"vault","resourceLabel":"Vault","method":"POST","path":"/vault/documents/{documentId}/versions/{versionId}/upload-url","description":"Regenera una URL firmada de carga para una versión pendiente.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.completeUpload","resource":"vault","resourceLabel":"Vault","method":"POST","path":"/vault/documents/{documentId}/versions/{versionId}/complete","description":"Completa una carga validando el archivo en storage.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"natural","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.download","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/documents/{id}/download","description":"Genera una URL firmada temporal para preview o descarga.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.patch","resource":"vault","resourceLabel":"Vault","method":"PATCH","path":"/vault/documents/{id}","description":"Actualiza metadata y estado básico de un documento.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.documents.link","resource":"vault","resourceLabel":"Vault","method":"POST","path":"/vault/documents/{id}/links","description":"Enlaza un documento a estudiante o postulación.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requirementProfiles.list","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/requirement-profiles","description":"Lista perfiles documentales activos de Vault.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requirements.get","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/requirements","description":"Consulta requisitos documentales de una entidad.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requests.list","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/requests","description":"Lista solicitudes documentales.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requests.get","resource":"vault","resourceLabel":"Vault","method":"GET","path":"/vault/requests/{id}","description":"Consulta una solicitud documental.","kind":"read","scope":"vault:read","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requests.create","resource":"vault","resourceLabel":"Vault","method":"POST","path":"/vault/requests","description":"Crea una solicitud documental pública.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"required","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"vault.requests.patch","resource":"vault","resourceLabel":"Vault","method":"PATCH","path":"/vault/requests/{id}","description":"Revoca o ajusta expiración de una solicitud documental.","kind":"write","scope":"vault:write","sorDomain":null,"idempotency":"none","supportsPagination":false,"supportsUpdatedSince":false,"moduleId":"staff_vault","requiredModules":["platform_integrations","staff_vault"]},{"id":"forms.templates.list","resource":"forms","resourceLabel":"Formularios","method":"GET","path":"/forms/templates","description":"Lista plantillas de formularios del tenant.","kind":"read","scope":"forms:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"staff_forms","requiredModules":["platform_integrations","staff_forms"]},{"id":"forms.submissions.list","resource":"forms","resourceLabel":"Formularios","method":"GET","path":"/forms/submissions","description":"Lista respuestas de formularios filtradas por plantilla o entidad.","kind":"read","scope":"forms:read","sorDomain":null,"idempotency":"none","supportsPagination":true,"supportsUpdatedSince":true,"moduleId":"staff_forms","requiredModules":["platform_integrations","staff_forms"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"EdTools service token"}},"schemas":{},"parameters":{}},"paths":{"/v1/me":{"get":{"tags":["Client API"],"responses":{"200":{"description":"Current token and tenant context","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenant":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"apiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"masterDomains":{"type":"array","items":{"type":"string"}},"rateLimit":{"type":"object","properties":{"requestsPerMinute":{"type":"number"}},"required":["requestsPerMinute"]}},"required":["id","name","scopes","masterDomains","rateLimit"]},"productAccess":{"type":"object","properties":{"enabledModules":{"type":"array","items":{"type":"string"}},"sorByDomain":{"type":"object","additionalProperties":{"type":"string"}}},"required":["enabledModules","sorByDomain"]}},"required":["tenant","apiKey","productAccess"]}},"required":["data"]}}}}}}},"/v1/payments":{"get":{"tags":["Payments"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","enum":["pending","paid","overdue","cancelled","refunded"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"studentId","in":"query"}],"responses":{"200":{"description":"List payments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentCode":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"},"stripePaymentIntentId":{"type":"string","nullable":true},"dueDate":{"type":"string"},"paidAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentId","studentName","studentCode","amount","currency","status","description","stripePaymentIntentId","dueDate","paidAt","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}},"post":{"tags":["Payments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":160},"studentId":{"type":"string","format":"uuid"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000000},"currency":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Za-z]{3}$","default":"USD"},"description":{"type":"string","minLength":1,"maxLength":2000},"dueDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","paid","overdue","cancelled","refunded"],"default":"pending"},"paidAt":{"type":"string","nullable":true}},"required":["studentId","amount","description","dueDate"]}}}},"responses":{"201":{"description":"Created payment","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentCode":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"},"stripePaymentIntentId":{"type":"string","nullable":true},"dueDate":{"type":"string"},"paidAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentId","studentName","studentCode","amount","currency","status","description","stripePaymentIntentId","dueDate","paidAt","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/payments/{id}":{"get":{"tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Payment detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentCode":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"},"stripePaymentIntentId":{"type":"string","nullable":true},"dueDate":{"type":"string"},"paidAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentId","studentName","studentCode","amount","currency","status","description","stripePaymentIntentId","dueDate","paidAt","createdAt","updatedAt"]}},"required":["data"]}}}}}},"patch":{"tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000000},"currency":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Za-z]{3}$"},"status":{"type":"string","enum":["pending","paid","overdue","cancelled","refunded"]},"description":{"type":"string","minLength":1,"maxLength":2000},"dueDate":{"type":"string","nullable":true},"paidAt":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"Updated payment","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentCode":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"},"stripePaymentIntentId":{"type":"string","nullable":true},"dueDate":{"type":"string"},"paidAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentId","studentName","studentCode","amount","currency","status","description","stripePaymentIntentId","dueDate","paidAt","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/admissions/applications/{id}/contacts":{"post":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}}}}},"responses":{"201":{"description":"Linked contact to admission application","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/admissions/applications/{id}/contacts/{linkId}":{"patch":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"linkId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"nullable":true}}}}}}},"responses":{"200":{"description":"Updated admission application contact link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}},"delete":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"linkId","in":"path"}],"responses":{"200":{"description":"Deleted admission application contact link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/payments/external/{externalId}":{"put":{"tags":["Payments"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":160},"required":true,"name":"externalId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"studentId":{"type":"string","format":"uuid"},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":1000000000000},"currency":{"type":"string","minLength":3,"maxLength":3,"pattern":"^[A-Za-z]{3}$","default":"USD"},"description":{"type":"string","minLength":1,"maxLength":2000},"dueDate":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","paid","overdue","cancelled","refunded"],"default":"pending"},"paidAt":{"type":"string","nullable":true}},"required":["studentId","amount","description","dueDate"]}}}},"responses":{"200":{"description":"Upserted payment","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentId":{"type":"string","format":"uuid"},"studentName":{"type":"string"},"studentCode":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"description":{"type":"string"},"stripePaymentIntentId":{"type":"string","nullable":true},"dueDate":{"type":"string"},"paidAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentId","studentName","studentCode","amount","currency","status","description","stripePaymentIntentId","dueDate","paidAt","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/programs":{"get":{"tags":["Programs"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"}],"responses":{"200":{"description":"List programs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}}},"/v1/programs/{id}":{"get":{"tags":["Programs"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Program detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/courses":{"get":{"tags":["Courses"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","enum":["draft","published","archived"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List courses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string"},"status":{"type":"string"},"teacherId":{"type":"string","nullable":true,"format":"uuid"},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","code","status","teacherId","startDate","endDate","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}}},"/v1/courses/{id}":{"get":{"tags":["Courses"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Course detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string"},"status":{"type":"string"},"teacherId":{"type":"string","nullable":true,"format":"uuid"},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","code","status","teacherId","startDate","endDate","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/admissions/pipeline/statuses":{"get":{"tags":["Admissions"],"responses":{"200":{"description":"List admission pipeline statuses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"},"orderIndex":{"type":"number"},"kanbanGroup":{"type":"string"},"isActive":{"type":"boolean"},"isDefault":{"type":"boolean"},"createsStudentOnEnter":{"type":"boolean"}},"required":["key","label","color","orderIndex","kanbanGroup","isActive","isDefault","createsStudentOnEnter"]}}},"required":["data"]}}}}}}},"/v1/admissions/applications":{"get":{"tags":["Admissions"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List admission applications","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}},"post":{"tags":["Admissions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":160},"givenNames":{"type":"string","minLength":1,"maxLength":255},"familyNames":{"type":"string","minLength":1,"maxLength":255},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string","maxLength":255,"default":""},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]}]},"phone":{"type":"string","maxLength":40},"country":{"type":"string","minLength":1,"maxLength":100},"stateProvince":{"anyOf":[{"type":"string","maxLength":100},{"type":"string","enum":[""]}]},"city":{"type":"string","minLength":1,"maxLength":100},"address":{"anyOf":[{"type":"string","maxLength":2000},{"type":"string","enum":[""]}]},"academicYear":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"academicPeriod":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"primaryContact":{"type":"object","nullable":true,"properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"contacts":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"maxItems":10}},"required":["givenNames","familyNames","country","city"]}}}},"responses":{"201":{"description":"Created admission application","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/admissions/applications/{id}":{"get":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Admission application detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}},"patch":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"givenNames":{"type":"string","minLength":1,"maxLength":255},"familyNames":{"type":"string","minLength":1,"maxLength":255},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string","maxLength":255,"default":""},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]}]},"phone":{"type":"string","maxLength":40},"country":{"type":"string","minLength":1,"maxLength":100},"stateProvince":{"anyOf":[{"type":"string","maxLength":100},{"type":"string","enum":[""]}]},"city":{"type":"string","minLength":1,"maxLength":100},"address":{"anyOf":[{"type":"string","maxLength":2000},{"type":"string","enum":[""]}]},"academicYear":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"academicPeriod":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"primaryContact":{"type":"object","nullable":true,"properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"contacts":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"maxItems":10}}}}}},"responses":{"200":{"description":"Updated admission application","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/admissions/applications/external/{externalId}":{"put":{"tags":["Admissions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":160},"required":true,"name":"externalId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"givenNames":{"type":"string","minLength":1,"maxLength":255},"familyNames":{"type":"string","minLength":1,"maxLength":255},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string","maxLength":255,"default":""},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]}]},"phone":{"type":"string","maxLength":40},"country":{"type":"string","minLength":1,"maxLength":100},"stateProvince":{"anyOf":[{"type":"string","maxLength":100},{"type":"string","enum":[""]}]},"city":{"type":"string","minLength":1,"maxLength":100},"address":{"anyOf":[{"type":"string","maxLength":2000},{"type":"string","enum":[""]}]},"academicYear":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"academicPeriod":{"anyOf":[{"type":"string","maxLength":50},{"type":"string","enum":[""]}]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"primaryContact":{"type":"object","nullable":true,"properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"contacts":{"type":"array","items":{"type":"object","properties":{"contactId":{"type":"string","nullable":true,"format":"uuid"},"displayName":{"type":"string","nullable":true,"maxLength":255},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","enum":[""]},{"nullable":true}]},"phone":{"type":"string","nullable":true,"maxLength":40},"role":{"type":"string","nullable":true,"enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true,"maxLength":120},"isPrimary":{"type":"boolean","nullable":true},"source":{"type":"string","nullable":true,"enum":["manual","import","api","whatsapp","form","system"]},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}}}},"maxItems":10}},"required":["givenNames","familyNames","country","city"]}}}},"responses":{"200":{"description":"Upserted admission application","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"applicationCode":{"type":"string"},"fullName":{"type":"string"},"programId":{"type":"string","nullable":true,"format":"uuid"},"program":{"type":"string"},"programRef":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"educationLevel":{"type":"string"},"organizationProfile":{"type":"string"},"status":{"type":"string"}},"required":["id","name","educationLevel","organizationProfile","status"]},"status":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"givenNames":{"type":"string","nullable":true},"familyNames":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"stateProvince":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"academicYear":{"type":"string","nullable":true},"academicPeriod":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"studentId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"primaryContact":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["applicant","primary_contact","family","emergency","billing","other"]},"relationshipLabel":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"source":{"type":"string","enum":["manual","import","api","whatsapp","form","system"]},"displayName":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","contactId","role","relationshipLabel","isPrimary","source","displayName","email","phone","metadata","createdAt","updatedAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","applicationCode","fullName","programId","program","programRef","status","givenNames","familyNames","email","phone","country","stateProvince","city","address","academicYear","academicPeriod","photoUrl","studentId","contactId","primaryContact","contacts","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/students":{"get":{"tags":["Students"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string"},"required":false,"name":"grade","in":"query"},{"schema":{"type":"string"},"required":false,"name":"section","in":"query"}],"responses":{"200":{"description":"List students","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentCode":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grade":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"guardianName":{"type":"string","nullable":true},"guardianEmail":{"type":"string","nullable":true},"guardianPhone":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentCode","name","email","grade","section","guardianName","guardianEmail","guardianPhone","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}},"post":{"tags":["Students"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":160},"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1,"maxLength":255},"studentCode":{"type":"string","minLength":1,"maxLength":50},"grade":{"type":"string","maxLength":50},"section":{"type":"string","maxLength":50},"guardianName":{"type":"string","maxLength":255},"guardianEmail":{"type":"string","format":"email"},"guardianPhone":{"type":"string","maxLength":20}},"required":["email","name","studentCode"]}}}},"responses":{"201":{"description":"Created student","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentCode":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grade":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"guardianName":{"type":"string","nullable":true},"guardianEmail":{"type":"string","nullable":true},"guardianPhone":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentCode","name","email","grade","section","guardianName","guardianEmail","guardianPhone","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/students/{id}":{"get":{"tags":["Students"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Student detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentCode":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grade":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"guardianName":{"type":"string","nullable":true},"guardianEmail":{"type":"string","nullable":true},"guardianPhone":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentCode","name","email","grade","section","guardianName","guardianEmail","guardianPhone","createdAt","updatedAt"]}},"required":["data"]}}}}}},"patch":{"tags":["Students"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":80},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1,"maxLength":255},"studentCode":{"type":"string","minLength":1,"maxLength":50},"grade":{"type":"string","maxLength":50},"section":{"type":"string","maxLength":50},"guardianName":{"type":"string","maxLength":255},"guardianEmail":{"type":"string","format":"email"},"guardianPhone":{"type":"string","maxLength":20}}}}}},"responses":{"200":{"description":"Updated student","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentCode":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grade":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"guardianName":{"type":"string","nullable":true},"guardianEmail":{"type":"string","nullable":true},"guardianPhone":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentCode","name","email","grade","section","guardianName","guardianEmail","guardianPhone","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/students/external/{externalId}":{"put":{"tags":["Students"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":160},"required":true,"name":"externalId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1,"maxLength":255},"studentCode":{"type":"string","minLength":1,"maxLength":50},"grade":{"type":"string","maxLength":50},"section":{"type":"string","maxLength":50},"guardianName":{"type":"string","maxLength":255},"guardianEmail":{"type":"string","format":"email"},"guardianPhone":{"type":"string","maxLength":20}},"required":["email","name","studentCode"]}}}},"responses":{"200":{"description":"Upserted student","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"studentCode":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grade":{"type":"string","nullable":true},"section":{"type":"string","nullable":true},"guardianName":{"type":"string","nullable":true},"guardianEmail":{"type":"string","nullable":true},"guardianPhone":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","externalId","studentCode","name","email","grade","section","guardianName","guardianEmail","guardianPhone","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/forms/templates":{"get":{"tags":["Forms"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"}],"responses":{"200":{"description":"Form templates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published","archived"]},"entityScope":{"type":"string","enum":["standalone","admission_application","student","contact","appointment","pqrs_case"]},"categoryId":{"type":"string","nullable":true,"format":"uuid"},"currentVersionId":{"type":"string","nullable":true,"format":"uuid"},"summaryQuestionIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","slug","status","entityScope","categoryId","currentVersionId","summaryQuestionIds","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}}},"/v1/forms/submissions":{"get":{"tags":["Forms"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"templateId","in":"query"},{"schema":{"type":"string","enum":["standalone","admission_application","student","contact","appointment","pqrs_case"]},"required":false,"name":"entityKind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"entityId","in":"query"}],"responses":{"200":{"description":"Form submissions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"templateId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"},"entityKind":{"type":"string","enum":["standalone","admission_application","student","contact","appointment","pqrs_case"]},"entityId":{"type":"string","nullable":true,"format":"uuid"},"submittedViaPublic":{"type":"boolean"},"status":{"type":"string","enum":["draft","submitted"]},"submittedAt":{"type":"string","nullable":true},"submitterMetadata":{"type":"object","additionalProperties":{"nullable":true}},"answers":{"type":"object","additionalProperties":{"nullable":true}},"createdAt":{"type":"string"}},"required":["id","templateId","versionId","entityKind","entityId","submittedViaPublic","status","submittedAt","submitterMetadata","answers","createdAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}}},"/v1/vault/document-types":{"get":{"tags":["Vault"],"responses":{"200":{"description":"Vault document types","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"isDefault":{"type":"boolean"},"active":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","key","name","description","category","isDefault","active","sortOrder","createdAt","updatedAt"]}}},"required":["data"]}}}}}}},"/v1/vault/requirement-profiles":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","enum":["student","admission_application"]},"required":true,"name":"entityKind","in":"query"}],"responses":{"200":{"description":"Vault requirement profiles","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"sortOrder":{"type":"number"},"entityKind":{"type":"string","enum":["student","admission_application"]},"isDefault":{"type":"boolean"},"assignedToEntity":{"type":"boolean"},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"label":{"type":"string"},"subjectRole":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"required":{"type":"boolean"},"active":{"type":"boolean"},"instructions":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"documentType":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true}},"required":["id","key","name","description","category"]}},"required":["id","required","active","instructions","sortOrder","documentType"]}}},"required":["id","key","label","subjectRole","sortOrder","items"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","key","name","description","active","sortOrder","entityKind","isDefault","groups","createdAt","updatedAt"]}}},"required":["data"]}}}}}}},"/v1/vault/requests":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","enum":["open","completed","revoked","expired"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["active","archived","all"],"default":"active"},"required":false,"name":"archive","in":"query"},{"schema":{"type":"string","enum":["student","admission_application"]},"required":false,"name":"entityKind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"entityId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"entityExternalId","in":"query"}],"responses":{"200":{"description":"Vault document requests","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityKind":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"entityLabel":{"type":"string"},"entitySubtitle":{"type":"string","nullable":true},"entityPath":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string"},"requesterName":{"type":"string","nullable":true},"requesterEmail":{"type":"string","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedByUserId":{"type":"string","nullable":true,"format":"uuid"},"openedAt":{"type":"string","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"subtitle":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true},"profileName":{"type":"string","nullable":true},"profileKey":{"type":"string","nullable":true},"sortOrder":{"type":"number"}},"required":["key","label","subtitle","profileId","profileName","profileKey","sortOrder"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"itemCount":{"type":"number"},"completedItemCount":{"type":"number"},"progress":{"nullable":true}},"required":["id","entityKind","entityId","entityLabel","entitySubtitle","entityPath","profileId","contactId","title","requesterName","requesterEmail","status","expiresAt","revokedAt","completedAt","archivedAt","archivedByUserId","openedAt","lastActivityAt","subjects","createdAt","updatedAt","itemCount","completedItemCount"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}},"post":{"tags":["Vault"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profileId":{"type":"string","nullable":true,"format":"uuid"},"templateId":{"type":"string","nullable":true,"format":"uuid"},"assignProfileToEntity":{"type":"boolean"},"title":{"type":"string","maxLength":255},"requesterName":{"type":"string","nullable":true,"maxLength":255},"requesterEmail":{"type":"string","nullable":true,"maxLength":320,"format":"email"},"documentTypeIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":255},"subtitle":{"type":"string","nullable":true,"maxLength":255},"profileId":{"type":"string","format":"uuid"}},"required":["key","label","profileId"]},"maxItems":8},"expiresInDays":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":60},"entityKind":{"type":"string","enum":["student","admission_application"]},"entityId":{"type":"string","format":"uuid"},"entityExternalId":{"type":"string","minLength":1,"maxLength":160}},"required":["entityKind"]}}}},"responses":{"201":{"description":"Created Vault document request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityKind":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"entityLabel":{"type":"string"},"entitySubtitle":{"type":"string","nullable":true},"entityPath":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string"},"requesterName":{"type":"string","nullable":true},"requesterEmail":{"type":"string","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedByUserId":{"type":"string","nullable":true,"format":"uuid"},"openedAt":{"type":"string","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"subtitle":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true},"profileName":{"type":"string","nullable":true},"profileKey":{"type":"string","nullable":true},"sortOrder":{"type":"number"}},"required":["key","label","subtitle","profileId","profileName","profileKey","sortOrder"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","entityKind","entityId","entityLabel","entitySubtitle","entityPath","profileId","contactId","title","requesterName","requesterEmail","status","expiresAt","revokedAt","completedAt","archivedAt","archivedByUserId","openedAt","lastActivityAt","subjects","createdAt","updatedAt"]},"publicUrl":{"type":"string"},"expiresAt":{"type":"string"}},"required":["request","publicUrl","expiresAt"]}},"required":["data"]}}}}}}},"/v1/vault/requests/{id}":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Vault document request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityKind":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"entityLabel":{"type":"string"},"entitySubtitle":{"type":"string","nullable":true},"entityPath":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string"},"requesterName":{"type":"string","nullable":true},"requesterEmail":{"type":"string","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedByUserId":{"type":"string","nullable":true,"format":"uuid"},"openedAt":{"type":"string","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"subtitle":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true},"profileName":{"type":"string","nullable":true},"profileKey":{"type":"string","nullable":true},"sortOrder":{"type":"number"}},"required":["key","label","subtitle","profileId","profileName","profileKey","sortOrder"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","entityKind","entityId","entityLabel","entitySubtitle","entityPath","profileId","contactId","title","requesterName","requesterEmail","status","expiresAt","revokedAt","completedAt","archivedAt","archivedByUserId","openedAt","lastActivityAt","subjects","createdAt","updatedAt"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"documentId":{"type":"string","nullable":true,"format":"uuid"},"documentTitle":{"type":"string","nullable":true},"groupKey":{"type":"string","nullable":true},"groupLabel":{"type":"string","nullable":true},"subjectRole":{"type":"string","nullable":true},"label":{"type":"string"},"description":{"type":"string","nullable":true},"required":{"type":"boolean"},"status":{"type":"string"},"rejectionReason":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","documentTypeId","documentTypeName","documentId","documentTitle","groupKey","groupLabel","subjectRole","label","description","required","status","rejectionReason","sortOrder","createdAt","updatedAt"]}}},"required":["request","items"]}},"required":["data"]}}}}}},"patch":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"revoke":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Updated Vault document request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entityKind":{"type":"string"},"entityId":{"type":"string","format":"uuid"},"entityLabel":{"type":"string"},"entitySubtitle":{"type":"string","nullable":true},"entityPath":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true,"format":"uuid"},"contactId":{"type":"string","nullable":true,"format":"uuid"},"title":{"type":"string"},"requesterName":{"type":"string","nullable":true},"requesterEmail":{"type":"string","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedByUserId":{"type":"string","nullable":true,"format":"uuid"},"openedAt":{"type":"string","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"subjects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"subtitle":{"type":"string","nullable":true},"profileId":{"type":"string","nullable":true},"profileName":{"type":"string","nullable":true},"profileKey":{"type":"string","nullable":true},"sortOrder":{"type":"number"}},"required":["key","label","subtitle","profileId","profileName","profileKey","sortOrder"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","entityKind","entityId","entityLabel","entitySubtitle","entityPath","profileId","contactId","title","requesterName","requesterEmail","status","expiresAt","revokedAt","completedAt","archivedAt","archivedByUserId","openedAt","lastActivityAt","subjects","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/vault/documents/{documentId}/versions/{versionId}/upload-url":{"post":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"documentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Refreshed signed upload URL","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresAt":{"type":"string"}},"required":["url","method","headers","expiresAt"]}},"required":["data"]}}}}}}},"/v1/vault/documents/{documentId}/versions/{versionId}/complete":{"post":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"documentId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Completed Vault upload","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/vault/documents/{id}/download":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["inline","attachment"]},"required":false,"name":"disposition","in":"query"}],"responses":{"200":{"description":"Signed Vault download URL","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]}},"required":["data"]}}}}}}},"/v1/vault/documents/{id}":{"patch":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string","enum":["received","in_review","approved","rejected","archived"]},"rejectionReason":{"type":"string","nullable":true,"maxLength":4000}}}}}},"responses":{"200":{"description":"Updated Vault document","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]}},"required":["data"]}}}}}},"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Vault document","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/vault/documents/{id}/links":{"post":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityKind":{"type":"string","enum":["student","admission_application"]},"entityId":{"type":"string","format":"uuid"},"entityExternalId":{"type":"string","minLength":1,"maxLength":160}},"required":["entityKind"]}}}},"responses":{"200":{"description":"Linked Vault document","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]}},"required":["data"]}}}}}}},"/v1/vault/requirements":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"string","enum":["student","admission_application"]},"required":true,"name":"entityKind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"entityId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"entityExternalId","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"profileId","in":"query"}],"responses":{"200":{"description":"Vault requirements for an entity","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entityKind":{"type":"string"},"entityId":{"type":"string"},"profile":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"active":{"type":"boolean"},"sortOrder":{"type":"number"},"entityKind":{"type":"string","enum":["student","admission_application"]},"isDefault":{"type":"boolean"},"assignedToEntity":{"type":"boolean"},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"label":{"type":"string"},"subjectRole":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"required":{"type":"boolean"},"active":{"type":"boolean"},"instructions":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"documentType":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true}},"required":["id","key","name","description","category"]}},"required":["id","required","active","instructions","sortOrder","documentType"]}}},"required":["id","key","label","subjectRole","sortOrder","items"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","key","name","description","active","sortOrder","entityKind","isDefault","groups","createdAt","updatedAt"]},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"label":{"type":"string"},"subjectRole":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"required":{"type":"boolean"},"active":{"type":"boolean"},"instructions":{"type":"string","nullable":true},"sortOrder":{"type":"number"},"documentType":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true}},"required":["id","key","name","description","category"]}},"required":["id","required","active","instructions","sortOrder","documentType"]}}},"required":["id","key","label","subjectRole","sortOrder","items"]}},"items":{"type":"array","items":{"nullable":true}}},"required":["entityKind","entityId","profile","groups","items"]}},"required":["data"]}}}}}}},"/v1/vault/documents":{"get":{"tags":["Vault"],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updatedSince","in":"query"},{"schema":{"type":"string","enum":["received","in_review","approved","rejected","expired","archived"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"documentTypeId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["student","admission_application"]},"required":false,"name":"entityKind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"entityId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"entityExternalId","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"expiresBefore","in":"query"}],"responses":{"200":{"description":"Vault documents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"page":{"type":"number"},"limit":{"type":"number"},"total":{"type":"number"},"totalPages":{"type":"number"}},"required":["page","limit","total","totalPages"]}},"required":["data","pagination"]}}}}}}},"/v1/vault/documents/upload-intents":{"post":{"tags":["Vault"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":255},"documentTypeId":{"type":"string","format":"uuid"},"originalFileName":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string","minLength":1,"maxLength":127},"sizeBytes":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":52428800},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"entityKind":{"type":"string","enum":["student","admission_application"]},"entityId":{"type":"string","format":"uuid"},"entityExternalId":{"type":"string","minLength":1,"maxLength":160}},"required":["originalFileName","mimeType","sizeBytes"]}}}},"responses":{"201":{"description":"Created Vault upload intent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"},"documentTypeId":{"type":"string","nullable":true,"format":"uuid"},"documentTypeName":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"rejectionReason":{"type":"string","nullable":true},"deletedAt":{"type":"string","nullable":true},"deletedByUserId":{"type":"string","nullable":true,"format":"uuid"},"deletedByUserName":{"type":"string","nullable":true},"deletedReason":{"type":"string","nullable":true},"currentVersion":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"originalFileName":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadStatus":{"type":"string"},"textExtractionStatus":{"type":"string"},"searchIndexStatus":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","originalFileName","mimeType","sizeBytes","uploadStatus","textExtractionStatus","searchIndexStatus","createdAt"]},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]}},"primaryLink":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"entityKind":{"type":"string"},"entityId":{"type":"string"},"label":{"type":"string"},"path":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","entityKind","entityId","label","path","createdAt"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","source","documentTypeId","documentTypeName","expiresAt","rejectionReason","deletedAt","deletedByUserId","deletedByUserName","deletedReason","currentVersion","links","primaryLink","createdAt","updatedAt"]},"documentId":{"type":"string","format":"uuid"},"versionId":{"type":"string","format":"uuid"},"storageProvider":{"type":"string"},"upload":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresAt":{"type":"string"}},"required":["url","method","headers","expiresAt"]}},"required":["document","documentId","versionId","storageProvider","upload"]}},"required":["data"]}}}}}}}}}