Unfortunately, the Heidi API and Widget are no longer available for future integrations in Australia and New Zealand. If you are a current Heidi customer looking to integrate, reach out to your Customer Success representative. Otherwise, contact our team to find out what this means for you.
Heidi API
Consult notes

Consult notes

Generate Consult Note

Method: POST

Path: /sessions/{session_id}/consult-note

Description: Generates a consult note using a Heidi template.

Request

POST /sessions/1234567890/consult-note
Authorization: Bearer <your_token>
Content-Type: application/json
 
{
  "generation_method":"TEMPLATE",
  "addition":"",
  "template_id":"659b8042fe093d6592b41ef7",
  "voice_style":"GOLDILOCKS",
  "brain":"LEFT"
}

Request Fields:

  • generation_method (string, required): How to generate the note. Typical partner value is TEMPLATE. Accepted values: TEMPLATE, THIRD_PARTY_TEMPLATE, DICTATION, AUTO_MODE.
  • template_id (string, optional): The ID of the template to use. Required when generation_method is TEMPLATE. Mutually exclusive with third_party_template.
  • third_party_template (string, optional): Third-party template JSON. Mutually exclusive with template_id.
  • addition (string, optional): Extra text to include in generation. Defaults to "".
  • voice_style (string, required): One of GOLDILOCKS, DETAILED, BRIEF, SUPER_DETAILED, MY_VOICE. Refer to the Heidi documentation (opens in a new tab) for more information on voice styles.
  • brain (string, optional): LEFT or RIGHT. If omitted, Heidi uses the linked user's saved preference. Refer to the Heidi documentation (opens in a new tab) for more information on brain options.
  • content_type (string, optional): MARKDOWN or HTML.

Response

This endpoint will return a stream of the generated consult note, in the format:

{
  "data": "Consult note text..."
}

Generate Consult Note with a Custom Template

Method: POST

Path: /sessions/{session_id}/client-customised-template/response

Description: Generates a consult note using a custom JSON template. Note: you will need to generate a free text note using a template before you can generate a structured note using a template.

Request

POST /sessions/1234567890/client-customised-template/response
Authorization: Bearer <your_token>
Content-Type: application/json
 
{
  ...JSON template content
}

Response

This endpoint will return a template JSON response.


Edit the latest consult note

Method: PATCH

Path: /sessions/{session_id}/consult-note

Description: Updates the latest consult note for the session (for example after the clinician edits the generated text).

Request

PATCH /sessions/1234567890/consult-note
Authorization: Bearer <your_token>
Content-Type: application/json
 
{
  "edited_note": "Updated consult note text..."
}

Request Fields:

All fields are optional. Only include the fields you want to change.

  • edited_note (string, optional): Replacement note text.
  • voice_style (string, optional): Voice style.
  • generation_method (string, optional): One of TEMPLATE, THIRD_PARTY_TEMPLATE, DICTATION, AUTO_MODE.
  • brain (string, optional): LEFT or RIGHT.
  • template_id (string, optional): Template ID.
  • content_type (string, optional): MARKDOWN or HTML.

Response

{
  "consult_note": {
    "status": "COMPLETED",
    "result": "Updated consult note text...",
    "heading": "Note",
    "brain": "LEFT",
    "voice_style": "GOLDILOCKS",
    "generation_method": "TEMPLATE",
    "template_id": "659b8042fe093d6592b41ef7"
  },
  "total_replacement_count": 0
}