Generate clinical note from summary


Generates a clinical note based on a summary that can be generated with the Generate consultation summary endpoint.

Below we will describe the entire process that allows the successful completion of clinical note generation starting from a summary.

Request description

Endpoint: /api/v1/generate-clinical-note-from-summary
Method: POST

Remember: you can see the URL to consume this API in the Introduction section.

{
  "Content-Type": "application/json",
  "Authorization": "Bearer <accessToken>"
}

Authorization: We'll pass the token obtained during the authentication process. You can reuse the generated tokens, as they have a 2-hour lifespan. Review this page: Credentials

To set the API version on a specific request, you can add a specific header named X-Invox-Medical-Api-Version with the value of the version you are targeting:

X-Invox-Medical-Api-Version: 2026-03-01

Payload structure

type IRegenerateConsultationSummaryPayload = {
  template: IAPITemplate;
  summary: string;
  language?: VALID_GENERATE_REPORT_LANGUAGES;
};

type VALID_GENERATE_REPORT_LANGUAGES = "es" | "en" | "ca" | "pt-BR" | "pt-PT";

interface IAPITemplate {
  id: string;
  template_name: string;
  template_description: string;
  template_language: string;
  fields: APITemplateField[];
}

interface APITemplateField {
  id: string;
  name: string;
  description: string;
  type: "string" | "number" | "array" | "boolean" | "enum";
  enumerableOptions?: string[];
  value: string | string[] | number | boolean;
}

For more details related to the template structure, using the following link: JSON Schema

Responses

Correct response

Successful request

Describe the characteristics of a satisfactory response

200

Response example:

{
  "clinicalNote": [
    {
      "id": "398DC0DF-DBC2-48A1-B8A6-8C1736AEAA43",
      "name": "Diagnosis",
      "description": "Diagnosis",
      "type": "string",
      "value": "Patient diagnosed with acute bronchitis, likely viral in origin, based on clinical presentation and absence of bacterial infection indicators."
    },
    {
      "id": "398DC0DF-DBC2-48A1-B8A6-8C1736AEAA44",
      "name": "Treatment Plan",
      "description": "Treatment Plan",
      "type": "string",
      "value": "Recommend supportive care including rest, hydration, and over-the-counter analgesics. Advise against antibiotic use unless symptoms worsen or fail to improve in 7-10 days."
    }
  ],
  "generationTime": 6.52
}
Response structure
interface IRegenerateConsultationSummaryResponse {
  clinicalNote: IAPIField[];
  generationTime: number;
}

Wrong responses

Unauthorized request

Describes the response when the request is not authorized


401

Response body

type RegenerateConsultationSummaryResponseType = {
  messsage: string;
  errorType?: string;
};


Forbidden request

Describes the response when the API Key is not allowed to consume this service


403

Response body

type RegenerateConsultationSummaryResponseType = {
  messsage: string;
  errorType?: string;
};

Remember that to consume this service, the API Key must have the permission: CONSULTATION-SUMMARY

Bad request

Describe the features of a bad request

400

Response body

type RegenerateConsultationSummaryResponseType = {
    messsage: string;
    errorType: REGENERATE_CONSULTATION_SUMMARY_ERROR_TYPE;
}

enum REGENERATE_CONSULTATION_SUMMARY_ERROR_TYPE {
    REQUIRED_SUMMARY= 'summaryIsRequired'
    REQUIRED_TEMPLATE = 'templateIsRequired',
    INVALID_TEMPLATE = 'invalidTemplate',
    LANGUAGE_ERROR = 'invalidLanguage'
}