API overview
Base URL, conventions and errors.
The Avycenna API is a JSON API over HTTPS. The clinic API reference and patient API reference are generated from the same OpenAPI schema the server publishes at /openapi.json.
Base URL
https://api.avycenna.com/api/v1For your own deployment, use its API host.
Conventions
- Send
Content-Type: application/jsonwith request bodies. - Fields are
snake_case; timestamps are ISO 8601 in UTC. - Clinic endpoints that return patient data require an active grant from that patient, and only return the data types it allows.
Errors
Errors return a JSON body with detail:
{ "detail": "No active data grant from this patient" }| Status | Meaning |
|---|---|
| 400 | The request is malformed |
| 401 | Missing or expired credentials. Refresh the access token |
| 403 | Authenticated but not allowed, for example no active grant |
| 404 | Not found, or not visible to you |
| 409 | Conflicts with existing state, for example an invite is already pending |
| 422 | Validation failed; detail lists the fields |
| 503 | A dependency, such as payments, isn't configured on this server |