Skip to main content
POST
/
consultations
/
v2
/
{DAAI_CONSULTATION_ID}
/
recordings
/
{DAAI_RECORDING_ID}
/
finish
Finish consultation
curl --request POST \
  --url https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish \
  --header 'Content-Type: application/json' \
  --header 'x-daai-api-key: <api-key>' \
  --data '{
  "specialty": "generic",
  "reportSchema": {
    "instructions": "The report should be written in Brazilian Portuguese and should contain patient information, consultation details and diagnosis.",
    "schema": {
      "type": "object",
      "required": [
        "<string>"
      ],
      "properties": {},
      "additionalProperties": true
    },
    "fewShots": "[{\"foo\":1,\"bar\":\"test\"},{\"foo\":2,\"bar\":\"test2\"}]"
  }
}'
{
  "id": "s0q0ud3fi1d9kcwjrt8vs50n",
  "transcription": "",
  "recording": {},
  "report": {
    "specialty": "generic",
    "content": {}
  },
  "metadata": {}
}

Authorizations

x-daai-api-key
string
header
required

API key for authentication

Path Parameters

DAAI_CONSULTATION_ID
string
required
DAAI_RECORDING_ID
string
required

Body

application/json
specialty
string
default:generic

Consultation specialty. If not provided, will be considered as 'generic'

Example:

"generic"

reportSchema
object

Report schema. If not provided, will be considered the default schema of the specialty or the globally configured one.

  • The schema field must be a valid JSON Schema, according to the official specification. This ensures that the generated report follows the expected structure.
  • The fewShots field must contain examples that satisfy the defined schema.

Tip: You can test and validate the custom report configuration directly in the backoffice, in the transformation tab in the application settings. This way, you can experiment with different schemas and examples before applying them in production.

Response

Consultation finished successfully

id
string
required

Consultation ID

Example:

"s0q0ud3fi1d9kcwjrt8vs50n"

transcription
string
required

Consultation transcription

Example:

""

recording
object
required

Recording information

Example:
{}
report
object
required

Consultation report

metadata
object
required

Consultation metadata

Example:
{}
I