Import Narrative
Note: To bulk import multiple narratives, use the Bulk Import Narrative endpoint.
Use the following endpoint to import narrative text into a Case narrative.
/api/{version}/app/safety/import-narrativeThe request creates a narrative document for the destination Case, in the format of the E2B import narrative template. The narrative text sent in the body of this call is appended to the template content.
If a Case narrative document already exists for the given language, the request creates a new version of the document and appends the narrative text sent in the body of this call to the existing content.
Before submitting this request:
- You must be assigned permissions to use the API and have the Edit Document permission for the
draft__vstate of thenarrative_lifecycle__vobject. - The destination Case must exist.
Headers
Section link for Headers| Name | Description |
|---|---|
caseId | Destination Case or Adverse Event Report ID. |
narrativeType | For the main narrative, enter primary. For a narrative translation, enter translation. The primary narrative must exist before you can add a translation. |
narrativeLanguage | Three-letter ISO 639-2 language code. Currently, the primary narrative must be English ( eng). |
link_translation_to_primary | Set to true to add the localized narrative document as a supporting document to the global (English) narrative document. This parameter only applies when the narrativeType is set to translation and the localized narrative document does not already exist. If omitted, defaults to false. |
Content-Type | text/plain |
In the body of the request, enter the narrative text. You can import up to 100,000 characters of narrative text.
Request
Section link for Requestcurl -X POST \
https://myvault.veevavault.com/api/v24.3/app/safety/import-narrative \
-H 'Authorization: {SESSION_ID}' \
-H 'caseId: V2B000000000201' \
-H 'narrativeType: primary' \
-H 'narrativeLanguage: eng' \
-H 'Content-Type: text/plain' \
-d 'The patient took 500 mg cholecap at 2pm and started experiencing heart palpitations at 2:30pm...'Response
Section link for Response{
"responseStatus": "SUCCESS",
}Response Details
Section link for Response DetailsOn SUCCESS, the response only includes the responseStatus.
On FAILURE, the response also returns a message describing the reason for the failure.