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"
}
'import requests
url = "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload = { "specialty": "generic" }
headers = {
"x-daai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-daai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({specialty: 'generic'})
};
fetch('https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'specialty' => 'generic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-daai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload := strings.NewReader("{\n \"specialty\": \"generic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-daai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
.header("x-daai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"specialty\": \"generic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-daai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specialty\": \"generic\"\n}"
response = http.request(request)
puts response.read_body{
"id": "s0q0ud3fi1d9kcwjrt8vs50n",
"transcription": "",
"recording": {},
"report": {
"specialty": "generic",
"content": {}
},
"metadata": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Consultation not found",
"error": "Not Found",
"statusCode": 404
}{
"message": [
"specialty must be a string"
],
"error": "Unprocessable Entity",
"statusCode": 422
}Finish consultation
Finishes the consultation and starts audio processing. The specialty can be specified to determine the report template.
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"
}
'import requests
url = "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload = { "specialty": "generic" }
headers = {
"x-daai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-daai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({specialty: 'generic'})
};
fetch('https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'specialty' => 'generic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-daai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload := strings.NewReader("{\n \"specialty\": \"generic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-daai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
.header("x-daai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"specialty\": \"generic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-daai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specialty\": \"generic\"\n}"
response = http.request(request)
puts response.read_body{
"id": "s0q0ud3fi1d9kcwjrt8vs50n",
"transcription": "",
"recording": {},
"report": {
"specialty": "generic",
"content": {}
},
"metadata": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Consultation not found",
"error": "Not Found",
"statusCode": 404
}{
"message": [
"specialty must be a string"
],
"error": "Unprocessable Entity",
"statusCode": 422
}Authorizations
API key for authentication
Body
Consultation specialty. If not provided, will be considered as 'generic'
"generic"
Report schema. If not provided, will be considered the default schema of the specialty or the globally configured one.
- The
schemafield must be a valid JSON Schema, according to the official specification. This ensures that the generated report follows the expected structure. - The
fewShotsfield 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.
Show child attributes
Show child attributes
Response
Consultation finished successfully
Consultation ID
"s0q0ud3fi1d9kcwjrt8vs50n"
Consultation transcription
""
Recording information
{}
Consultation report
Show child attributes
Show child attributes
Consultation metadata
{}