Skip to main content

API Reference

The obeliOmed REST API exposes contract endpoints for external integrations, ObelioPortalWeb (patient portal), and future mobile clients.

Interactive reference (Swagger UI) → /docs/api/reference/obeliomed-api


Tools & auto-generation

The API reference is generated automatically on each merge to develop in any plugin repo. The CI pipeline (.github/workflows/auto-gen.yml) runs:

ToolOutputSource
swagger-phpOpenAPI YAML + interactive Swagger UI#[OA\*] annotations in plugin Controllers
phpDocumentorPHP class / method HTML referencePHPDoc on every public class and method
schemaspy (XML)DB schema Markdown (tables, columns, FKs)Table/*.xml from each plugin
MermaidER diagrams inlineAuto-rendered via @docusaurus/theme-mermaid

Authentication

All endpoints require a valid FacturaScripts API token:

GET /api/patients HTTP/1.1
X-FS-Token: <your-token>

Or HTTP Basic Auth with username:token.

Generate tokens in FacturaScripts → Admin → Users → API Token.


Base URL

EnvironmentURL
Productionhttps://docs.obeliomed.com/api
Local XAMPP devhttp://localhost/FacturaScripts/api/3

Conventions

  • Multi-tenant: every request is scoped to the company (idEmpresa) carried by the token — no extra parameter needed.
  • Clinic center: pass codalmacen to scope to a specific center within the company.
  • Versioning: CalVer YYMMDD.NN — breaking changes get a new path prefix (/v2/). Current version returned in X-obeliomed-Version response header.
  • Pagination: offset + limit parameters; response includes meta.total.
  • Partial updates: PATCH endpoints accept only the fields you want to change.
  • Legal guardian: when patient.requires_legal_guardian = true, communication endpoints target the guardian contact by default.

Coverage

PluginEndpointsStatus
ObelioCore (patients)GET/POST /patients, GET/PATCH /patients/{id}✅ Spec live
ObelioSchedulingGET/POST /appointments, GET/PATCH /appointments/{id}, POST /appointments/{id}/checkin✅ Spec live
ObelioCommsPOST /comms/send✅ Spec live
ObelioAuditGET /audit/events✅ Spec live
ObelioDocs/documents/*🔜 Sprint 2 auto-gen
ObelioConsents/consents/*🔜 Sprint 2 auto-gen
ObelioOphthalmology/clinical/*🔜 Sprint 2 auto-gen