Avycenna

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/v1

For your own deployment, use its API host.

Conventions

  • Send Content-Type: application/json with 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" }
StatusMeaning
400The request is malformed
401Missing or expired credentials. Refresh the access token
403Authenticated but not allowed, for example no active grant
404Not found, or not visible to you
409Conflicts with existing state, for example an invite is already pending
422Validation failed; detail lists the fields
503A dependency, such as payments, isn't configured on this server

On this page