Skip to content

Use this request to export a set of documents to your Vault's file staging.

POST/api/{version}/objects/documents/batch/actions/fileextract
NameDescription
Content-Typeapplication/json
Acceptapplication/json (default) or application/xml

Prepare a JSON input file with the following body parameters:

NameDescription
id
required
The id value of the document(s) to export.
NameDescription
sourceOptional: To exclude source files, include a query parameter source=false. If omitted, defaults to true.
renditionsOptional: To include renditions, include a query parameter renditions=true. If omitted, defaults to false.
allversionsOptional: To include all versions, include a query parameter allversions=true. If omitted, defaults to false, which only includes the latest version.
textOptional: To include source document text, include a query parameter text=true. If omitted, defaults to false, which does not include source document text.

Can be used with allversions to include document text for all versions or the latest version. For example, text=true&allversions=true includes all text files from all versions of the requested document.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ --data-raw '[ { "id": "58" }, { "id":"134" }, { "id":"122" } ]' \ https://myvault.veevavault.com/api/v26.1/objects/documents/batch/actions/fileextract?source=true&renditions=false&allversions=true
{ "responseStatus": "SUCCESS", "url": "/api/v26.1/services/jobs/36203", "job_id": "36203" }

On SUCCESS, this operation exports the specified set of documents to your Vault’s file staging. When exporting source document text, the source document text files appear as "text_file.txt" within their respective document version folders. The response includes the following information:

Field NameDescription
job_idThe Job ID value to retrieve the status and results of the document export request.
urlURL to retrieve the current job status of the document export request.