Ovianta Developers

Errors

How to say no, and what Ovianta does with it.

Answer any status from 400 up when you cannot do what Ovianta asked. The action fails, and the agent tells the patient it could not be done.

Error body

Include this body with every error. It is optional, but without a code Ovianta cannot tell an expected refusal from a failure of your system.

Prop

Type

{
  "error": {
    "code": "SLOT_NOT_AVAILABLE",
    "message": "That slot was taken a moment ago."
  }
}

Expected refusals

Some answers are a normal outcome, not a failure of your system. Ovianta counts them apart, so they never look like your integration is down. Use these codes for them:

  • APPOINTMENT_PREVIOUSLY_CANCELLED
  • APPOINTMENT_ALREADY_CANCELLED
  • APPOINTMENT_NOT_FOUND

APPOINTMENT_NOT_FOUND with a 404 is the right answer when Ovianta confirms or cancels an appointment you no longer have.

Patient not found

GET /patients?nif= has three accepted ways to say the patient does not exist. Ovianta reads all three the same way, and the agent offers to register the patient:

  • 404, with or without a body.
  • 204 No Content.
  • 200 with an empty object, {}.

Optional endpoints

Answer 404 to GET /appointments/range if you do not implement it. Ovianta then calls GET /appointments?date= once per day instead.

Responses Ovianta cannot read

When a 2xx response is missing a required field, or a field has the wrong type, Ovianta rejects the whole response and the action fails as if your API had failed. The documented optional fields are the exception: they can be null or absent.

On this page