Reclassify Multiple Documents
Reclassify documents in bulk. Reclassify allows you to change the document type of existing documents or assign document types to unclassified documents.
A document "type" is the combination of the type__v, subtype__v, and classification__v fields on a document. When you reclassify, Vault may add or remove certain fields on the document.
Not all documents are eligible for reclassification. For example, you can only reclassify the latest version of a document and you cannot reclassify a checked out document. Learn more about reclassifying documents in Vault Help
- The maximum CSV input file size is 1GB.
- The values in the input must be UTF-8 encoded.
- CSVs must follow the standard RFC 4180 format, with some exceptions.
- The maximum batch size is 500.
/api/{version}/objects/documents/batch/actions/reclassifyHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | text/csv |
Accept | application/json (default) or text/csv |
X-VaultAPI-MigrationMode | When set to true, use with the status__v and document_number__v body parameters to reclassify documents to any document lifecycle state and with any document number. You must have the Document Migration permission to use this header. Learn more about Document Migration Mode in Vault Help |
Body Parameters
Section link for Body ParametersUpload parameters as a CSV file. You can also add or remove values for any other editable document field. Note that additional fields may be required depending on the document type, subtype, and classification being assigned to the document. Use the Document Metadata API to retrieve required and editable fields in your Vault. If a required field is missing, the error response will list the name of the required field.
| Name | Description |
|---|---|
idrequired | The ID of the document to reclassify. |
lifecycle__vrequired | The name of the document lifecycle. |
type__vrequired | The name of the document type. |
subtype__voptional | The name of the document subtype (if one exists on the type). |
classification__voptional | The name of the document classification (if one exists on the subtype). |
document_number__voptional | The document number for the reclassified document. If omitted, the document retains the existing document number. You must set both the reclassify parameter and the X-VaultAPI_MigrationMode header to true to change the document number, and you can only include this parameter when you also change the document lifecycle or type, subtype, or classification. |
status__voptional | Specifies the document lifecycle state for the reclassified document. If omitted, the document retains the existing state. You must set both the reclassify parameter and the X-VaultAPI_MigrationMode header to true to change the state, and you can only include this parameter when you also change the document lifecycle or type, subtype, or classification. |
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\reclassify_documents.csv" \
https://myvault.veevavault.com/api/v23.3/objects/documents/batch/actions/reclassifyResponse
Section link for ResponseresponseStatus,id,errors,warnings
SUCCESS,44,
SUCCESS,46,Response Details
Section link for Response DetailsOn SUCCESS, Vault returns the IDs of the reclassified documents.