Bulk Document State Change
For each bulk action, you may only select a single workflow that Vault will start for all selected and valid documents.
PUT
/api/{version}/objects/{documents_or_binders}/lifecycle_actions/{user_action_name}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{documents_or_binders} | Choose to change the state of documents or binders. |
{user_action_name} | The user action name__v field value. Find this value with the Retrieve User Actions on Multiple Documents or Binders endpoint. |
Body Parameters
Section link for Body Parameters| Name | Description |
|---|---|
docIds | Include a comma-separated list of document or binder IDs, major and minor version numbers, as shown below. |
lifecycle | Include the name of the document or binder lifecycle. |
state | Include the current state of your document. |
In this request:
- The input file format is set to accept name-value pairs.
- The documents and versions are specified. We're changing the state of version 0.1 of document IDs 222, 223, 224, and 225.
- The lifecycle is specified. These documents are assigned to the
general_lifecycle__c. - The state is specified. We're changing the state of all four documents from draft to approved.
Request
Section link for Requestcurl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "docIds=222:0:1,223:0:1,224:0:1,225:0:1" \
-d "lifecycle=general_lifecycle__c" \
-d "state=draft__c" \
https://myvault.veevavault.com/api/v19.3/objects/documents/lifecycle_actions/approve__cResponse
Section link for Response{
"responseStatus": "SUCCESS"
}