Create a consultation
POST/telehealth/consultations
Creates a questionnaire consultation for one of the provider's patients. The submission passes the create gates in order — questionnaire exists, the pinned version is current, the questionnaire is applicable to the patient, the answers are structurally valid and not disqualifying, and the patient's identity is satisfied (an uploaded ID document, or a prior doctor-verified identity carried forward). On success the consultation is queued pending for a doctor. The provider is resolved from the API key; a providerId in the body is never trusted.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 500
Successful response
The request input failed validation. payload.issues lists the offending paths when the failure is schema-level; otherwise payload.message carries the reason.
Missing or invalid API key.
The provider exists but is not active.
The addressed resource does not exist.
The pinned questionnaireVersion is no longer the approved version. Re-fetch the questionnaire and re-render.
QuestionnaireNotApplicable: This questionnaire cannot be submitted for this patient yet (e.g. a follow-up before any completed consultation).
DisqualifyingAnswer: An answer disqualifies the patient from the requested treatment type; the consultation is rejected without a doctor.
IdentityRequired: No ID document was supplied and the patient has no prior doctor-verified identity.
IdentityDocumentNotFound: A referenced identity document is unknown or belongs to another patient.
IdentityDocumentIncomplete: A referenced identity document exists but its upload never completed.
An unexpected error occurred. payload.id is a correlation id for support.