Update Multiple Documents
Bulk update editable field values on multiple documents. You can only update the latest version of each document. To update past document versions, see Update Document Version.
- The maximum CSV input file size is 1GB.
- The values in the input must be UTF-8 encoded.
- CSVs must follow the standard format.
- The maximum batch size is 1,000.
PUT
/api/{version}/objects/documents/batchHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | text/csv or application/x-www-form-urlencoded |
Accept | application/json (default) or text/csv |
Body Parameters
Section link for Body ParametersYou can use Name-Value pairs in the body of your request or you can upload a CSV. id is the only required field, and you can update values of any editable document field. To find these fields, Retrieve Document Fields configured on documents. Editable fields will have editable:true. To remove existing field values, include the field name and set its value to null.
| Name | Description |
|---|---|
id | ID of the document to update |
archive__v | Optional: To archive a document, set to true. To unarchive a document, set to false. |
Request
Section link for Requestcurl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
-H "Accept: text/csv" \
--data-binary @"C:\Vault\Documents\update_documents.csv" \
https://myvault.veevavault.com/api/v18.1/objects/documents/batchResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": [
{
"responseStatus": "SUCCESS",
"id": 771,
"external_id__v": "ALT-DOC-0771"
},
{
"responseStatus": "SUCCESS",
"id": 772,
"external_id__v": "CHO-DOC-0772"
},
{
"responseStatus": "SUCCESS",
"id": 773,
"external_id__v": "GLU-DOC-0773"
}
]
}