Retrieve Entry Criteria
GET
/api/{version}/objects/{documents_or_binders}/{id}/versions/{major_version}/{minor_version}/lifecycle_actions/{name__v}/entry_requirementsHeaders
Section link for Headers| Name | Description |
|---|---|
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
{documents_or_binders} | Choose to retrieve values for documents or binders. |
{id} | The document or binder id field value from which to retrieve available user actions. |
{major_version} | The major version number of the document or binder. |
{minor_version} | The minor version number of the document or binder. |
{name__v} | The lifecycle name__v field value from which to retrieve entry criteria. This is retrieved from the Retrieve User Action request above. |
Request
Section link for RequestIn this request, we'll retrieve the entry criteria for the "Start Approval" workflow.
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.2/objects/documents/222/versions/0/1/lifecycle_actions/startApproval/entry_requirementsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"properties": [
{
"name": "dueDate",
"description": "Approval Due Date",
"type": [
"Date"
],
"required": true,
"editable": true,
"scope": "WorkflowActivation"
},
{
"name": "Approver",
"description": "Approver",
"type": [
"ObjectReference"
],
"objectTypeReferenced": {
"name": "User",
"label": "User"
},
"required": true,
"editable": true,
"repeating": true,
"scope": "WorkflowActivation"
}
]
}Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.2/objects/documents/222/versions/0/1/lifecycle_actions/approve/entry_requirementsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"properties": [
{
"name": "country__v",
"description": "Country",
"type": [
"ObjectReference"
],
"objectTypeReferenced": {
"name": "country__v",
"label": "Country",
"url": "/api/v19.2/metadata/vobjects/country__v",
"label_plural": "Countries"
},
"editable": true,
"repeating": true,
"scope": "Document",
"records": "/api/v19.2/vobjects/country__v"
}
]
}Response Details
Section link for Response DetailsThe example response shows two entry criteria to start the approval workflow on this document: dueDate and Approver.
- You must assign an Approval Due Date and users/groups to the Approver role on the document when initiating the user action.
- Unlike the response from the next example, the Scope for these fields is set to WorkflowActivation (
"scope": "WorkflowActivation"). - This scope means that you can initiate the user action by including these entry criteria as name-value pairs with the request.
See the Initiate User Action section below for more information.
Request
Section link for RequestIn this request, we'll retrieve the entry criteria for the "Start Approval" workflow.
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.2/objects/documents/222/versions/0/1/lifecycle_actions/startApproval/entry_requirementsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"properties": [
{
"name": "dueDate",
"description": "Approval Due Date",
"type": [
"Date"
],
"required": true,
"editable": true,
"scope": "WorkflowActivation"
},
{
"name": "Approver",
"description": "Approver",
"type": [
"ObjectReference"
],
"objectTypeReferenced": {
"name": "User",
"label": "User"
},
"required": true,
"editable": true,
"repeating": true,
"scope": "WorkflowActivation"
}
]
}Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v19.2/objects/documents/222/versions/0/1/lifecycle_actions/approve/entry_requirementsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"properties": [
{
"name": "country__v",
"description": "Country",
"type": [
"ObjectReference"
],
"objectTypeReferenced": {
"name": "country__v",
"label": "Country",
"url": "/api/v19.2/metadata/vobjects/country__v",
"label_plural": "Countries"
},
"editable": true,
"repeating": true,
"scope": "Document",
"records": "/api/v19.2/vobjects/country__v"
}
]
}Response Details
Section link for Response DetailsThe example response shows one entry criteria to change the state of this document from "Draft" to "Approved": country__v.
- You must assign a value to the Country document field before initiating the user action.
- Unlike the response from the previous example, the Scope for this field is set to Document (
"scope": "Document"). - This scope means that you must first update this field on the document before initiating the user action.
See the Initiate User Action section below for more information.
The response may include the following metadata elements describing the properties for which values need to be specified: