# Get an asynchronous note generation

```
GET 
/generate-note-async/:id
```

Poll the status —and results if successful— of an asynchronous note generation.

## Request[​](#request "Direct link to request")

## Responses[​](#responses "Direct link to Responses")

* 200

The asynchronous note generation details.

## Operation spec

```json
{
  "method": "get",
  "path": "/generate-note-async/{id}",
  "operationId": "get-generate-note-async",
  "parameters": [
    {
      "name": "id",
      "description": "The id of the asynchronous request.",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "description": "A unique identifier.",
        "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
        "title": "uuid"
      },
      "example": "23A9981B-9E46-4ADB-BB0B-8E406C624540"
    }
  ],
  "responses": {
    "200": {
      "description": "The asynchronous note generation details.",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "title": "ONGOING",
                "type": "object",
                "properties": {
                  "id": {
                    "description": "The id of the asynchronous request.",
                    "type": "string",
                    "format": "uuid",
                    "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                    "title": "uuid"
                  },
                  "client_request_id": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                    "title": "client_request_id"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ONGOING",
                      "FAILED",
                      "SUCCEEDED"
                    ],
                    "title": "async_request_status"
                  }
                },
                "required": [
                  "id",
                  "status"
                ]
              },
              {
                "title": "FAILED",
                "type": "object",
                "properties": {
                  "id": {
                    "description": "The id of the asynchronous request.",
                    "type": "string",
                    "format": "uuid",
                    "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                    "title": "uuid"
                  },
                  "client_request_id": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                    "title": "client_request_id"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ONGOING",
                      "FAILED",
                      "SUCCEEDED"
                    ],
                    "title": "async_request_status"
                  },
                  "payload": {
                    "type": "object",
                    "properties": {
                      "error_code": {
                        "type": "integer",
                        "example": 422
                      },
                      "error_message": {
                        "type": "string",
                        "example": "We can't generate the note when the transcript is too short."
                      }
                    },
                    "required": [
                      "error_code"
                    ],
                    "title": "async_request_failed_payload"
                  }
                },
                "required": [
                  "id",
                  "status",
                  "payload"
                ]
              },
              {
                "title": "SUCCEEDED",
                "type": "object",
                "properties": {
                  "id": {
                    "description": "The id of the asynchronous request.",
                    "type": "string",
                    "format": "uuid",
                    "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                    "title": "uuid"
                  },
                  "client_request_id": {
                    "type": "string",
                    "maxLength": 128,
                    "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                    "title": "client_request_id"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ONGOING",
                      "FAILED",
                      "SUCCEEDED"
                    ],
                    "title": "async_request_status"
                  },
                  "payload": {
                    "type": "object",
                    "description": "The generated note.",
                    "required": [
                      "note"
                    ],
                    "properties": {
                      "note": {
                        "type": "object",
                        "description": "The generated note.",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Title of the note.",
                            "example": "Fever and strong headache"
                          },
                          "sections": {
                            "type": "array",
                            "description": "Content of the note structured in multiple sections.",
                            "items": {
                              "type": "object",
                              "description": "A note section.",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "A key identifying a section of a note.\nThe set of possible keys depend on the template that is used. Check [Note template](/core-api/guides/note-templates/note-templates-sections) for possible values.",
                                  "example": "CHIEF_COMPLAINT",
                                  "enum": [
                                    "ALLERGIES",
                                    "APPOINTMENTS",
                                    "ASSESSMENT",
                                    "ASSESSMENT_AND_PLAN",
                                    "CARDIOVASCULAR_RISK_FACTORS",
                                    "CHIEF_COMPLAINT",
                                    "CURRENT_MEDICATIONS",
                                    "DIAGNOSTIC_TESTS_ORDERED",
                                    "FOOD_HABITS",
                                    "LIFESTYLE",
                                    "PAST_MEDICAL_HISTORY",
                                    "OBJECTIVES_AND_ADVICE",
                                    "FAMILY_HISTORY",
                                    "HISTORY_OF_PRESENT_ILLNESS",
                                    "IMAGING_RESULTS",
                                    "IMMUNIZATIONS",
                                    "LAB_RESULTS",
                                    "MENTAL_HEALTH_EXAM",
                                    "MENTAL_HEALTH_HISTORY",
                                    "PAST_OBSTETRIC_HISTORY",
                                    "PAST_SURGICAL_HISTORY",
                                    "PHYSICAL_EXAM",
                                    "PLAN",
                                    "PRESCRIPTION",
                                    "HISTORY_OF_PRESENT_COMPLAINT",
                                    "OBJECTIVE",
                                    "SUBJECTIVE",
                                    "SOCIAL_HISTORY",
                                    "VITALS",
                                    "WELL_CHILD_CARE"
                                  ],
                                  "title": "note_section_key"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "The section title.",
                                  "example": "Chief complaint"
                                },
                                "text": {
                                  "type": "string",
                                  "description": "Content of the note section.",
                                  "example": "Sleep disorder"
                                }
                              },
                              "required": [
                                "key",
                                "title",
                                "text"
                              ],
                              "example": [
                                {
                                  "key": "CHIEF_COMPLAINT",
                                  "title": "Chief complaint",
                                  "text": "Fatigue and headaches"
                                },
                                {
                                  "key": "SYMPTOMS",
                                  "title": "Symptoms",
                                  "text": "- Tiredness all day long\n- Mild headaches on the right side"
                                }
                              ],
                              "title": "note_section"
                            }
                          }
                        },
                        "required": [
                          "sections"
                        ],
                        "title": "note"
                      }
                    },
                    "title": "async_note_generation_succeeded_payload"
                  }
                },
                "required": [
                  "id",
                  "status"
                ]
              }
            ],
            "discriminator": {
              "propertyName": "status",
              "mapping": {
                "ONGOING": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "The id of the asynchronous request.",
                      "type": "string",
                      "format": "uuid",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "client_request_id": {
                      "type": "string",
                      "maxLength": 128,
                      "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                      "title": "client_request_id"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ONGOING",
                        "FAILED",
                        "SUCCEEDED"
                      ],
                      "title": "async_request_status"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "title": "async_request_ongoing"
                },
                "FAILED": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "The id of the asynchronous request.",
                      "type": "string",
                      "format": "uuid",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "client_request_id": {
                      "type": "string",
                      "maxLength": 128,
                      "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                      "title": "client_request_id"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ONGOING",
                        "FAILED",
                        "SUCCEEDED"
                      ],
                      "title": "async_request_status"
                    },
                    "payload": {
                      "type": "object",
                      "properties": {
                        "error_code": {
                          "type": "integer",
                          "example": 422
                        },
                        "error_message": {
                          "type": "string",
                          "example": "We can't generate the note when the transcript is too short."
                        }
                      },
                      "required": [
                        "error_code"
                      ],
                      "title": "async_request_failed_payload"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "payload"
                  ],
                  "title": "async_request_failed"
                },
                "SUCCEEDED": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "The id of the asynchronous request.",
                      "type": "string",
                      "format": "uuid",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "client_request_id": {
                      "type": "string",
                      "maxLength": 128,
                      "description": "An optional unique client-made id for this request. When specified, this id is included in  the Json payload that will be sent asynchronously. This can help clients both guarantee idempotency and correlate asynchronous responses with their requests.\n\n_Note_: this id must be different for every request. It is recommended to use a randomly generated UUID.",
                      "title": "client_request_id"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ONGOING",
                        "FAILED",
                        "SUCCEEDED"
                      ],
                      "title": "async_request_status"
                    },
                    "payload": {
                      "type": "object",
                      "description": "The generated note.",
                      "required": [
                        "note"
                      ],
                      "properties": {
                        "note": {
                          "type": "object",
                          "description": "The generated note.",
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Title of the note.",
                              "example": "Fever and strong headache"
                            },
                            "sections": {
                              "type": "array",
                              "description": "Content of the note structured in multiple sections.",
                              "items": {
                                "type": "object",
                                "description": "A note section.",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "description": "A key identifying a section of a note.\nThe set of possible keys depend on the template that is used. Check [Note template](/core-api/guides/note-templates/note-templates-sections) for possible values.",
                                    "example": "CHIEF_COMPLAINT",
                                    "enum": [
                                      "ALLERGIES",
                                      "APPOINTMENTS",
                                      "ASSESSMENT",
                                      "ASSESSMENT_AND_PLAN",
                                      "CARDIOVASCULAR_RISK_FACTORS",
                                      "CHIEF_COMPLAINT",
                                      "CURRENT_MEDICATIONS",
                                      "DIAGNOSTIC_TESTS_ORDERED",
                                      "FOOD_HABITS",
                                      "LIFESTYLE",
                                      "PAST_MEDICAL_HISTORY",
                                      "OBJECTIVES_AND_ADVICE",
                                      "FAMILY_HISTORY",
                                      "HISTORY_OF_PRESENT_ILLNESS",
                                      "IMAGING_RESULTS",
                                      "IMMUNIZATIONS",
                                      "LAB_RESULTS",
                                      "MENTAL_HEALTH_EXAM",
                                      "MENTAL_HEALTH_HISTORY",
                                      "PAST_OBSTETRIC_HISTORY",
                                      "PAST_SURGICAL_HISTORY",
                                      "PHYSICAL_EXAM",
                                      "PLAN",
                                      "PRESCRIPTION",
                                      "HISTORY_OF_PRESENT_COMPLAINT",
                                      "OBJECTIVE",
                                      "SUBJECTIVE",
                                      "SOCIAL_HISTORY",
                                      "VITALS",
                                      "WELL_CHILD_CARE"
                                    ],
                                    "title": "note_section_key"
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "The section title.",
                                    "example": "Chief complaint"
                                  },
                                  "text": {
                                    "type": "string",
                                    "description": "Content of the note section.",
                                    "example": "Sleep disorder"
                                  }
                                },
                                "required": [
                                  "key",
                                  "title",
                                  "text"
                                ],
                                "example": [
                                  {
                                    "key": "CHIEF_COMPLAINT",
                                    "title": "Chief complaint",
                                    "text": "Fatigue and headaches"
                                  },
                                  {
                                    "key": "SYMPTOMS",
                                    "title": "Symptoms",
                                    "text": "- Tiredness all day long\n- Mild headaches on the right side"
                                  }
                                ],
                                "title": "note_section"
                              }
                            }
                          },
                          "required": [
                            "sections"
                          ],
                          "title": "note"
                        }
                      },
                      "title": "async_note_generation_succeeded_payload"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "title": "async_note_generation_succeeded"
                }
              }
            },
            "title": "async_note_generation"
          }
        }
      }
    }
  }
}
```
