API Reference (v8.0)
The documentation for this API version is archived and may be out of date. We recommend using a newer version of the API.
For general information on Vault, refer to Vault Help.
General
API calls are REST calls made to a specific endpoint. The general pattern is that collections are accessed via a URL ending in a plural noun such as /documents
, and to target an individual resource, append its ID or a name (e.g. /documents/42
).
Vault limits the number of API calls that can be made every 5 minutes and every 24 hours. When either of these limits are reached, the API returns an API_LIMIT_EXCEEDED
error message and no further calls will be processed until the next 5 minute or 24 hour period begins.
- The default limit every 5 minutes is 2,000 calls.
- The default limit every 24 hours is 100,000 calls.
The limits are configured on each individual vault in a domain.
HTTP Methods
To tell the API whether you are viewing, updating, or deleting the resource, make use of the HTTP verbs GET
, PUT
, and DELETE
(respectively). To create a new resource, send a POST
request to the collection's URL (e.g. /documents
). The API will respond with a JSON (default) or XML document reflecting your changes. All responses will include a responseStatus
with a SUCCESS
, FAILURE
or EXCEPTION
value. For a responseStatus
other than SUCCESS
, an errors
key/value array returned will provide additional details for the type of errors. If there are no errors the errors
value will be empty or omitted. Error handling is covered in depth in the Errors section.
Supported Response Formats
Veeva Vault API supports JSON and XML response formats. To request response in a particular format use the Accept
HTTP header with a value of application/json
(for JSON response) or application/xml
(for XML response). If Accept
HTTP header is not specified the response is in JSON by default.
Alternatively query string parameter format
can be included on the URL to indicate the desired format of the response. The possible values are json
for response formatted as JSON and xml
for response formatted as XML. The format
value passed on the query string will overwrite the value in the Accept
HTTP header. As with HTTP headers, JSON is the default format.
Below is the detailed information for each Veeva Vault API method, note that the string with curly braces in the endpoint URL denotes a variable value. For example, {version}
in the endpoint URLs is a value returned from the Retrieve Available API Versions API call.
Authentication
Authentication calls are how the user gains access to their Vault through the API. Every Vault API endpoint requires an authorization token called session ID. Applications can easily acquire a session ID for Vault users by following the steps described in the Authentication article. Vault's authentication response contains the session ID and a list of all vaults to which the user has been given access.
Once a user authenticates with Vault, all subsequent API requests must contain Authorization
HTTP header containing the session ID received as part of the authentication. Alternatively, the query string parameter auth
can be used instead of HTTP header Authorization
. The value passed in the auth
parameter will overwrite any value in the HTTP header Authorization
.
Vault supports the following authentication methods:
- Username & Password Authentication
- SAML Single Sign-on (SSO) Authentication
- Salesforce Delegated Authentication
Refer to the Authentication article for detailed information about each of these methods.
API Metadata
Retrieve Available API Versions
You can retrieve the list of supported API versions by sending a GET
request to the /api
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/
Response
The response contains a list of all available API versions.
Example:
{
"responseStatus": "SUCCESS",
"values": {
"v2.0": "https://{customer}.veevavault.com/api/v2.0",
"v3.0": "https://{customer}.veevavault.com/api/v3.0",
"v4.0": "https://{customer}.veevavault.com/api/v4.0",
"v5.0": "https://{customer}.veevavault.com/api/v5.0",
"v6.0": "https://{customer}.veevavault.com/api/v6.0",
"v7.0": "https://{customer}.veevavault.com/api/v7.0",
"v8.0": "https://{customer}.veevavault.com/api/v8.0"
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Available API Resources
You can retrieve the available API resources by sending a GET
request to the /api/{version}/metadata/objects
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects
Response
The response contains a list of the available API resources.
Example:
{
"responseStatus": "SUCCESS",
"values": {
"documents": "https://{customer}.veevavault.com/api/v8.0/metadata/objects/documents/types",
"users": "https://{customer}.veevavault.com/api/{version}/metadata/objects/users",
"groups": "https://{customer}.veevavault.com/api/{version}/metadata/objects/groups",
"securitypolicies": "https://{customer}.veevavault.com/api/{version}/metadata/objects/securitypolicies",
"vobjects": "https://{customer}.veevavault.com/api/{version}/metadata/vobjects"
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Domain Information
Allows the Domain Admin user to retrieve all active Vault instances in the domain they manage.
Retrieve Domain Information
You can retrieve the Vault domain information by sending a GET
request to the /api/{version}/objects/domain
endpoint.
Note: Only Domain Admins may retrieve the list of vaults in your domain.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/domain
Response
The response contains a list of Vaults accessible to the user in the Domain.
Field | Description |
---|---|
domain_type__v |
the type of the domain |
id |
the Vault instance ID |
vault_name__v |
the Vault name |
vault_status__v |
the Vault Status |
vault_application__v |
the Vault application type |
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"domain__v": {
"domain_name__v": "customer.com",
"domain_type__v": "Sandbox",
"vaults__v": [
{
"id": "4621",
"vault_name__v": "Customer Promos",
"vault_status__v": "Active",
"vault_application__v": "PromoMats"
},
{
"id": "5091",
"vault_name__v": "Customer eTMF",
"vault_status__v": "Active",
"vault_application__v": "eTMF"
}
]
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Document Metadata
Vault is a very configurable system designed to reflect the business model of documents. Each Vault can have different document types, document properties, etc. The Document Metadata APIs allow you to interrogate the Vault to understand what document-based metadata is available to use.
Retrieve All Document Types
You can retrieve all document types configured in Vault by sending a GET
request to the /api/{version}/metadata/objects/documents
or /api/{version}/metadata/objects/documents/types
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents
Response
The response contains a list of document types configured in Vault.
Field | Description |
---|---|
types[n] |
A list of types available in Vault |
label |
the label of the document type |
value |
the url for the metadata of the type, use this url to get the subtypes for this type |
lock |
the url for the lock metadata |
Example:
{
"responseStatus": "SUCCESS",
"types": [
{
"label": "Promotional Piece",
"value": "https://{CUSTOMER}.veevavault.com/api/v8.0/metadata/objects/documents/types/promotional_piece__vs"
},
{
"label": "Reference Document",
"value": "https://{CUSTOMER}.veevavault.com/api/v8.0/metadata/objects/documents/types/reference_document__vs"
},
{
"label": "Base Document",
"value": "https://{CUSTOMER}.veevavault.com/api/v8.0/metadata/objects/documents/types/base_document__v"
},
{
"label": "Claim",
"value": "https://{CUSTOMER}.veevavault.com/api/v8.0/metadata/objects/documents/types/claim__vs"
}
],
"lock": "https://promomats-demo.veevavault.com/api/v8.0/metadata/objects/documents/lock"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Type
You can retrieve the metadata for the document type by sending a GET
request to the /api/{version}/metadata/objects/documents/types/{type}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/types/{type}
Response
The response contains the metadata for the document type.
If the type contains subtypes in the document type hierarchy, the list of subtypes and the URLs pointing to their metadata will be included in the response.
If no subtypes exist in the document type hierarchy, the list of document properties defined for the specified type will be included in the response.
Field | Description |
---|---|
name |
the public key of the specified document type |
label |
the UI-friendly label for the specified document type |
properties[n] |
the list of document properties that apply to the specified type |
renditions[n] |
the list of rendition types that apply to the specified document type |
relationshipTypes[n] |
the list of relationship types valid for the specified document type |
processes[n] |
the list of valid processes |
defaultWorkflows[n] |
the list of valid default Workflows valid for the specified document type |
availableLifecycles[n] |
the list of available Lifecycles valid for the specified document type |
templates[n] |
the list of of templates valid for the specified document type |
subtypes[n] |
the list of subtypes configured for the specified document type |
Shared Properties:
Shared properties are indicated by shared: true
property metadata field. In addition, usedIn
metadata field specifies the document {type}:{subtype}:{classification}
where the property is currently used
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Subtype
You can retrieve the metadata for the document subtype by sending a GET
request to the /api/{version}/metadata/objects/documents/types/{type}/subtypes/{subtype}
endpoint.
By default the properties and templates from higher in the document type hierarchy are included. To exclude, set query parameter includeInheritedFields
to false
.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/types/{type}/subtypes/{subtype}
Response
The response contains the metadata for the document subtype defined for the specified type.
If the subtype contains classifications in the document type hierarchy, the list of classifications and the URLs pointing to their metadata will be included in the response
If no classifications exist in the document type hierarchy under specified subtype, the list of document properties defined for the specified subtype will be included in the response.
Field | Description |
---|---|
name |
the public key of the specified document subtype |
label |
the UI-friendly label for the specified document subtype |
properties[n] |
the list of document properties that apply to the specified subtype |
relationshipTypes[n] |
the list of relationship types valid for the specified document subtype |
processes[n] |
the list of valid processes |
defaultWorkflows[n] |
the list of valid default Workflows valid for the specified document subtype |
availableLifecycles[n] |
the list of available Lifecycles valid for the specified document subtype |
templates[n] |
the list of of templates valid for the specified document subtype |
classifications[n] |
the list of classifications configured for the specified document subtype |
Shared Properties:
Shared properties are indicated by shared: true
property metadata field. In addition, usedIn
metadata field specifies the document {type}:{subtype}:{classification}
where the property is currently used
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Classification
You can retrieve the metadata for the document classification by sending a GET
request to the /api/{version}/metadata/objects/documents/types/{type}/subtypes/{subtype}/classifications/{classification}
endpoint.
By default the properties and templates from higher in the document type hierarchy are included. To exclude, set query parameter includeInheritedFields
to false
.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/types/{type}/subtypes/{subtype}/classifications/{classification}
Response
The response contains the list of document properties for the document classification defined for the specified classification.
Field | Description |
---|---|
name |
the public key of the specified document classification |
label |
the UI-friendly label for the specified document classification |
properties[n] |
the list of document properties that apply to the specified classification |
relationshipTypes[n] |
the list of relationship types valid for the specified document classification |
processes[n] |
the list of valid processes |
defaultWorkflows[n] |
the list of valid default Workflows valid for the specified document classification |
availableLifecycles[n] |
the list of available Lifecycles valid for the specified document classification |
templates[n] |
the list of of templates valid for the specified document classification |
Shared Properties:
Shared properties are indicated by shared: true
property metadata field. In addition, usedIn
metadata field specifies the document {type}:{subtype}:{classification}
where the property is currently used
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Properties
You can retrieve the metadata of all document properties by sending a GET
request to the /api/{version}/metadata/objects/documents/properties
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/properties
Response
The response contains the list of document properties configured across entire document type hierarchy. Formula properties are currently not returned.
Field | Description |
---|---|
name |
Property name (public key) |
type |
Property type |
required |
Indicates if the property is required |
repeating |
Indicates if the property is repeating |
systemAttribute |
Indicates if the property is standard (system-managed) |
editable |
Indicates if the property is editable |
setOnCreateOnly |
Indicates if the property can only be set on document creation |
disabled |
Indicates if the property is disabled |
objectType |
Object type (for objectReference-type properties only) |
label |
Property label |
section |
Section in property layout where property appears |
sectionPosition |
Property's position within the section |
hidden |
Indicates if the property is hidden |
queryable |
Indicates if the property is exposed in query |
shared |
Indicates if the property is shared |
usedIn |
Lists the other document types/subtypes/classifications where the property is used (for shared properties only) |
usedIn: key |
key name (public key) for the document type that is using the shared property |
usedIn: type |
Indicates whether the shared property is used by a document type, subtype, or classification |
definedInType |
Indicates if the property is defined in a document type, subtype, or classification |
definedIn |
Document type/subtype/classification where the property is defined |
entryLabels |
Picklist value labels (for picklist-type properties only) |
minValue |
Property's minimum value (for integer-type properties only) |
maxValue |
Property's maximum value (for integer-type properties only) |
length |
Property's maximum character length (only for some property types) |
scale |
Number of decimal places (only number-type properties) |
Shared Properties:
Shared properties are indicated by shared: true
property metadata field. In addition, usedIn
metadata field specifies the document {type}:{subtype}:{classification}
where the property is currently used
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v4.0
Retrieve Document Relationships
You can retrieve the document relationships metadata by sending a GET
request to the /api/{version}/metadata/objects/documents/types/{type}/relationships
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/types/{type}/relationships
Response
The response contains the information on relationship types available for the specified document type and generic relationship properties, such as Target Document and Source Document IDs.
Field | Description |
---|---|
properties[n] |
List of relationship properties that apply to all relationship types |
properties: name |
Property name (public key) |
properties: type |
Property type |
properties: length |
Indicates the maximum character length of the property; some property types will always have "0" as the length |
properties: editable |
Indicates if the property is editable |
properties: queryable |
Indicates if the property is exposed in query |
properties: required |
Indicates if the property is required |
properties: multivalue |
Indicates if the property is multi-valued |
properties: onCreateEditable |
Indicates if the property can be set only on document creation |
relationshipTypes[n] |
List of relationships available for the specified document type, with each array item giving details for each relationship type |
relationshipTypes: value |
Name of the relationship type |
relationshipTypes: label |
Label of the relationship type |
relationshipTypes: sourceDocVersionSpecific |
Indicates if the source document in the relationship is version-specific |
relationshipTypes: targetDocVersionSpecific |
Indicates if the target document in the relationship is version-specific |
relationshipTypes: system |
Indicates if the relationship type is standard (system-managed) |
relationshipTypes: singleUse |
Indicates if the relationship type can only be used once for each document |
relationshipTypes: targetDocumentTypes |
List of document types which are valid as target documents for the relationship |
relationshipTypes: targetDocumentTypes: label |
Document type label |
relationshipTypes: targetDocumentTypes: value |
Document type name (public key) |
Example:
{
"responseStatus": "SUCCESS",
"properties": [
{
"name": "id",
"type": "id",
"length": 20,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "source_doc_id__v",
"type": "id",
"length": 20,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "source_major_version__v",
"type": "Integer",
"length": 10,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "source_minor_version__v",
"type": "Integer",
"length": 10,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "target_doc_id__v",
"type": "id",
"length": 20,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "target_major_version__v",
"type": "Integer",
"length": 10,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "target_minor_version__v",
"type": "Integer",
"length": 10,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "relationship_type__v",
"type": "String",
"length": 255,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "created_date__v",
"type": "DateTime",
"length": 0,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "created_by__v",
"type": "ObjectReference",
"length": 10,
"object": "users",
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": false
}
],
"relationshipTypes": [
{
"value": "references__vs",
"label": "References",
"sourceDocVersionSpecific": true,
"targetDocVersionSpecific": true,
"system": true,
"singleUse": false,
"targetDocumentTypes": [
{
"label": "Trial Management",
"value": "trial_management__vs"
},
{
"label": "Statistics",
"value": "statistics__vs"
},
{
"label": "Third parties",
"value": "third_parties__vs"
}
]
},
{
"value": "supporting_documents__vs",
"label": "Supporting Documents",
"sourceDocVersionSpecific": false,
"targetDocVersionSpecific": false,
"system": false,
"singleUse": false,
"targetDocumentTypes": [
{
"label": "Trial Management",
"value": "trial_management__vs"
},
{
"label": "Statistics",
"value": "statistics__vs"
},
{
"label": "Third parties",
"value": "third_parties__vs"
}
]
},
{
"value": "basedon__vs",
"label": "Based on",
"sourceDocVersionSpecific": false,
"targetDocVersionSpecific": true,
"system": true,
"singleUse": false,
"targetDocumentTypes": [
{
"label": "Trial Management",
"value": "trial_management__vs"
},
{
"label": "Statistics",
"value": "statistics__vs"
},
{
"label": "Third parties",
"value": "third_parties__vs"
}
]
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Retrieve Document Lock Metadata
You can retrieve the document lock metadata by sending a GET
request to the /api/{version}/metadata/objects/documents/lock
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documets/lock
Response
The response contains the document lock metadata.
Field | Description |
---|---|
name |
Property name (public key) |
scope |
Property scope; this value is "Lock" for all properties |
type |
Property type |
required |
Indicates if the property is required |
systemAttribute |
Indicates if the property is system managed/standard |
editable |
Indicates if the property is editable |
setOnCreateOnly |
ndicates if the property can only be set on document creation |
disabled |
Indicates if the property is disabled |
objectType |
Object type if property: type is set to ObjectReference |
label |
Property label |
hidden |
Indicates if the property is hidden |
Example:
{
"responseStatus": "SUCCESS",
"name": "lock",
"properties": [
{
"name": "locked_by__v",
"scope": "Lock",
"type": "ObjectReference",
"required": true,
"systemAttribute": true,
"editable": false,
"setOnCreateOnly": false,
"disabled": false,
"objectType": "User",
"label": "Locked By",
"hidden": false
},
{
"name": "locked_date__v",
"scope": "Lock",
"type": "DateTime",
"required": true,
"systemAttribute": true,
"editable": false,
"setOnCreateOnly": false,
"disabled": false,
"objectType": "DateTime",
"label": "Locked Date",
"hidden": false
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v6.0: updated property names
Documents
The heart of Veeva Vault is the documents
object. The API lets you create, update, retrieve and delete documents. The properties available and/or required for the document depend on the {type}:{subtype}:{classification}
of the document. You can get the list of document properties from the Document Metadata API calls.
Note that as of v5.0 you cannot create or manipulate binder documents through the documents API, you must use the binders API, below.
Create Document
You can create a document by sending a POST
request to the /api/{version}/objects/documents
endpoint.
- The maximum file size allowed is 4GB.
- The HTTP Request Header
Content-Type
must be set tomultipart/form-data
. - Refer to output from the Document Metadata APIs to determine the request parameters. To determine the required properties, look for the properties with the following metadata:
required=true
andsetOnCreateOnly=false
- To upload a file, use multi-part attachment with the file component named
file
. If no file is attached, the document will be created as a content placeholder. - To create a document from a template, include a query parameter
fromTemplate
and specify the name of the template as returned from the document{type}/{subtype}/{classification}
Document Metadata API. Only templates of typedocument
are allowed and the document type of the document being created must match the metadata API path.
For example, to create a document in eTMF Vault:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-F "lifecycle__v=eTMF Lifecycle" \
-F "type__v=Trial Management" \
-F "subtype__v=Trial Oversight" \
-F "classification__v=Trial Master File Plan" \
-F "process_name__v=Secure Resources / People" \
-F "name__v=Test Document" \
-F "major_version_number__v=0" \
-F "minor_version_number__v=1" \
-F "file=@TestDocument.docx" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents
By default the document metadata is indexed synchronously. To process the indexing asynchronously, include a query parameter async
set to true
. This also improves the performance of rendering the viewable PDF renditions by routing the rendering requests to bulk renditions queue.
By default the viewable rendition is generated at the time of document creation. To supporess generation of the viewable rendition, include a query parameter suppressRendition
set to true
.
Response
On success, the response will contain the ID of the newly created document.
Example:
{
"responseStatus": "SUCCESS",
"id": 31
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v5.0: create from template supported
v7.0: asynchronous metadata indexing supported
v8.0: suppressing generation of viewable rendition is supported
Retrieve Documents
You can retrieve the documents from a specific Library view or documents matching a keyword search by sending a GET
request to the /api/{version}/objects/documents
endpoint.
The Retrieve Documents API mimics the behavior of the pre-canned document filters available through the Vault UI: My Documents
(documents I have created or updated), Recent Documents
(documents I have recently viewed), Favorites
(documents I have tagged as Favorites). Just as with the UI, the lists return both documents and binders.
Request Parameters
Field | Description |
---|---|
named_filter |
one of My Documents (get my documents), Recent Documents (get recent documents) or Favorites (get my favorite documents) |
search |
used to do keyword search across all document properties; only one of named_filter or search can be used, using both is an error |
scope |
used in conjunction with search to indicate whether the search is against all searchable properties (scope = properties ) or against searchable properties and document content (scope = all ). The default is properties and is assumed if not set. |
start |
[optional, default: 0] number indicating the row offset in the result |
limit |
[optional, default and absolute maximum: 200] number indicating the maximum number of documents to return |
sort |
[optional] sort field followed by sort order, e.g. name__v desc |
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents
Response
On success, Vault retrieves the list of documents and binders matching the request criteria, with their metadata. The document metadata returned will vary based on your vault configuration.
A document pseudo-property binder__v
indicates whether the returned document is a regular document or a binder. The value of true
means it is a binder, false
or absense of the pseudo-property means it is a document. If binder, the binder node structure is not listed as part of the response and must be determined through the appropriate Binder API call.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v4.0: the scope
parameter is supported
v4.0: the response now includes term highlighting hints
v5.0: the response now distinguishes between documents and binders
Retrieve Document
You can retrieve the document properties and property values for the specified document by sending a GET
request to the /api/{version}/objects/documents/{id}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}
Response
On success, Vault returns the properties and property values for the document. Response properties will vary based on properties defined for the document type of the specified document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Versions
You can retrieve the available versions of the document by sending a GET
request to the /api/{version}/objects/documents/{id}/versions
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions
Response
On success, Vault returns a list of the available versions for the specified document.
Field | Description |
---|---|
versions |
contains a list of document version |
- number |
the version number; first value is the major version, second is the minor version |
- value |
the API URL for the specific version |
renditions |
the list of API URLs for of the document's renditions |
Example:
{
"responseStatus": "SUCCESS",
"versions": [
{
"number": "0.1",
"value": "https://devtmf.vaultdev.com/api/v8.0/objects/documents/23/versions/0/1"
}
],
"renditions": {
"viewable_rendition__v": "https://devtmf.vaultdev.com/api/v8.0/objects/documents/23/renditions/viewable_rendition__v"
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Version
You can retrieve the document properties and property values for the specified document version by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}
Response
On success, Vault returns the properties and property values for the specified version of the document. Response properties will vary based on properties defined for the document type of the specified document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Update Document
You can update a document by sending a PUT
request to the /api/{version}/objects/documents/{id}
endpoint.
Refer to the output of the Document Metadata APIs, only those properties that are marked as "editable": true
are valid.
To reclassify the document, set the reclassify
request parameter to true
(set to false
by default). While reclassifying you are able to set the lifecycle/type/subType/classifications for the document together with the properties required for the specified classification.
Response
On success, the response will contain the ID of the updated document.
Example:
{
"responseStatus": "SUCCESS",
"id": 29
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v8.0: reclassify support added
Update Document Version
You can update a document version by sending a PUT
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}
endpoint.
Refer to the output of the Document Metadata APIs, only those properties that are marked as "editable": true
are valid.
Response:
On success, Vault updates property values for the specified version of the document and returns the ID of the updated document.
Example:
{
"responseStatus": "SUCCESS",
"id": 24
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Delete Document
You can delete the document by sending a DELETE
request to the /api/{version}/objects/documents/{id}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}
Response
On success, Vault returns the id of the deleted document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Delete Document Version
You can delete the specific version of the document by sending a DELETE
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}
Response
On success, Vault deletes the version specified, including the viewable rendition, property values, etc., and returns the ID of the deleted document.
Example:
{
"responseStatus": "SUCCESS",
"id": 24
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document File
You can retrieve the source file from the document by sending a GET
request to the /api/{version}/objects/documents/{id}/file
endpoint.
You can check-out the document before the retrieval by setting lockDocument
request parameter to true
(false
by default).
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/file?lockDocument=true > file
Response
On success, Vault retrieves the latest version of the source file from the document. The HTTP Response Header Content-Type
is set to application/octet-stream
. The HTTP Response Header Content-Disposition
contains a filename component which can be used when naming the local file.
. . .
Content-Type: application/octet-stream;charset=UTF-8
Content-Disposition: attachment;filename="VaultFile.pptx"
. . .
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v6.0: check-out prior to retrieval is supported
Retrieve Document Version File
You can retrieve the source file from the specified version of the document by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/file
endpoint.
Response
On success, Vault retrieves the specified version of the source file from the document. The HTTP Response Header Content-Type
is set to application/octet-stream
. The HTTP Response Header Content-Disposition
contains a filename component which can be used when naming the local file.
. . .
Content-Type: application/octet-stream;charset=UTF-8
Content-Disposition: attachment;filename="VaultFile.pptx"
. . .
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Version Thumbnail
You can retrieve the document thumbnail image for the specified version of the document by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/thumbnail
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/thumbnail > thumbnail.png
Response
On success, Vault returns the thumbnail image for the specified version of the document. The HTTP Response Header Content-Type
is set to image/png
.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v6.0
Create Document Lock (Check-out)
You can create the document lock by sending a POST
request to the /api/{version}/objects/documents/{id}/lock
endpoint.
A document lock is analogous to checking out a document but without the file attached in the response for download, to get the file use the Retrieve Document File API.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/lock
Response
On success, Vault locks the document and other users are not allowed to lock the document.
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Document successfully checked out."
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Document Lock
You can check if the document is locked (checked-out) by sending a GET
request to the /api/{version}/objects/documents/{id}/lock
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/lock
Response
On success, Vault retrieves the lock object (if any) for a document. If the document is not currently checked out, no lock properties will be returned.
Field | Description |
---|---|
locked_by__v |
ID of the user who locked the document |
locked_date__v |
Timestamp when the document was locked |
Example:
{
"responseStatus": "SUCCESS",
"lock": {
"locked_by__v": 25496,
"locked_date__v": "2013-04-09T18:01:09.000Z"
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Delete Document Lock
You can delete the document lock by sending a DELETE
request to the /api/{version}/objects/documents/{id}/lock
endpoint. Deleting a document lock is analogous to undoing check out of a document.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/lock
Response
On success, Vault unlocks the document, allowing other users to lock/check out the document.
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Undo check out successful."
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Update Document File / Create Draft
You can replace the document file or create a draft document version by sending a a POST
request to the /api/{version}/objects/documents/{id}
endpoint.
- Updating the document file is the act of replacing the existing file. This will increase the document by a minor version. A document lock may be required before a file can be updated.
- Creating a new document draft is the action of creating a new document version in Draft state from either the existing document content or by uploading a new document file.
The HTTP Request Header Content-Type
must be set to multipart/form-data
. To upload a file, use multi-part attachment with the file component named file
.
Request Parameters
description__v
- To set the description for the minor version update, include this parameter in the requested set to the description string.createDraft
- optional [latestContent
|uploadedContent
]- if not set or not included in the request, the functionality of this API call is to Upload New Document
- if set to
latestContent
, the functionality of this API is to create a new draft version from the latest content - if set to
uploadedContent
, the functionality of this API is to create a new draft version from the content uploaded in file parameter
file
- contains the binary file attachment.- optional when a new draft needed to be created from existing content
- required when a new draft needed to be created for new content
- required when the existing document file needs to be updated
suppressRendition
- optional - boolean- if set to
true
suppresseses generation of viewable rendition when the document file is updated
- if set to
Response
On success, Vault updates the document source file or creates a new document draft.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v7.0: Create Draft feature is supported
v8.0: suppressing generation of viewable rendition is supported
List Document Renditions
You can retrieve the list of rendition types available for the document by sending a GET
request to the /api/{version}/objects/documents/{id}/renditions
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/renditions
Response
On success, Vault returns the list of rendition types for the document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
List Document Version Renditions
You can retrieve the list of rendition types available for the specified document version by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions
Response
On success, Vault returns the list of rendition types for the specified document version.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Retrieve Document Rendition
You can retrieve the file associated with the given rendition type for the document by sending a GET
request to the /api/{version}/objects/documents/{id}/renditions/{renditionType}
endpoint.
To retrieve the latest steady state version of the document rendition, set the optional steadyState
request parameter to true
(false
by default)
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/renditions/{renditionType}?steadyState=true > file
Response
On success, Vault retrieves the file associated with the given renditions type for the document. The HTTP Response Header Content-Type
is set to application/octet-stream
.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v6.0: steadyState
request parameter supported
Retrieve Document Version Rendition
You can retrieve the file associated with the given rendition type for the specified document version by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType} > file
Response
On success, Vault retrieves the file associated with the given renditions type for the specified document version. The HTTP Response Header Content-Type
is set to application/octet-stream
.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Upload Document Rendition
You can upload the file to be associated with the given rendition type for the document by sending a POST
request to the /api/{version}/objects/documents/{id}/renditions/{renditionType}
endpoint.
The HTTP Request Header Content-Type
must be set to multipart/form-data
. Include the file component in the multi-part attachment named file
.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-F file=@file.pdf \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/renditions/{renditionType}
Response
On success, Vault associates the uploaded file with the given rendition type for the specified document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Upload Document Version Rendition
You can upload the file to be associated with the given rendition type for the the document with the specified version number by sending a POST
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
endpoint.
The HTTP Request Header Content-Type
must be set to multipart/form-data
. Include the file component in the multi-part attachment named file
.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-F file=@file.pdf \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
Response
On success, Vault associates the uploaded file with the given rendition type for the document with the specified version number.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Delete Latest Document Rendition
You can delete the rendition of specified type from the latest document version by sending a DELETE
request to the /api/{version}/objects/documents/{id}/renditions/{renditionType}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/renditions/{renditionType}
Response
On success, Vault deletes the rendition of specified type from the latest document version.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Delete Document Version Rendition
You can delete the rendition of the given type from the specified version of the document by sending a DELETE
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
Response
On success, Vault deletes the rendition of the given type from the specified version of the document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Replace Document Rendition
You can replace the rendition of the given type from the latest version of the document by sending a PUT
request to the /api/{version}/objects/documents/{id}/renditions/{renditionType}
endpoint.
The HTTP Request Header Content-Type
must be set to multipart/form-data
. Include the file component in the multi-part attachment named file
.
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-F file=@file.pdf \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/renditions/{renditionType
Response
On success, Vault replaces the rendition of the given type from the latest version of the document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
Replace Document Version Rendition
You can replace the rendition of the given type from the specified version of the document by sending a PUT
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
endpoint.
The HTTP Request Header Content-Type
must be set to multipart/form-data
. Include the file component in the multi-part attachment named file
.
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-F file=@file.pdf \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/renditions/{renditionType}
Response
On success, Vault replaces the rendition of the given type for the specified version of the document.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v7.0
List Document Relationships
You can retrieve the list of document relationships by sending a GET
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/relationships
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/relationships
Response
On success, Vault returns a list of relationships where the specified document is the source document.
Field | Description |
---|---|
id |
ID of the relationship |
source_doc_id__v |
ID of the source document |
relationship_type__v |
the name of relationship type |
target_doc_id__v |
the relationship target document id |
target_major_version__v |
the major version of the target document, a null value indicates that the relationship applies to all major versions of the target document |
target_minor_version__v |
the minor version of the target document, a null value indicates that the relationship applies to all minor versions of the target document |
created_by__v |
ID of the user who created the relationship |
created_date__v |
Timestamp when the relationship was created |
Example:
{
"responseStatus": "SUCCESS",
"relationships": [
{
"relationship": {
"id": 31,
"source_doc_id__v": 24,
"relationship_type__v": "related_claims__vs",
"created_by__v": 25496,
"created_date__v": "2013-03-12T16:59:39.000Z",
"target_doc_id__v": 22
}
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Create Document Relationship
Method & Endpoint
Send a POST
request to the /api/{VERSION}/objects/documents/{ID}/versions/{MAJOR_VERSION}/{MINOR_VERSION}/relationships
endpoint.
Request Headers
- To specify the input format, set the HTTP Request Header
Content-Type
toapplication/x-www-form-urlencoded
(name-value pair input). - JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{ID}
- The documentid
field value.{MAJOR_VERSION}
- The documentmajor_version_number__v
field value.{MINOR_VERSION}
- The documentminor_version_number__v
field value.
Input Parameters
target_doc_id__v
- [Required] The target documentid
field value.relationship_type__v
- [Required] The relationship type retrieved from the Document Relationships Metadata call.target_major_version__v
- [Optional] The major version number of the target document.target_minor_version__v
- [Optional] The minor version number of the target document.
Example Request
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "target_doc_id__v=548"
-d "relationship_type__v=supporting_documents__vs"
-d "target_major_version_v=0"
-d "target_minor_version_v=1"
https://myvault.veevavault.com/api/v14.0/objects/documents/548/versions/0/1/relationships
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Document relationship successfully created.",
"id": 200
}
On success, Vault returns the ID of the newly created document relationship.
Possible Errors
Error Type | Error Message/Description |
---|---|
INVALID_DATA |
Relationship already exists. |
PARAMETER_REQUIRED |
Missing required parameter {PARAMETER}. |
INVALID_DATA |
Document version major {MAJOR_VERSION_NUMBER}, minor {MINOR_NUMBER} not found for document {ID}. |
Version History
Available in API v3.0 or later.
Delete a Document Relationship
You can delete the document relationship by sending a DELETE
request to the /api/{version}/objects/documents/{id}/versions/{major}/{minor}/relationships/{relationshipId}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/versions/{major}/{minor}/relationships/{relationshipId}
Response
On success, Vault returns the relationship ID of the deleted relationship.
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Document relationship successfully deleted.",
"id": 35
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Document Events
The Document Events are used to track the document and binder distribution events across sub-systems such as iRep, Controlled Copy, Approved Email and Engage.
Document Events Metadata
Through the Document Event Metadata APIs you can retrieve the current configuration of the Document Events in your Vault including the available event types and subtypes, and the event data each of the types/sybtypes manage.
Retrieve Available Document Event Types
You can retrieve the document event types by sending a GET
request to the /api/{version}/metadata/objects/documents/events
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/events
Response
On success, Vault returns the list of events, and event types per each event (if applicable). If the user is not permitted to access the event data, the event type is omitted from the response.
Example:
{
"responseStatus": "SUCCESS",
"events": [
{
"name": "distribution__v",
"label": "Distribution Event",
"subtypes": [
{
"name": "approved_email__v",
"label": "Approved Email",
"value": "https://customer.veevavault.com/api/v8.0/metadata/objects/documents/events/distribution__v/types/approved_email__v"
},
{
"name": "controlled_copy__v",
"label": "Controlled Copy",
"value": "https://customer.veevavault.com/api/v8.0/metadata/objects/documents/events/distribution__v/types/controlled_copy__v"
},
{
"name": "irep__v",
"label": "CRM",
"value": "https://customer.veevavault.com/api/v8.0/metadata/objects/documents/events/distribution__v/types/irep__v"
},
{
"name": "engage__v",
"label": "Engage",
"value": "https://customer.veevavault.com/api/v8.0/metadata/objects/documents/events/distribution__v/types/engage__v"
}
]
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v6.0
Retrieve Event Type Metadata & Defined Subtypes
You can retrieve the document event type metadata by sending a GET
request to the /api/{version}/metadata/objects/documents/events/{event_type}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/documents/events/{event_type}
Response
On success, Vault returns all metadata for the specified event type. If event subtypes are defined for the event type, the subtypes will also be included
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v6.0
Document Events Data
Through the Document Event Data APIs you can log and retrieve the document distribution event data in your Vault.
Retrieve Document Event Data
You can retrieve the document event type metadata by sending a GET
request to the /objects/documents/{id}/events
endpoint.
Request Parameters
You can include one or more queryable event properties and associated values in the request parameters to filter the response.
Example: specifying event_type__v=Distribution
will return only distribution events, event_type__v=Distribution&event_subtype__v=Approved Email
will return only distribution events generated for/by Approved Email
Use
startDate
andendDate
parameters to filter by date range- the date can be specified in UTC including the time part, although the time part is optional. If time part is not included a midnight on the specified date is assumed.
Use
limit
andstart
parameters for paginating over the result set
Response
On success, Vault returns the list of event objects, each containing the properties as defined by the metadata for its event type. Null and/or false valued properties are omitted from the response. By default 200 records is returned, however this can be overwritten by specifying an alternative value in the limit
parameter.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v6.0
Log a Document Event
You can log a document event of specific type, subtype, and classificationt by sending a POST
request to the /objects/documents/{id}/versions/{maj}/{min}/events
endpoint.
Request Parameters
Provide the name-value pairs consisting of all required properties and the values for the event type/subtype specified. The required properties are obtained from the "Event Type Metadata" API for the event type/subtype. Either Labels or keys can be used for event_type__v
, event_subtype__v
and classification__v
properties.
Response
On success, Vault logs the document event.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INSUFFICIENT_ACCESS |
This error occurs if the user does not have permission to log an event of specified type |
INVALID_DATA |
This error occurs if the value specified for the parameter is invalid (i.e. validation error). As part of the error a list of all properties which have an error will be returned |
PARAMETER_REQUIRED |
This error occurs if the required parameter is not provided. As part of the error a list of all missing parameters will be returned. |
METHOD_NOT_SUPPORTED |
This error occurs if the URL is constructed with an invalid event type, or any other endpoint related issues occur. |
Version History
Since: v6.0
Lifecycles
The API supports lifecycle actions such as workflows and state changes on documents and binders in your vault. This allows you to request a list of lifecycle actions available to users on a document or binder, retrieve the properties which are required to be provided before the lifecycle action can be initiated (entry requirements), and then initiate the lifecycle action.
Step 1: Retrieve Lifecycle Actions
- Retrieve a list of available lifecycle actions ("User Actions" in the UI) that can be initiated on a specific version of a document or binder.
- The response includes the name of each lifecycle action used to initiate the action and the endpoint to retrieve the entry requirements.
Step 2: Retrieve Entry Requirements
- Before initiating a lifecycle action, you need to ensure that the document or binder meets certain conditions (required fields are populated, etc.).
- For example, you don't need to assign a user to the "Approver" role when the document is first uploaded, but you do need to when initiating the "Start Approval" workflow.
- Not all lifecycle actions have entry requirements. In these cases, you can simply proceed with initiation of the lifecycle action.
- Some have requirements that can be specified as name-value pairs with the lifecycle initiation request (when the entry requirement
"scope": "WorkflowActivation"
). - Others must first be updated on the document or binder before initiating the request (when the entry requirement
"scope": "Document"
or"scope": "Binder"
).
Step 3: Initiate Lifecycle Action
- Once you've determined the entry requirements and completed those which must be configured separately, you can initiate the lifecycle action.
- Vault will evaluate whether all the entry requirements have been met and, if so, will initiate the lifecycle action on the specified version of the document or binder.
Retrieve Lifecycle Actions
Use this request to retrieve all available lifecycle actions that can be initiated on a specific version of a document or binder.
Method & Endpoint
Documents: Send a GET
request to the /api/{VERSION}/objects/documents/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions
endpoint.
Binders: Send a GET
request to the /api/{VERSION}/objects/binders/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
ID
- Theid
field value of the document from which to retrieve available lifecycle actions.major_version_number__v
- Major version number of the document.minor_version_number__v
- Minor version number of the document.
Example Request
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v14.0/objects/documents/222/versions/0/1/lifecycle_actions
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"lifecycle_actions__v": [
{
"name__v": "startApproval",
"label__v": "Start Approval",
"lifecycle_action_type__v": "workflow",
"entry_requirements__v": "https://myvault.veevavault.com/api/v13.0/objects/documents/222/versions/0/1/lifecycle_actions/startApproval/entry_requirements"
},
{
"name__v": "approve",
"label__v": "Approve",
"lifecycle_action_type__v": "stateChange",
"entry_requirements__v": "https://myvault.veevavault.com/api/v13.0/objects/documents/222/versions/0/1/lifecycle_actions/approve/entry_requirements"
}
]
}
Response Details
The response lists all available lifecycle actions (lifecycle_actions__v
) that can be initiated on the specified version of the document or binder.
name__v
- The lifecycle action name (consumed by the API). These vary from vault to vault and may be text, numeric, or alphanumeric values.label__v
- The lifecycle action label. This is the "User Action" label seen in the UI. These valueslifecycle_action_type__v
- Theworkflow
andstateChange
types are the most commonly used and are available in all vaults.entry_requirements__v
- The endpoint to retrieve the entry requirements for each lifecycle action. If no entry requirements exist, this will be excluded from the response.
Note that lifecycle actions are not returned for documents or binders which are currently in an active workflow.
Version History
Available in API v6.0 or later.
Retrieve Entry Requirements
Once you've retrieved the available lifecycle actions, use this request to retrieve the entry requirements from a specific lifecycle action.
Method & Endpoint
Documents: Send a GET
request to the /api/{VERSION}/objects/documents/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions/{LIFECYCLE_ACTION}/entry_requirements
endpoint.
Binders: Send a GET
request to the /api/{VERSION}/objects/binders/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions/{LIFECYCLE_ACTION}/entry_requirements
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
ID
- Theid
field value of the document from which to retrieve lifecycle action entry requirements.major_version_number__v
- Major version number of the document.minor_version_number__v
- Minor version number of the document.LIFECYCLE_ACTION
- Thename__v
value of the lifecycle action from which to retrieve entry requirements.
Example Request 1
In this request, we'll retrieve the entry requirements for the "Start Approval" workflow.
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v14.0/objects/documents/222/versions/0/1/lifecycle_actions/startApproval/entry_requirements
Example Response 1
{
"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"
}
]
}
The response above shows two entry requirements 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 intiating the lifecycle action.
- Unlike the response from the next request, the Scope for these fields is set to WorkflowActivation (
"scope": "WorkflowActivation"
). - This scope means that you can initiate the lifecycle action by including these entry requirements as name-value pairs with the request.
Refer to the example request "Initiate Start Approval Workflow" in the "Initiate Lifecycle Action" section below for more information.
Example Request 2
In this request, we'll retrieve the entry requirements to change the state of a document from "Draft" to "Approved".
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v14.0/objects/documents/222/versions/0/1/lifecycle_actions/approve/entry_requirements
Example Response 2
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"properties": [
{
"name": "country__v",
"description": "Country",
"type": [
"ObjectReference"
],
"objectTypeReferenced": {
"name": "country__v",
"label": "Country",
"url": "/api/v14.0/metadata/vobjects/country__v",
"label_plural": "Countries"
},
"editable": true,
"repeating": true,
"scope": "Document",
"records": "/api/v14.0/vobjects/country__v"
}
]
}
The response above shows one entry requirement 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 lifecycle action.
- Unlike the response from the previous request, 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 lifecycle action.
Refer to the example request "Change State to Approved" in the "Initiate Lifecycle Action" section below for more information.
Entry Requirement Field Properties
The response may include the following metadata elements describing the properties for which values need to be specified:
Property | Description |
---|---|
name |
The entry requirement name (used in the API). This value must be specified when starting the lifecycle action. |
description |
The entry requirement name (used in the UI). |
type |
The entry requirement data type. This value can be one of String , Number , Date , Boolean , Picklist , or ObjectReference . |
objectTypeReferenced |
When type is ObjectReference , this is the object being reference. For example: User , Product , Country , etc. |
required |
Boolean value indicating whether or not the entry requirement must be specified when initiating a lifecycle action. |
editable |
Boolean value indicating whether or not the value can be edited by the user. |
repeating |
Boolean value indicating whether or not the entry requirement can have multiple values. |
minValue |
Indicates the minimum character length for the value. |
maxValue |
Indicates the maximum character length for the value. |
values |
When type is Picklist , this provides a list of possible values that can be used. |
currentSetting |
When a value has already been set, this shows the value. |
scope |
Indicates where the property is defined. This can be one of Document , Binder , WorkflowActivation , EmailFragment , ControlledCopy , or CreatePresentation . |
Version History
Available in API v6.0 or later.
Initiate Lifecycle Action
Once you've identified the entry requirements, use this request to initiate the lifecycle action on a specific version of a document or binder.
Method & Endpoint
Documents: Send a PUT
request to the /api/{VERSION}/objects/documents/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions/{LIFECYCLE_ACTION}
endpoint.
Binders: Send a PUT
request to the /api/{VERSION}/objects/binders/{ID}/versions/{major_version_number__v}/{minor_version_number__v}/lifecycle_actions/{LIFECYCLE_ACTION}
endpoint.
Request Headers
- To specify the input format, set the HTTP Request Header
Content-Type
toapplication/x-www-form-urlencoded
(name-value pair input). - JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
ID
- Theid
field value of the document on which to initiate a lifecycle action.major_version_number__v
- Major version number of the document.minor_version_number__v
- Minor version number of the document.LIFECYCLE_ACTION
- Thename__v
value of the lifecycle action to be initiated. This is retrieved from the first request above.
Example Request 1
In this request, we'll initiate the "Start Approval" workflow.
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "dueDate=2015-12-25" \
-d "Approver=user:12021,user:12022,group:10030003" \
https://myvault.veevavault.com/api/v14.0/objects/documents/222/versions/0/1/lifecycle_actions/startApproval
Request Details
This request is initiating a workflow activation lifecycle action on the document. We're initiating the "Start Approval" workflow.
- Recall from the discussion in the previous section that the two entry requirements are to assign a values to the
dueDate
andApprover
fields. - The entry requirement Scope is set to WorkflowActivation (
"scope": "WorkflowActivation"
), meaning the values can be included as a name-value pairs with the request. - Format the
dueDate
value as shown above. To assign users and/or groups to theApprover
role, include a comma-separated list of user and groupid
values.
On submitting this request, Vault will evaluate whether all the entry requirements have been met and, if so, initiate the lifecycle action.
Example Response
{
"responseStatus": "SUCCESS",
"id": 222,
"workflow_id__v": "115"
}
Response Details
- On SUCCESS, Vault returns the
id
value of the document on which the lifecycle action has been initiated and theworkflow_id__v
value of the workflow. - This document (
"id": 222
) was now in the "Start Approval" workflow ("workflow_id__v": "115"
). - On FAILURE, Vault returns an error type and message describing the reason for the error. The lifecycle action will not be initiated until all errors have been corrected.
Version History
Available in API v6.0 or later.
Example Request 2
In this request, we'll change the state of a document from "Draft" to "Approved".
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v14.0/objects/documents/222/versions/0/1/lifecycle_actions/approve
Request Details
This request is initiating a state change lifecycle action on the document. We're changing the state from "Draft" to "Approved".
- Recall from the discussion in the previous section that the only entry requirement is to assign a value to the document's
country__v
field. - The entry requirement Scope is set to Document (
"scope": "Document"
), meaning the country field value cannot be included as a name-value pair with the request. - Instead, before submitting this request, we used a separate Update Document request to update the country field on the document. This fulfilled the entry requirement.
- Therefore, we do not need to specify the input format (there is no input requirement) and the request can be submitted as shown in this example.
Example Response
{
"responseStatus": "SUCCESS",
"id": 222
}
Response Details
- On SUCCESS, Vault returns the
id
value of the document on which the lifecycle action has been initiated. - This document (
"id": 222
) was previously version 0.1 (Draft State). It is now version 1.0 (Approved/Steady State). - On FAILURE, Vault returns an error type and message describing the reason for the error. The lifecycle action will not be initiated until all errors have been corrected.
Version History
Available in API v6.0 or later.
Binders
Binders organize documents and sections and other binders into a hierarchical structure that is useful for packaging related documents together for easier management or eventual publishing. Binders are a kind of document and many of the Document API calls, such as metadata, retrieving and setting properties, security, etc. can be used directly on a binder and will not be replicated here. All API calls related to files and renditions will not work on a binder object. Binders do have unique APIs that allow for interrogating and manipulating the binder structure.
Create Binder
You can create a binder by sending a POST
request to the /api/{version}/objects/binders
endpoint.
- Refer to output from the Document Metadata APIs to determine the request parameters.
- Only properties marked as
"onCreateEditable": true
are valid and properties vary based on your Vault configuration. - No file can be uploaded as part of a binder creation
- To create a document from a template, include a query parameter
fromTemplate
and specify the name of the template as returned from the "Document Type/Subtype/Classification Metadata" API. Only templates of typebinder
are allowed and the document type of the document being created must match the metadata API path.
By default the binder metadata is indexed synchronously. To process the indexing asynchronously, include an optional request parameter async
set to true
.
Response
On success, Vault create a binder returns the ID of the newly created binder
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Successfully created binder.",
"id": 33
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
v7.0: asynchronous metadata indexing supported
Retrieve Binder
You can retrieve the binder properties and it's node tree structure by sending a GET
request to the /api/{version}/objects/binders/{id}
endpoint.
Request Parameters
Field | Description |
---|---|
depth |
[string] number of levels to return of the binder structure. Default is "1" and will return top level sections in the binder. Valid values are "1" and "all" where "all" returns the entire binder structure. An example would be .../objects/binders/1255?depth=all to return the entire binder structure. |
Response
On success, Vault retrieves the properties of a binder (in exactly the same format as the "Retrieve Document" API) and retrieves the components of the binder in a hierarchical structure clearly showing the parent-child relationships for each item and maintaining the specific order of the objects in each level.
For each binder, the API will return:
* order__v
Order within the section or binder
* type__v
Document
* id
Node ID of the document, unique within the binder
* document_id__v
ID of the document
* name__v
Name of the document
* major_version_number__v
Major version (if binding rule = specific)
* minor_version_number__v
Minor version (if binding rule = specific)
For each section, the API will return:
* order__v
Order within the section or binder
* type__v
Section
* id
ID of the section, unique within the binder
* name__v
Name of the section
* section_number__v
Section number (optional)
For each binder, the API will return:
* order__v
Order within the section or binder
* type__v
= Binder
* id
ID of the binder
* name__v
Name of the binder
NOTE: When a contained binder is listed here, no children of that binder are listed. It will require a separate "Retrieve Binder" API call in that binder to get its structure.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
Version History
Since: v5.0
Retrieve Binder Versions
Binders have versions just like regular documents.
You can retrieve the available binder versions by sending a GET
request to the /api/{version}/objects/binders/{id}/versions
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions
Response
On success, Vault returns a list of the available versions for the specified binder.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Retrieve Binder Version
You can retrieve the binder properties and values for the specific binder version by sending a GET
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}
Response
On success, Vault returns the properties and property values for the specified version of the binder. Response properties will vary based on properties defined for the document type classification of the specified binder. The shaper and the contents of the response is similar to the response of the "Retrieve Binder" API
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Update Binder Properties
You can update the binder properties by sending a PUT
request to the /api/{version}/objects/binders/{id}
endpoint.
Refer to the output of the Document Metadata APIs, only those properties that are marked as "editable": true
are valid.
To reclassify the binder, set the reclassify
request parameter to true
(set to false
by default). While reclassifying you are able to set the lifecycle/type/subType/classifications for the binder and with the properties required for the specified classification.
Response
On success, Vault returns the ID of the updated binder.
v8.0 Notes: reclassify supported
Example:
{
"responseStatus": "SUCCESS",
"id": 32
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
Version History
Since: v5.0
v8.0: reclassify supported
Update Binder Version Properties
You can update the binder properties of the specific binder version by sending a PUT
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}
endpoint.
Refer to the output of the Document Metadata APIs, only those properties that are marked as "editable": true
are valid.
Response
On success, Vault updates the specified version of the binder and returns the id of the updated binder.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Create Draft
You can create a new draft version for a binder by sending a POST
request to the /api/{version}/objects/binders/{id}
endpoint.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}
Response
On success, the response contains the major and minor versions of the newly created binder draft.
Errors
On failure, the response contains an error message.
Type | Message | Description |
---|---|---|
INSUFFICIENT_ACCESS |
User does not have sufficient privileges to perform the action. | This error condition occurs when the user does not have permissions to create a draft. |
INVALID_BINDER |
Binder not found {id}. | The error condition occurs when the user specifies a binder {id} that does not exist. |
Version History
Since: v7.0
Delete Binder
You can delete the binder by sending a DELETE
request to the /api/{version}/objects/binders/{id}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}
Response
On success, Vault returns the id of the deleted binder.
{
"responseStatus": "SUCCESS",
"id": 35
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Delete Binder Version
You can delete the specific binder version by sending a DELETE
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}
endpoint.
Note: If a binder has only one version, you cannot delete it.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}
Response
On success, Vault returns the id of the deleted binder.
{
"responseStatus": "SUCCESS",
"id": 124
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Create a Binder Relationship
You can create a binder relationship by sending a POST
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships
endpoint.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-d "target_doc_id__v=13&relationship_type__v=supporting_documents__vs&target_major_version__v=0&target_minor_version__v=1" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships
Request Parameters
Field | Description |
---|---|
target_doc_id__v |
[required] relationship target document id |
relationship_type__v |
[required] is the value of property value of one of the desired relationshipTypes from the "Documents Relationships Metadata" call |
target_major_version__v |
[optional] if applicable to the type of relationship being created, this is the major version of the target document |
target_minor_version__v |
[optional] if applicable to the type of relationship being created, this is the minor version of the target document |
Response
On success, Vault returns the id of the newly created binder relationship
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Retrieve a Binder Relationship
You can retrieve a binder relationship by sending a GET
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships/{relationshipId}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships/{relationshipId}
Response
On success, Vault return the requested relationship. The relationship has the following properties:
Field | Description |
---|---|
id |
Relationship ID |
source_doc_id |
Document ID for source document |
relationship_type__v |
Relationship type |
created_by__v |
User ID of user who created the relationship |
created_date__v |
Timestamp when the relationship was created |
target_doc_id__v |
Document ID for target document |
target_major_version__v |
Major version of the target document; null values indicate that the relationship applies to all major versions |
target_minor_version__v |
Minor version of the target document; null values indicate that the relationship applies to all minor versions |
Example:
{
"responseStatus": "SUCCESS",
"relationships": [
{
"relationship": {
"id": 41,
"source_doc_id__v": 32,
"relationship_type__v": "supporting_documents__vs",
"created_by__v": 25496,
"created_date__v": "2013-04-11T19:46:59.000Z",
"target_doc_id__v": 14
}
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
v6.0: The response no longer includes the target_major_version__v
property for relationships that are not version specific.
v6.0: The response now includes the created_by__v
, created_date__v
, and source_doc_id__v
properties.
Delete a Binder Relationship
You can delete a binder relationship by sending a DELETE
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships/{relationshipId}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}/relationships/{relationshipId}
Response
On success, Vault deletes the requested relationship and returns the ID of the deleted relationship.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Update Binder Binding Rule
You can update document version binding rules for the binder, either for all documents and sections within the binder that do not already have binding rules set or for all documents and sections regardless of previous binding rules.
You can update the binding rules by sending a PUT
request to the /api/{version}/objects/binders/{id}/binding_rule
endpoint.
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-d "binding_rule__v=steady-state&binding_rule_override__v=true" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/binding_rule
Request Parameters
Field | Description |
---|---|
binding_rule__v |
[required] Indicates which binding rule to apply (which document versions to link to the section); options are default , steady-state , and current |
binding_rule_override__v |
[required] Indicates if the specified rule should override documents or sections which already have binding rules set; options are true , and false |
Binding Rules:
* default
Latest available (assumed if binding_rule is blank)
* steady-state
Latest version in steady-state state
* current
Version currently in use
Response
On success, Vault returns the ID of updated binder.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_BINDING_RULE |
Binder rule not recognized |
Version History
Since: v5.0
Create Section
You can create a binder section by sending a POST
request to the /api/{version}/objects/binders/{id}/sections
endpoint.
Request Parameters
Field | Description |
---|---|
name__v |
[retuired] Section name |
section_number__v |
[optional] Section number |
parent_id__v |
[optional] Node ID of the parent section; if blank, the new section will be a top-level section. |
order__v |
[order] Order within the parent section or (if top-level) within the binder; "0" is the first position. Blank means add it as the last element in the binder or parent section. |
Response
On success, Vault returns the node ID of the newly created section. It is unique within the binder, regardless of level.
{
"responseStatus": "SUCCESS",
"id": "1365789543654"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
REQUIRED_FIELD_NOT_PRESENT |
Section name not present |
INVALID_SECTION |
Parent section ID is not a valid section |
Version History
Since: v5.0
Retrieve Section(s)
You can retrieve a binder section by sending a GET
request to the /api/{version}/objects/binders/{id}/sections/{section_node_id}
endpoint. If {section_node_id}
blank in the endpoint, sections directly linked to the top-level binder will be returned.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/sections/{section_node_id}`
Response
On success, Vault returns the list of all sections, documents and binders within the top-level binder (if {section_node_id}
is blank on the endpoint) or retrieves a list of all sections, documents, and binders within the specified section (if {section_node_id}
is a valid section within the binder}.
For each document, the API will return:
* order__v
Order within the section
* type__v
Document
* document_id__v
ID of the document
* name__v
Name of the section
* id
Unique ID of the node within the binder
* major_version_number__v
Major version (if binding rule = specific)
* minor_version_number__v
Minor version (if binding rule = specific)
For each section, the API will return:
* order__v
Order within the section
* type__v
Section
* id
ID of the section, unique within the binder
* name__v
Name of the section
* section_number__v
Section number (optional)
For each binder, the API will return:
* order__v
Order within the section
* type__v
Binder
* binder_id
ID of the binder
* name__v
Name of the binder
Note that the section node ID passed in may be at any level within the binder hierarchy as section node IDs are unique within the binder.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_SECTION |
Parent section ID is not a valid section |
Version History
Since: v5.0
Retrieve Binder Version Section
You can retrieve a binder section for in a specific binder version by sending a GET
request to the /api/{version}/objects/binders/{id}/versions/{major}/{minor}/sections/{section_node_id}
endpoint. If {section_node_id}
blank in the endpoint, sections directly linked to the top-level binder will be returned.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/versions/{major}/{minor}/sections/{section_node_id}`
Response
On success, Vault returns the list of all sections, documents and binders within the top-level binder (if {section_node_id}
is blank on the endpoint) or retrieves a list of all sections, documents, and binders within the specified section (if {section_node_id}
is a valid section within the binder}.
For each document, the API will return:
* order__v
Order within the section
* type__v
Document
* document_id__v
ID of the document
* name__v
Name of the section
* id
Unique ID of the node within the binder
* major_version_number__v
Major version (if binding rule = specific)
* minor_version_number__v
Minor version (if binding rule = specific)
For each section, the API will return:
* order__v
Order within the section
* type__v
Section
* id
ID of the section, unique within the binder
* name__v
Name of the section
* section_number__v
Section number (optional)
For each binder, the API will return:
* order__v
Order within the section
* type__v
Binder
* binder_id
ID of the binder
* name__v
Name of the binder
Note that the section node ID passed in may be at any level within the binder hierarchy as section node IDs are unique within the binder.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_SECTION |
Parent section ID is not a valid section |
Version History
Since: v5.0
Update Section
You can update the section name or the number of an existing section and/or move the section to a different location within the binder by sending a PUT
request to the /api/{version}/objects/binders/{id}/sections/{section_node_id}
endpoint.
Request Parameters
Field | Description |
---|---|
name__v |
[optional] Section name |
section_number__v |
[optiona] Section number |
parent_id__v |
[optional] ID of new parent section or of binder, if the section is top-level; specifying a parent ID will move the section within the hierarchy. If blank, the section stays in the same level within the hierarchy |
order__v |
[optional] New location within the binder. If moving to a new section (as defined by new parent_id__v being specified), this is the position within the target section or binder. If new parent_id__v is blank, the sections will move within the current section. If new order__v is greater than the available positions, it will be placed in the last position. |
All other items in the section or binder will move down one position. If order__v
is blank and new parent_id__v
is entered, the section will move to the last position in the new parent.
Response
On success, Vault returns the node ID of the updated section.
{
"responseStatus": "SUCCESS",
"id": "1365704338631"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_SECTION |
Section ID is not a valid section |
INVALID_TARGET_SECTION |
Parent ID is not a valid section within the binder or the Binder ID itself |
Version History
Since: v5.0
Update Section Binding Rule
You can update the section binding rule by sending a PUT
request to the /api/{version}/objects/binders/{id}/sections/{section_node_id}/binding_rule
endpoint.
Binding rule setting applies to the current section and all sub-sections.
Request Parameters
Field | Description |
---|---|
binding_rule__v |
[required] which binding rule indicating which versions of documents will be linked to the section and the ongoing behavior; options are default , steady-state , and current |
binding_rule_override__v |
[required] if set to true then binding rule is applied to all documents and sections within the current section. If blank or false then binding rule is applied only to documents and sections within the current section that do not have a binding rule specified; options are true , and false |
Binding Rules:
* default
Latest available (assumed if binding_rule is blank)
* steady-state
Latest version in steady-state state
* current
Version currently in use
Response
On success, Vault returns the node ID of the updated section.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_SECTION |
Section ID is not a valid section |
Version History
Since: v5.0
Delete Section
You can delete a binder section by sending a DELETE
request to the /api/{version}/objects/binders/{id}/sections/{section_node_id}
endpoint.
By deleting the section, it will be removed from its parent binder and all documents will be unlinked from the binder. If there are sub-sections and documents under the current section, they will be deleted (for sections) and unlinked (for documents) as well.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/sections/{section_node_id}`
Response
On success, Vault returns the node ID of the deleted section.
{
"responseStatus": "SUCCESS",
"id": "1365704338631"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_SECTION |
Section ID is not a valid section |
Version History
Since: v5.0
Add Document to Binder
You can link an existing document to a location within a binder (either at the top level or within a section in the binder) by sending a POST
request to the /api/{version}/objects/binders/{binder ID}/documents
endpoint.
Request Parameters
Field | Description |
---|---|
document_id__v |
[required] ID of the document being added to the binder |
parent_id__v |
[required] Section ID of the parent section, if the document will be in a section rather than top-level. Note: the section ID is unique no matter where it is in the binder hierarchy. Blank means adding the document at the top-level binder. |
order__v |
[optional] Order within the parent section or binder ("1" is the first position). Blank means add it as the last element in the binder or parent section. |
binding_rule__v |
[optional] binding rule indicating which version of the document will be linked to the binder and the ongoing behavior. Options are:
|
major_version_number__v |
if binding_rule is specific , then required and indicates the major version of the document to be linked, otherwise ignored |
minor_version_number__v |
if binding_rule is specific , then required and indicates the minor version of the document to be linked. Otherwise ignored |
Response
On success, Vault returns the node id of the newly linked document
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_DOCUMENT |
Document ID is not present |
INVALID_SECTION |
Parent section ID is not a valid section |
MISSING_MAJOR_VERSION |
Document major version was not specified and binding rule was specific |
MISSING_MINOR_VERSION |
Document minor version was not specified and binding rule was specific |
Version History
Since: v5.0
Move Document Within Binder
You can move the document to a different location within the binder by sending a PUT
request to the /api/{version}/objects/binders/{id}/documents/{node_id}
endpoint.
The {node_id}
must be a valid ID representing a document node currently linked to the binder
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-d "parent_id__v=1365789543654&order__v=3" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/documents/{node_id}
Request Parameters
Field | Description |
---|---|
parent_id__v |
[optional] the node ID of the new parent section (or binder if moving it to the top level of the binder) |
order__v |
[optional] the ordinal position within the target section or binder. If parent_id__v is blank, the the document will be moved within the current section. If order__v is greater than the available positions, it will be placed in the last position. |
Response
On success, Vault returns the node ID of the moved document within the binder
Example:
{
"responseStatus": "SUCCESS",
"id": "1365798869626"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_DOCUMENT |
Document ID is not a valid document or the document is not linked to the selected binder |
INVALID_TARGET_SECTION |
Parent ID is not a valid section within the binder or the Binder ID itself |
Version History
Since: v5.0
Update Document Binding Rules
You can update the binding rules for the document within a specified binder by sending a PUT
request to the /api/{version}/objects/binders/{id}/documents/{node_id}/binding_rule
endpoint.
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-d "binding_rule__v=specific&major_version_number__v=1&minor_version_number__v=0" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/documents/{node_id}/binding_rule
Request Parameters
Field | Description |
---|---|
binding_rule__v |
[optional] Binding rule indicating which versions of documents will be linked to the section and the ongoing behavior. Options are:
|
major_version_number__v |
if binding_rule is specific , then required and indicates the major version of the document to be linked, otherwise ignored |
minor_version_number__v |
if binding_rule is specific , then required and indicates the minor version of the document to be linked. Otherwise ignored |
Response
On success, Vault returns the node ID of the updated document node within the binder
{
"responseStatus": "SUCCESS",
"id": "1365798869626"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_DOCUMENT |
Document ID is not a valid document or the document is not linked to the selected binder |
Version History
Since: v5.0
Remove Document from Binder
You can unlink an existing document from a location within a binder (either at the top level or within a section in the binder) by sending a DELETE
request to the /api/{version}/objects/binders/{id}/documents/{node_id}
endpoint.
By unlinking the document, you remove it from the specified location within the binder, this does not actually delete the document from Vault.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/binders/{id}/documents/{node_id}
Response
On success, Vault returns the node ID of the removed document node
Example:
{
"responseStatus": "SUCCESS",
"id": "1365798869626"
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INVALID_BINDER |
ID passed is not for a binder |
INVALID_DOCUMENT |
Document ID is not present |
Version History
Since: v5.0
Roles
Documents can have different roles available to them depending on their document type and lifecycles. Roles are important in that users and groups get assigned to document roles both at document creation time as well as during document workflows. There are a set of default roles that ship with Vault: Owner, Coordinator, Editor, Approver, Reviewer, Viewer, and Consumer. In addition there can be custom roles defined per lifecycle that reflect business roles that are particular to a document type. Regardless of how a role was assigned, they have specific permissions on a document based on a lifecycle state. Through the Roles APIs, you can retrieve available roles for a document, determine who can be assigned to the role, default users that get assigned automatically within the Vault UI, and who is currently assigned to the role. You can also add additional users and groups to a role and remove users and groups as needed. Note that all user and group information is returned as IDs and you need to use the "Retrieve User" or "Retrieve Group" API to determine the name, etc.
Retrieve Document Roles
You can retrieve the active available roles for a document, available users and groups for the role, and any defaulted users or groups by sending a GET
request to the /api/{version}/objects/documents/{id}/roles
endpoint.
This information varies on a per document basis based on the document's lifecycle and associated properties that can alter the available users and groups that can be put in a role.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/roles
Response
On success, Vault returns the list of all active roles assigned to the specified document:
Fields | Description |
---|---|
documentRoles[n] |
List of all active roles assigned to the selected document |
-- name |
Role name (public key) |
-- label |
Role label |
-- assignedUsers |
List of the IDs for all users in the selected role assigned to the document |
-- assignedGroups |
List of the IDs for all groups in the selected role assigned to the document |
-- availableUsers |
List of the IDs for all users available in the selected role |
-- availableGroups |
List of the IDs for all groups available in the selected role |
-- defaultUsers |
List of the default user IDs for the selected role |
-- defaultGroups |
List of the default group IDs for the selected role |
Example:
{
"responseStatus": "SUCCESS",
"documentRoles": [
. . .
{
"name": "reviewer__v",
"label": "Reviewer",
"assignedUsers": [],
"assignedGroups": [],
"availableUsers": [
31662,
34525,
25507,
31615,
31810
],
"availableGroups": [
1
],
"defaultUsers": [],
"defaultGroups": []
},
{
"name": "archivist__c",
"label": "Archivist",
"assignedUsers": [],
"assignedGroups": [],
"availableUsers": [
31662,
34525,
25507,
31615,
31810
],
"availableGroups": [
1
],
"defaultUsers": [],
"defaultGroups": []
}
. . .
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Retrieve Document Role Assignments
You can retrieve the users and groups assigned to a particular role on a document by sending a GET
request to the /api/{version}/objects/documents/{id}/roles/{name}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/roles/{name}
Response
On success, Vault returns the users and groups assigned to a particular role on a specified document:
Fields | Description |
---|---|
documentRoles[1] |
Contains the active roles assigned to the document for a specific role |
-- name |
Role name (public key) |
-- label |
Role label |
-- assignedUsers |
List of the IDs for all users in the selected role assigned to the document |
-- assignedGroups |
List of the IDs for all groups in the selected role assigned to the document |
-- availableUsers |
List of the IDs for all users available in the selected role |
-- availableGroups |
List of the IDs for all groups available in the selected role |
-- defaultUsers |
List of the default user IDs for the selected role |
-- defaultGroups |
List of the default group IDs for the selected role |
Exmaple:
{
"responseStatus": "SUCCESS",
"responseMessage": "Document role retrieved",
"documentRoles": [
{
"name": "reviewer__v",
"label": "Reviewer",
"assignedUsers": [],
"assignedGroups": [],
"availableUsers": [
31662,
34525,
25507,
31615,
31810
],
"availableGroups": [
1
],
"defaultUsers": [],
"defaultGroups": []
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
ROLE_NOT_FOUND |
Role of name [name] was not found |
Version History
Since: v5.0
Assign Users/Groups to Role
You can add a user or group to a document by assigning them to an available role for the document by sending a POST
request to the /api/{version}/objects/documents/{id}/roles
endpoint.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-d "consumer__v.users=19376,18234,19456&legal__c.groups=19365,18923"
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/roles/{name}
Request Parameters
Provide lists of users or groups and their corresponding roles in the form of {role_name}.{"users"|"groups"}=ID1,ID2 for example:
consumer__v.users=19376,18234,19456
legal__c.groups=19365,18923
Fields | Description |
---|---|
{role_name}.users |
[optional] Name (public key) of the role to which you're adding a user with ".users" appended to indicate that the ID is for a user |
{role_name}.groups |
[optional] Name (public key) of the role to which you're adding a group with ".groups" appended to indicate that the ID is for a group |
Note that if the role is not available for the document or the user/group is not allowed for the role, the API will skip assigning that user/group but will attempt other users/groups in the request. You will need to confirm the list of role:ID pairs returned in the results with the requested roles to ensure all users and groups were successfully added.
Response
On success, Vault returns a list of role:ID pairs for each of the successfully added users or groups.
{
"responseStatus": "SUCCESS",
"responseMessage": "Document roles updated",
"updatedRoles": {
"consumer__v": {
"users": [
19376,18234,19456
]
},
"legal__c": {
"groups": [
19365,18923
]
}
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v5.0
Delete User/Group from Role
You can delete a selected user or group from a document's role by sending a DELETE
request to the /api/{version}/objects/documents/{id}/roles/{role_name}.{"user"|"group"}/{user ID | group ID}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/documents/{id}/roles/consumer__v.user/19376
Response
On success, Vault returns the ID of the deleted user.
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "User/group deleted from document role",
"updatedRoles": {
"consumer__v": {
"users": [
19376
]
}
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
ROLE_NOT_FOUND |
Role of name [role_name] was not found |
USER_OR_GROUP_NOT_FOUND |
User or group of ID [user/group ID] was not assigned to role [role_name] |
Version History
Since: v5.0
Users
The users
object represents the actual users of Veeva Vault. This API lets you create, retrieve, update and delete users in the Vault domain as well as manage the users in the specific Vault application.
User Metadata
The users
object consists of the following fields:
Field | Description |
---|---|
id |
The user's ID |
user_name__v |
The user's Vault username in the given Vault domain formatted as email address |
user_first_name__v |
The user's first name |
user_last_name__v |
The user's last name |
user_email__v |
The user's email address |
user_timezone__v |
The user's timezone. The valid values are included in the output of the "User Metadata" API |
user_locale__v |
The user's locale. The valid values are included in the output of the "User Metadata" API |
user_language__v |
The user's language. The valid values are included in the output of the "User Metadata" API |
user_title__v |
The user's title |
office_phone__v |
The user's office phone number |
fax__v |
The user's fax number |
mobile_phone__v |
The user's mobile number |
company__v |
The user's company name |
site__v |
The user's site/location |
is_domain_admin__v |
Indicates if user is a domain administrator |
active__v |
Indicates if the user is active in the current Vault application |
domain_active__v |
Indicates if the user is active in the Vault domain |
security_policy_id__v |
The user's security policy. The valid values are included in the output of the "Security Policy Retrieval" API |
user_type_id__v |
The user's user type ID in the current Vault application. The valid values are included in the output of the "User Metadata" API |
user_needs_to_change_password__v |
Whether user needs to change their password on next login |
group_id__v |
The list of groups the user is a member of |
domain_id__v |
The ID of the Vault domain the user is a member of |
vault_id__v |
The list of Vault applications the user is a member of |
federated_id__v |
The user's federated ID to be used in SAML Single Sign-on scenario |
salesforce_user_name__v |
The user's Salesforce.com username to be used in Salesforce Delegated Auth scenario |
medidata_user_email__v |
The user's Medidata email to be used in Medidata Delegated Auth scenario |
last_login__v |
Timestamp when the user last logged into Vault |
created_date__v |
Timestamp when the user was created in the Vault domain |
created_by__v |
The user ID of the user who created this user in the Vault domain |
modified_date__v |
Timestamp when the user was last modified in the Vault domain |
modified_by__v |
The user ID of the user who last modified this user in the Vault domain |
Retrieve User Metadata
You can retrieve the user metadata by sending the GET
request to the /api/{version}/metadata/objects/users
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/users
Response
On success, Vault returns the list of user properties, each property is described with this metadata field information:
Field | Description |
---|---|
name |
Name (public key) of the property |
type |
Data type of property (id ,ObjectReference , String , Calendar , Boolean ) |
object |
The object type when type is set to ObjectReference |
multivalue |
Indicates if the property is multi-valued |
queryable |
Indicates if the property is exposed in query |
length |
Maximum number of characters for the property value |
required |
indicates if the property is required |
onCreateEditable |
Indicates if the property can only be set on user creation |
editable |
Indicates if the property is editable |
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Create User
You can creates a new user in the Vault domain and/or the current Vault application by sending POST
request to /api/{version}/objects/users
endpoint.
- The HTTP Request Header
Content-Type
must be set tomultipart/form-data
. - Refer to the output of the "User Metadata" API for the request parameters. Only properties marked as
"onCreateEditable": true
are valid for the user creation, only those that are marked as"required": true
must be set. - To upload a profile picture file, use multi-part attachment with the file component named
file
.
Domain Level User Management
The Domain Administrators are able to create users in the Vault domain without adding them to a Vault application by including additional request parameter domain
set to true
. When creating users in the domain only, active__v
and user_type_id__v
properties are not required.
Response
On success, Vault returns the ID of the newly created user.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v7.0: domain-level properties supported
v8.0: domain_active__v property cannot be set during User creation
Retrieve Users
You can retrieve the users in the Vault domain and/or the current Vault application by sending a GET
request to the /api/{version}/objects/users
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/users
The Administrators are allowed to access user's profile information across the Vault domain. The Domain Administrators are additionally allowed to access user's Vault membership information across the Vault domain.
Request Parameters
The Administrators (System Administrator, Vault Owner) are able to access user information across the domain by including optional query string parameter vaults
set as following:
all
Return users across entire domain-1
Return users across entire domain excluding current Vault instance- comma-delimited Vault application IDs. Return users from Vault instances included in the list
The Administrator must have administrative access to Vault application referenced in the vaults
parameter to be able to access users from that Vault. Domain Administrator have unrestricted access to all users in the Domain domain.
Response
On success, Vault returns the properties of the users
The response supports pagination. By default the page limit is set to 200 records. The pagination parameters are:
Field | Description |
---|---|
limit |
[optional, default is 200] the size of the result set in the page |
start |
[optional, default is 0] the starting record number |
sort |
[optional, default is "id asc"] the sort order for the result set (asc - ascending, desc - descending) (e.g. user_name__v asc ) |
Administrators (System Administrator, Vault Owner) can access user's Vault membership from vault_membership
field in each of the user records. The Domain Administrators additionally can access user's user_type__v
and active__v
status in each of the Vault instances.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v7.0: added support for accessing the user information across the domain for Administrators
Retrieve User
You can retrieve the user record by sending the GET
request to the /api/{version}/objects/users/{id}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/users/{id}
Response
On success, Vault returns the properties of the specified user
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Update User
You can updates the user record in the Domain and/or the current Vault application by sending a PUT
request to the /api/{version}/objects/users/{id}
endpoint.
Request Parameters
Refer to the output of the "User Metadata" API for the request parameters. Only properties marked as "editable=true
are valid for the user update. The API currently does not support the update of profile pictures.
Domain Level User Management
Administrators (System Administrator, Vault Owner) are able to update users in the Vault applications where they have administrative access. Domain Administrators have an unrestricted access to users in the entire Domain.
To activate/deactivate the user at the Domain level, domain_active__v
property can be set to respective boolean value. Disabling the user (i.e. setting domain_active__v
to false
) at the domain level will disable the user in every Vault in the domain. Re-enabling the user, on the other hand, will only re-enable them at the domain level. This property is only editable by the Domain Administrator users.
To promote the user to Domain Admin, is_domain_admin__v
property can be set to true
. Only a Domain Administrator user is capable of promoting another domain user to Domain Admin role. Similarly, to demote the user from Domain Admin, domain_admin__v
property can be set to false
. Only Domain Admin user can demote a user. The Domain Admin can demote it's own user record only if there is another active Domain Admin user in the domain.
Response
On success, Vault returns the id of the updated user.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v7.0: Domain-level user management is supported
Disable User
You can disables the user in the Domain or the current Vault application by sending a DELETE
request to the /api/{version}/objects/users/{id}
endpoint.
By default the user is disabled at Vault level. The Domain Administrator users can optionally disable the user at the domain level by setting domain
request parameter to true
, affecting the user's status in every Vault application in the domain.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/users/{id}?domain=true
Response
On success, Vault returns the ID of the disabled user
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
v7.0: Domain-level user management is supported
Change Password
You can change your password by sending the POST
request to the /api/{version}/objects/users/{id}/password
endpoint.
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-d "password__v=CurrentPassword&new_password__v=NewPassword" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/users/{id}/password
Request Parameters
Field | Description |
---|---|
password__v |
[required] Current password |
new_password__v |
[required] New password |
Response
On success, Vault changes the password and returns SUCCESS.
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INSUFFICIENT_ACCESS |
User attempted to change someone else's password |
PARAMETER_REQUIRED |
The required parameter was not specified. |
INVALID_DATA |
|
Version History
Since: v7.0
Update Vault Membership
You can manage the user's Vault membership in the domain by sending the PUT
request to the /api/{version}/objects/users/{id}/vault_membership/{vaultId}
endpoint.
NOTE: Accessible only to Administrator users
Through this API it is possible to:
- add a domain user to a Vault
- deactivate user's Vault membership in a specified Vault
- manage user's user type in a specified Vault
Request Parameters
Field | Description |
---|---|
user_type_id__v |
[optional, default: 2, Document User] The user's user type ID in the specified Vault. The Vault ID values are included in the output of the "Domain Information" API |
active__v |
[optional default: true] Indicates if the user is active in the specified Vault instance |
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Error Type | Description |
---|---|
INSUFFICIENT_ACCESS |
|
OPERATION_NOT_ALLOWED |
|
INVALID_DATA |
User is providing an invalid value for the user type |
Version History
Since: v7.0
Groups
The groups
object represents the Groups in Veeva Vault. This API lets you create, retrieve, update and delete groups in Vault as well as manage the users in these groups.
Group Metadata
The groups
object consists of the following fields:
Field | Description |
---|---|
id |
The group ID |
group_name__v |
The group name |
group_description__v |
The group description |
members__v |
The list of user IDs of users who are members of this group |
active__v |
Indicates if this group is active |
system_group__v |
Indicates if this group is a system managed group |
created_date__v |
Timestamp when the group was created |
created_by__v |
The user ID of the user who created the group |
modified_date__v |
Timestamp when the group was last modified |
modified_by__v |
The user ID of the user who last modified the group |
Retrieve Group Metadata
You can retrieve the group metadata by sending the GET
request to the /api/{version}/metadata/objects/groups
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/groups
Response
On success, Vault returns the list of group properties, each property is described with this metadata field information:
Field | Description |
---|---|
name |
Name (public key) of the property |
type |
Data type of property (id ,ObjectReference , String , Calendar , Boolean ) |
object |
The object type when type is set to ObjectReference |
multivalue |
Indicates if the property is multi-valued |
queryable |
Indicates if the property is exposed in query |
length |
Maximum number of characters for the property value |
required |
Indicates if the property is required |
onCreateEditable |
Indicates if the property can only be set on group creation |
editable |
Indicates if the property is editable |
Example:
{
"responseStatus": "SUCCESS",
"properties": [
{
"name": "id",
"type": "id",
"length": 20,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "group_name__v",
"type": "String",
"length": 255,
"editable": true,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "group_description__v",
"type": "String",
"length": 200,
"editable": true,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": true
},
{
"name": "system_group__v",
"type": "Boolean",
"length": 1,
"editable": false,
"queryable": true,
"required": false,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "created_date__v",
"type": "Calendar",
"length": 0,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "created_by__v",
"type": "ObjectReference",
"length": 20,
"object": "users",
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "modified_date__v",
"type": "Calendar",
"length": 0,
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "modified_by__v",
"type": "ObjectReference",
"length": 20,
"object": "users",
"editable": false,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
},
{
"name": "members__v",
"type": "ObjectReference",
"length": 20,
"object": "users",
"editable": true,
"queryable": false,
"required": true,
"multivalue": true,
"onCreateEditable": true
},
{
"name": "active__v",
"type": "Boolean",
"length": 1,
"editable": true,
"queryable": true,
"required": true,
"multivalue": false,
"onCreateEditable": false
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Create Group
You can create a group by sending a POST
request to the /api/{version}/objects/groups
endpoint.
For example:
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-d "group_name__v=Clinical Reviewers&members__v=25515,26180" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/groups
Request Parameters
Refer to the output of the "Retrieve Group Metadata" API for request parameters. Only those properties that are marked as "onCreateEditable": true
are valid for group creation, only those that are marked as "required": true
must be set.
Response
On success, Vault returns the ID of the newly created group
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Group successfully created.",
"id": 1367526751338
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Groups
You can retrieve a collection of all groups by sending a GET
request to the /api/{version}/objects/groups
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/groups
Response
On success, Vault returns the list of groups and their properties.
Example:
{
"responseStatus": "SUCCESS",
"groups": [
. . .
{
"group": {
"id": 4,
"group_name__v": "Business Administrators",
"active__v": true,
"members__v": [
31662,
31810
],
"created_by__v": 1,
"group_description__v": "All Business Administrators (System managed group)",
"modified_date__v": "2014-01-28T05:51:16.000Z",
"modified_by__v": 25507,
"system_group__v": true,
"created_date__v": "2013-12-09T23:32:20.000Z"
}
},
{
"group": {
"id": 3,
"group_name__v": "Document Users",
"active__v": true,
"members__v": [
31615
],
"created_by__v": 1,
"group_description__v": "All Document Users (System managed group)",
"modified_date__v": "2013-12-20T07:24:18.000Z",
"modified_by__v": 1,
"system_group__v": true,
"created_date__v": "2013-12-09T23:32:20.000Z"
}
},
{
"group": {
"id": 1386631968013,
"group_name__v": "External Users",
"active__v": true,
"members__v": [],
"created_by__v": 1,
"group_description__v": "All External Users (System managed group)",
"modified_date__v": "2013-12-09T23:32:48.000Z",
"modified_by__v": 1,
"system_group__v": true,
"created_date__v": "2013-12-09T23:32:48.000Z"
}
},
. . .
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Retrieve Group
You can retrieve the specified group and its properties by sending the GET
request to the /api/{version}/objects/groups/{id}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/groups/{id}
Response
On success, Vault returns the properties of the specified group.
Example:
{
"responseStatus": "SUCCESS",
"groups": [
{
"group": {
"id": 3,
"group_name__v": "Document Users",
"active__v": true,
"members__v": [
31615,
31618
],
"created_by__v": 1,
"group_description__v": "All Document Users (System managed group)",
"modified_date__v": "2013-12-20T07:24:18.000Z",
"modified_by__v": 1,
"system_group__v": true,
"created_date__v": "2013-12-09T23:32:20.000Z"
}
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Update Group
You can update the properties of the specified group by sending a PUT
request to the /api/{version}/objects/groups/{id}
endpoint.
For example:
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-d "group_name__v=Reviewers" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/groups/{id}
Request Parameters
Refer to the output of the "Retrieve Group Metadata" API for the request parameters. Only properties marked as "editable=true
are valid for the group update.
Response
On success, Vault returns the ID of the updated group.
{
"responseStatus": "SUCCESS",
"responseMessage": "Group successfully updated.",
"id": 27
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v1.0
Delete Group
You can delete a group by sending a DELETE
request to the /api/{version}/objects/groups/{id}
endpoint.
For example:
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/groups/{id}
Response
On success, Vault returns the ID of the deleted group
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Vault Objects
This API provides access to Vault Objects and the object data records.
NOTE: The Vault Objects API replaces the deprecated Catalogs API in Vault v8.
Object Metadata
The object consists of the following metadata:
Field | Description |
---|---|
created_by |
the ID of the user who created the object |
created_date |
the object creation timestamp in UTC format |
modified_by |
the ID of the user who last modified the object |
modified_date |
the object last modified timestamp in UTC format |
name |
the unique object identifier |
prefix |
the prefix used in object record IDs |
source |
the source of object creation: standard , sample , custom |
label |
the UI-friendly object label |
label_plural |
the plural version of the UI-friendly object label |
status |
the status of the object: active__v , inactive__v |
in_menu |
whether the object is listed in Vault menu |
help_content |
the short help describing the object |
description |
the description of the object |
order |
the order in which the object is listed |
auditable |
wether the audit events are created when object records are manupulated |
role_overrides |
whether the security overrided are enabled on the object record |
urls |
the hypermedia URLs to use to access details of the object and object records |
-- field |
the URL to use to access and manage object field(s) |
-- record |
the URL to use to access and manage a single object record(s) |
-- list |
the URL to use to access the collection of object records |
-- metadata |
the URL to use to access the object metadata |
relationships |
the relationships defined by this object (only returned if relationships defined) |
-- object |
the name of the related object |
-- field |
the name of the field in the related object that holds the reference |
-- type |
the relationship type |
-- label_plural |
the plural version of the UI-friendly related object label |
fields |
the fields defined by this object |
-- created_by |
the ID of the user who created the field |
-- created_date |
the field creation timestamp in UTC format |
-- modified_by |
the ID of the user who last modified the field |
-- modified_date |
the field last modified timestamp in UTC format |
-- name |
the unique field identifier |
-- source |
the source of field creation: standard , sample , custom |
-- label |
the UI-friendly field label |
-- type |
the type of data that can be stored by the field |
-- object |
the summary of the related object details (only returned if field type is Object ) |
---- url |
the URL to use to access the object metadata |
---- name |
the unique object identifier |
---- label |
the UI-friendly object label |
---- label_plural |
the plural version of the UI-friendly object label |
-- relationship |
the relationship type specified by the field: Parent , Reference (only returned if field type is Object ) |
-- status |
the status of the field: active__v , inactive__v |
-- required |
whether it is required to provide the data in the object record |
-- editable |
whether it is allowed to update the data in the object record |
-- help_content |
the short help describing the field |
-- list_column |
whether the field is listed in Vault UI tables and shows up in API record collections |
-- order |
the order in which the field is listed in the Vault UI forms |
-- picklist |
for field of type Picklist , the name of the Picklist containing the possible values |
-- multi_value |
for fields of type Picklist , whether multiple values can be selected for field in the object record |
Retrieve Object Collection
You can retrieve the collection of objects by sending a GET
request to the /api/{VERSION}/metadata/vobjects
endpoint. For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects
The response body is a collection containing summaries of all objects exposed by the VOF. Each summary in the collection consists of:
Field | Description |
---|---|
url |
the hypermedia URL to the object metadata details |
name |
the unique object identifier |
label |
the UI-friendly object label |
label_plural |
the plural version of the UI-friendly object label |
source |
the source of object creation: standard , sample , custom |
in_menu |
whether the object is listed in Vault Business Admin menu |
For example:
{
"responseStatus": "SUCCESS",
"objects": [
{
"url": "/api/v8.0/metadata/vobjects/product__v",
"label": "Product",
"name": "product__v",
"source": "standard",
"label_plural": "Products",
"in_menu": true
},
{
"url": "/api/v8.0/metadata/vobjects/country__v",
"label": "Country",
"name": "country__v",
"source": "standard",
"label_plural": "Countries",
"in_menu": true
},
{
"url": "/api/v8.0/metadata/vobjects/study__v",
"label": "Study",
"name": "study__v",
"source": "standard",
"label_plural": "Studies",
"in_menu": true
},
{
"url": "/api/v8.0/metadata/vobjects/location__v",
"label": "Location",
"name": "location__v",
"source": "standard",
"label_plural": "Locations",
"in_menu": true
},
{
"url": "/api/v8.0/metadata/vobjects/site__v",
"label": "Site",
"name": "site__v",
"source": "standard",
"label_plural": "Sites",
"in_menu": false
}
]
}
Localized Data
You can retrieve the localized strings for the following metadata fields: label
, label_plural
. To request the localized data include the loc
query string parameter set to true
on the endpoint URL. For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects?loc=true
When the localized data is requested, the response will contain additional field localized_data
containing the the map with localized strings for each of the localized fields. This data is available only if localized string are configured.
. . .
"localized_data": {
"label_plural": {
"en": "Sites"
},
"label": {
"de": "Durchführungsort",
"zh": "试验ä¸å¿ƒ",
"it": "Sede",
"fr": "Site",
"en": "Site",
"ru": "ИÑÑледовательÑкий центр",
"es": "Sitio",
"ja": "サイト"
}
}
. . .
Retrieve Object
You can retrieve the object metadata by sending the GET
request to the /api/{VERSION}/metadata/vobjects/{NAME}
endpoint. For example:
$ curl -X GET -H "Authorization: ${SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects/{NAME}
The response body consists of the detailed metadata.
For example:
{
"responseStatus": "SUCCESS",
"object": {
"created_by": 1,
"created_date": "2013-12-10T00:00:09.000Z",
"auditable": true,
"modified_date": "2013-12-10T00:00:09.000Z",
"status": [
"active__v"
],
"urls": {
"field": "/api/v8.0/metadata/vobjects/study__v/fields/{name}",
"record": "/api/v8.0/vobjects/study__v/{id}",
"list": "/api/v8.0/vobjects/study__v",
"metadata": "/api/v8.0/metadata/vobjects/study__v"
},
"label_plural": "Studies",
"label": "Study",
"in_menu": true,
"help_content": null,
"source": "standard",
"order": null,
"modified_by": 1,
"description": null,
"name": "study__v",
"relationships": [
{
"object": "site__v",
"field": "study_number__v",
"type": "child",
"label_plural": "Sites"
}
],
"fields": [
{
"created_by": 1,
"created_date": "2013-12-10T00:00:10.000Z",
"list_column": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "ID",
"type": "String",
"editable": false,
"help_content": null,
"order": 0,
"source": "standard",
"modified_by": 1,
"name": "id",
"required": false
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"max_length": 100,
"created_by": 1,
"list_column": true,
"unique": true,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Study Number",
"type": "String",
"editable": true,
"help_content": null,
"order": 1,
"source": "standard",
"modified_by": 1,
"name": "name__v",
"required": true
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Status",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 2,
"source": "standard",
"modified_by": 1,
"name": "status__v",
"multi_value": false,
"required": true,
"picklist": "study_record_status__v"
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"max_length": 60,
"created_by": 1,
"list_column": false,
"unique": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Alternate Study Number",
"type": "String",
"editable": true,
"help_content": null,
"order": 3,
"source": "sample",
"modified_by": 1,
"name": "alternate_study_number__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": true,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Product",
"object": {
"url": "/api/v8.0/metadata/vobjects/product__v",
"label": "Product",
"name": "product__v",
"label_plural": "Products"
},
"type": "Object",
"editable": true,
"relationship": "Reference",
"help_content": null,
"order": 4,
"source": "standard",
"modified_by": 1,
"name": "product__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"max_length": 500,
"created_by": 1,
"list_column": false,
"unique": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Study Name",
"type": "String",
"editable": true,
"help_content": null,
"order": 5,
"source": "sample",
"modified_by": 1,
"name": "study_name__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Indication",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 6,
"source": "standard",
"modified_by": 1,
"name": "indication__v",
"multi_value": false,
"required": false,
"picklist": "indication__vs"
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Route of Administration",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 7,
"source": "sample",
"modified_by": 1,
"name": "route_of_administration__v",
"multi_value": false,
"required": true,
"picklist": "route_of_administration__vs"
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": true,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Study Phase",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 8,
"source": "standard",
"modified_by": 1,
"name": "study_phase__v",
"multi_value": false,
"required": true,
"picklist": "study_phase__vs"
},
{
"created_date": "2013-12-10T00:00:10.000Z",
"created_by": 1,
"list_column": true,
"modified_date": "2013-12-10T00:00:10.000Z",
"status": [
"active__v"
],
"label": "Study Type",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 9,
"source": "standard",
"modified_by": 1,
"name": "study_type__v",
"multi_value": false,
"required": true,
"picklist": "study_type__vs"
},
{
"created_date": "2013-12-10T00:00:11.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Control",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 10,
"source": "standard",
"modified_by": 1,
"name": "control__v",
"multi_value": false,
"required": true,
"picklist": "control__vs"
},
{
"created_date": "2013-12-10T00:00:11.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Masking",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 11,
"source": "sample",
"modified_by": 1,
"name": "masking__v",
"multi_value": false,
"required": false,
"picklist": "masking__vs"
},
{
"created_date": "2013-12-10T00:00:11.000Z",
"created_by": 1,
"scale": 0,
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Enrollment",
"type": "Number",
"editable": true,
"help_content": null,
"order": 12,
"source": "sample",
"modified_by": 1,
"name": "enrollment__v",
"max_value": 100000,
"required": false,
"min_value": 0
},
{
"created_by": 1,
"created_date": "2013-12-10T00:00:11.000Z",
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Study Start Date",
"type": "Date",
"editable": true,
"help_content": null,
"order": 13,
"source": "sample",
"modified_by": 1,
"name": "study_start_date__v",
"required": false
},
{
"created_by": 1,
"created_date": "2013-12-10T00:00:11.000Z",
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Planned Study End Date",
"type": "Date",
"editable": true,
"help_content": null,
"order": 14,
"source": "sample",
"modified_by": 1,
"name": "planned_study_end_date__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:11.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "CRO",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 15,
"source": "sample",
"modified_by": 1,
"name": "cro__v",
"multi_value": false,
"required": false,
"picklist": "cro__vs"
},
{
"created_date": "2013-12-10T00:00:11.000Z",
"created_by": 1,
"list_column": true,
"modified_date": "2013-12-10T00:00:11.000Z",
"status": [
"active__v"
],
"label": "Study Status",
"type": "Picklist",
"editable": true,
"help_content": null,
"order": 16,
"source": "standard",
"modified_by": 1,
"name": "study_status__v",
"multi_value": false,
"required": true,
"picklist": "study_status__vs"
},
{
"created_date": "2013-12-10T00:00:12.000Z",
"max_length": 50,
"created_by": 1,
"list_column": false,
"unique": true,
"modified_date": "2013-12-10T00:00:12.000Z",
"status": [
"active__v"
],
"label": "External ID",
"type": "ExternalID",
"editable": true,
"help_content": null,
"order": 17,
"source": "standard",
"modified_by": 1,
"name": "external_id__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:12.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:12.000Z",
"status": [
"active__v"
],
"label": "Created By",
"object": {
"name": "users"
},
"type": "Object",
"editable": false,
"relationship": "Reference",
"help_content": null,
"order": 18,
"source": "standard",
"modified_by": 1,
"name": "created_by__v",
"required": false
},
{
"created_by": 1,
"created_date": "2013-12-10T00:00:12.000Z",
"list_column": false,
"modified_date": "2013-12-10T00:00:12.000Z",
"status": [
"active__v"
],
"label": "Created Date",
"type": "DateTime",
"editable": false,
"help_content": null,
"order": 19,
"source": "standard",
"modified_by": 1,
"name": "created_date__v",
"required": false
},
{
"created_date": "2013-12-10T00:00:12.000Z",
"created_by": 1,
"list_column": false,
"modified_date": "2013-12-10T00:00:12.000Z",
"status": [
"active__v"
],
"label": "Last Modified By",
"object": {
"name": "users"
},
"type": "Object",
"editable": false,
"relationship": "Reference",
"help_content": null,
"order": 20,
"source": "standard",
"modified_by": 1,
"name": "modified_by__v",
"required": false
},
{
"created_by": 1,
"created_date": "2013-12-10T00:00:12.000Z",
"list_column": false,
"modified_date": "2013-12-10T00:00:12.000Z",
"status": [
"active__v"
],
"label": "Last Modified Date",
"type": "DateTime",
"editable": false,
"help_content": null,
"order": 21,
"source": "standard",
"modified_by": 1,
"name": "modified_date__v",
"required": false
}
]
}
}
Localized Data
You can retrieve the localized strings for the following metadata fields: label
, label_plural
and help_content
. To request the localized data include the loc
query string parameter set to true
on the endpoint URL. For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects/{NAME}?loc=true
When the localized data is requested, the response will contain additional field localized_data
containing the the map with localized strings for each of the localized fields. This data is Available at the object and/or the field level, and only if localized string are configured.
. . .
"localized_data": {
"label_plural": {
"en": "Sites"
},
"label": {
"de": "Durchführungsort",
"zh": "试验ä¸å¿ƒ",
"it": "Sede",
"fr": "Site",
"en": "Site",
"ru": "ИÑÑледовательÑкий центр",
"es": "Sitio",
"ja": "サイト"
}
}
. . .
Errors
On failure, the response will contain an error response.
Type | Message | Condition |
---|---|---|
MALFORMED_URL |
The resource [RESOURCE] does not exist | User is requesting a non-existent resource |
METHOD_NOT_SUPPORTED |
Request method 'METHOD' not supported | User is requesting a resource with an unsupported HTTP method |
Object Field Metadata
The object field consist of the following metadata:
Metadata Field | Details | Description |
---|---|---|
created_by |
system managed | the ID of the user who created the field |
created_date |
system managed | the field creation timestamp in UTC format |
modified_by |
system managed | the ID of the user who last modified the field |
modified_date |
system managed | the field last modified timestamp in UTC format |
name |
[optional] string - default: auto-generated based on label , max length 40 chars |
the unique field identifier |
label |
[required] string - max length 40 chars | the UI-friendly field label |
type |
[required] enum | the type of data that can be stored by the field, built-in types (ID , String , Number , Boolean , Picklist , Object , Date , DateTime ) |
source |
system managed | the source of field creation: standard , sample , custom |
object |
system managed | the summary of the related object details (only returned if field type is Object ) |
--url |
system managed | the URL to use to access the object metadata |
--name |
system managed | the unique object identifier |
--label |
system managed | the UI-friendly object label |
--label_plural |
system managed | the plural version of the UI-friendly object label |
relationship |
system managed | the relationship type specified by the field: Parent , Reference (only returned if field type is Object ) |
status |
[optional] picklist entry - default: active__v |
the status of the field, possible values: active__v , inactive__v from default_status__v Picklist |
required |
[optional] boolean - default false |
whether it is required to provide the data in the object record |
unique |
[optional - for data type String] boolean - default false |
whether the record value stored in this field is unique |
editable |
[optional] boolean - default true |
whether it is allowed to update the data in the object record |
max_value |
[required - for data type Number ] number |
minimum float value that can be set into the field (max of 9 decimal places) |
min_value |
[required - for data type Number ] number |
maximum float value that can be set into the field (max of 9 decimal places) |
max_length |
[required - for data type String ] number - default 20, max 1500 |
maximum length of the String (for String fields) |
scale |
[required - for data type Number ] number - default 0, max 9 |
number of digits after the decimal point, the value can be at least the largest number of decimal places in either max_value or min_value |
help_content |
[optional] string - max length ??? | the short help describing the field |
list_column |
[optional] boolean - default: false |
whether the field is listed in Vault UI tables and shows up in API record collections |
order |
[optional] number - default: inserted at last position | the order in which the field is listed in the Vault UI forms |
picklist |
system managed - set by system to the name of the picklist when type is Picklist |
for field of type Picklist , the name of the Picklist containing the possible values |
multi_value |
[optional] boolean - default false |
for fields of type Picklist , whether multiple values can be selected for field in the object record |
Retrieve Object Field
You can retrieve the object field metadata by sending the GET
request to the /api/{VERSION}/metadata/vobjects/{NAME}/fields/{FIELD}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects/{NAME}/fields/{FIELD}
Response
The respons will contain the metadata for a specified object field.
{
"responseStatus": "SUCCESS",
"field": {
"created_date": "2013-12-30T21:05:15.000Z",
"max_length": 20,
"created_by": 25507,
"list_column": false,
"unique": false,
"modified_date": "2013-12-30T21:05:15.000Z",
"status": [
"active__v"
],
"label": "Product",
"type": "String",
"editable": true,
"help_content": null,
"order": 13,
"source": "custom",
"modified_by": 25507,
"name": "product1__c",
"required": false
}
}
Localized Data
You can retrieve the localized strings for the following metadata fields: label
, label_plural
and help_content
. To request the localized data include the loc
query string parameter set to true
on the endpoint URL.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/metadata/vobjects/{NAME}/fields/{FIELD}?loc=true
Example response with localize data:
{
"responseStatus": "SUCCESS",
"field": {
"created_date": "2013-12-30T21:05:15.000Z",
"created_by": 25507,
"max_length": 20,
"list_column": false,
"localized_data": {
"label": {
"de": "Produkt",
"zh": "产å“",
"it": "Prodotto",
"fr": "Produit",
"en": "Product",
"ru": "Продукт",
"ja": "製å“"
}
},
"unique": false,
"modified_date": "2013-12-30T21:05:15.000Z",
"status": [
"active__v"
],
"label": "Product",
"type": "String",
"editable": true,
"help_content": null,
"order": 13,
"source": "custom",
"modified_by": 25507,
"name": "product1__c",
"required": false
}
}
Object Records
Retrieve Object Record Collection
You can retrieve a collection of records of specific type by sending the GET
request to the /api/{VERSION}/vobjects/{NAME}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}/api/{VERSION}/vobjects/{NAME}
Limits & Pagination
You may limit the number of records returned in the collection by specifying an alternative limit value. A maximum of 200 object records is returned per call by default. To override this limit, limit
query string parameter can be set to the alternative limit. Limits over 200 are ignored and reset back to 200.
Example
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/vobjects/{NAME}?limit=100
To paginate over the collection of results, offset
query string parameter is used. offset
values equaling to a number larger than the total number of records in the collection will not return any records in the collection.
limit
andoffset
must be positive integers
To facilitate implementing the pagination over the collection of records, the result contains previous_page
and next_page
fields in the resultDetails
of the response. These fiels are included only when there are previous or next pages of the result set.
Examples
To limit the number of records in the collection to 20 starting with the 20th record of the total result set:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com.veevavault.com/api/{VERSION}/vobjects/{NAME}?limit=20&offset=20
To start the collection of records from the 200th record of the total result set. By default 200 records will be returned since alternate limit is not specified:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com.veevavault.com/api/{VERSION}/vobjects/{NAME}?offset=200
Fields
You may request particular fields to be returned for each object record. For this, fields
query string parameter can be set to a comma-delimited list of object field names.
Example
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/vobjects/{NAME}?fields={FIELD},{FIELD}
If the fields
parameter is present on the query string but contains no value, it's presence is ignored and only the default set of fields is returned.
If the fields parameter contains an invalid field (or set of fields), an INVALID_DATA
error is returned.
Sorting
You may request the collection of results to be sorted. For this, sort
query string parameter can be set to the field name by which the collection of results shall be sorted. Sorting requires the sort direction to be specifed: asc
for ascending (default), desc
for descending.
Example
To sort the collection of results by name__v in ascending order:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/vobjects/{NAME}?sort=name__v asc
Response
The response will contain a collection of object record summaries.
Example Response:
{
"responseStatus": "SUCCESS",
"responseDetails": {
"total": 6,
"limit": 2,
"previous_page": "/api/v8.0/vobjects/product__v?limit=2&offset=0",
"next_page": "/api/v8.0/vobjects/product__v?limit=2&offset=4",
"object": {
"url": "/api/v8.0/metadata/vobjects/product__v",
"label": "Product",
"name": "product__v",
"label_plural": "Products"
},
"offset": 2,
"url": "/api/v8.0/vobjects/product__v?limit=2&offset=2"
},
"data": [
{
"id": "00P000000000102",
"name__v": "WonderDrug"
},
{
"id": "cholecap",
"name__v": "Cholecap"
}
]
}
Errors
On failure, the response will contain an error response.
Type | Message | Condition |
---|---|---|
INVALID_DATA |
Invalid sort field [{field}] | Attempting to sort by an invalid/non-existent field |
INVALID_DATA |
Invalid value [{value}[,{value}]] specified for parameter [fields] | Attempting to provide a list of fields on the query string but one or more fields are invalid |
MALFORMED_URL |
The resource [{NAME}] does not exist | Attempting to request a non-existent object record collection |
METHOD_NOT_SUPPORTED |
Request method '{METHOD}' not supported | Attempting to request a resource with an unsupported HTTP Method |
Retrieve Object Record
You can retrieve a specific object record by sending the GET
request to the /api/{VERSION}/vobjects/{NAME}/{ID}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{VERSION}/vobjects/{NAME}/{ID}
Response
The response contains a complete set of object fields as defined by the object's metadata.
Example Response:
{
"responseStatus": "SUCCESS",
"responseDetails": {
"object": {
"url": "/api/v8.0/metadata/vobjects/product__v",
"label": "Product",
"name": "product__v",
"label_plural": "Products"
},
"url": "/api/v8.0/vobjects/product__v/00P000000000105"
},
"data": {
"external_id__v": null,
"generic_name__v": null,
"product_abbreviation__vs": null,
"internal_name__v": null,
"product_family__v": null,
"therapeutic_area__v": null,
"created_date__v": "2013-12-31T19:38:28.000Z",
"id": "00P000000000105",
"status__v": [
"active__v"
],
"created_by__v": 25507,
"modified_date__v": "2013-12-31T19:38:28.000Z",
"inn__v": null,
"modified_by__v": 25507,
"compound_id__v": null,
"name__v": "Test Product",
"testdate__c": null
}
}
Errors
On failure, the response will contain an error response.
Type | Message | Condition |
---|---|---|
MALFORMED_URL |
The resource [{NAME}] does not exist | Attempting to request a non-existent object record |
METHOD_NOT_SUPPORTED |
Request method {METHOD} not supported | Attempting to request a resource with an unsupported HTTP Method |
Create Object Record
Update Object Record
Delete Object Record
Send a DELETE
request to the /api/{VERSION}/vobjects/{NAME}/{ID}
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{NAME}
- Thename__v
field value of the object.{ID}
- Theid
field value of the object record to be deleted.
Example Request
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v8.0/vobjects/product__v/0PR0202
Example Response
{
"responseStatus": "SUCCESS"
}
Possible Errors
On failure, the response displays an error type and message describing the error.
Version History
Available in API v8.0 or later.
Bulk Object Records API
Bulk Object Records API | Method | API Endpoint | Input | Output | Batch Size | Available in API |
---|---|---|---|---|---|---|
Create Object Records | POST |
/api/{VERSION}/vobjects/{NAME} |
CSV, JSON | CSV, JSON | 1-500 | v8.0 or later |
Update Object Records | PUT |
/api/{VERSION}/vobjects/{NAME} |
CSV, JSON | CSV, JSON | 1-500 | v8.0 or later |
Create Object Records in Bulk
Send a POST
request to the /api/{VERSION}/vobjects/{NAME}
endpoint.
- See the Bulk Object Records API article for request details.
- See the CSV, JSON, & Form Data Inputs article for input details.
Available in API v8.0 or later.
Update Object Records in Bulk
Send a PUT
request to the /api/{VERSION}/vobjects/{NAME}
endpoint.
- See the Bulk Object Records API article for request details.
- See the CSV, JSON, & Form Data Inputs article for input details.
Available in API v8.0 or later.
Catalogs
The Catalogs API is deprecated as of API v8.0
Use "Vault Objects" API instead.
Picklists
The Picklists API allows you to manage the values that appear in your vault's picklist fields. The API does not support creating or updating the picklists themselves, this must be done in the Admin UI. Learn about managing picklists.
Retrieve All Picklists
Use this request to retrieve a list of all standard and custom picklists in your vault.
Method & Endpoint
Send a GET
request to the /api/{VERSION}/objects/picklists
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Example Request
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v13.0/objects/picklists
Example Response (abridged)
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"errorCodes": null,
"picklists": [
{
"name": "audience__vs",
"label": "Audience",
"kind": "document",
"usedIn": [
{
"documentTypeName": "promotional_piece__vs",
"propertyName": "audience__vs"
}
]
},
{
"name": "claim_category__vs",
"label": "Claim Category",
"kind": "document",
"usedIn": [
{
"documentTypeName": "claim__vs",
"propertyName": "claim_category__vs"
}
]
},
{
"name": "language__v",
"label": "Language",
"kind": "document",
"system": true,
"usedIn": [
{
"documentTypeName": "base_document__v",
"propertyName": "language__v"
}
]
},
{
"name": "product_family__vs",
"label": "Product Family",
"kind": "object",
"usedIn": [
{
"objectName": "product__v",
"propertyName": "product_family__vs"
}
]
},
{
"name": "regions__c",
"label": "Regions",
"kind": "object",
"usedIn": [
{
"objectName": "product__v",
"propertyName": "regions__c"
}
]
},
{
"name": "therapeutic_area__vs",
"label": "Therapeutic Area",
"kind": "object",
"usedIn": [
{
"objectName": "product__v",
"propertyName": "therapeutic_area__vs"
}
]
},
{
"name": "license_type__v",
"label": "License Type",
"kind": "user",
"system": true
}
],
"errorType": null
}
Response Details
The response lists the names and labels of all picklists configured in your vault. These include the following picklist properties:
Picklist Property | Description | Comments |
---|---|---|
name |
Picklist Name | The name of the picklist, e.g., study_status__vs . |
label |
Picklist Label | The label of the picklist as seen in the UI, e.g., "Study Status". |
system |
System (true/false) | Indicates if the picklist is system-managed. |
kind |
Picklist Kind | - document picklists are used in document fields.- object picklists are used in object fields.- global picklists are used in milestone_type__v fields (eTMF Vaults).- user picklists are used in user fields. |
usedIn |
Used In | For document picklists, this indicates:- the document type in which the picklist is defined (see documentTypeName ).- the related field name (see propertyName ).For object picklists, this indicates:- the object in which the picklist is defined (see objectName ).- the related field name (see propertyName ).For global picklists, this indicates:- both the document type and the object in which the picklist is defined. - the related field names for each (see propertyName ). |
documentTypeName |
Document Type Name | For document and global picklists, this the document type name in which the picklist is defined. |
objectName |
Object Name | For object picklists, this is the object name in which the picklist is defined.For global picklists, the object is milestone__v (eTMF vaults). |
propertyName |
Property Name | For document picklists, this is the document field name using the picklist.For object picklists, this is the object field name using the picklist.For global picklists, this is the milestone_type__v picklist (eTMF vaults). |
Possible Errors
On failure, the response displays an error type and message describing the error. Refer to the API Errors section below for additional information.
Version History
Available in API v4.0 or later.
Retrieve Picklist Values
Use this request to retrieve all values (names and labels) currently configured on an existing picklist in your vault.
Method & Endpoint
Send a GET
request to the /api/{VERSION}/objects/picklists/{NAME}
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{NAME}
- The name of the existing picklist to which you're adding new values (language__v
,therapeutic_area__vs
,regions__c
, etc.).- To see all picklists configured in your vault, use the "Retrieve All Picklists" endpoint above.
Example Request
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v13.0/objects/picklists/regions__c
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"picklistValues": [
{
"name": "europe__c",
"label": "Europe"
},
{
"name": "asia_pacific__c",
"label": "Asia Pacific"
},
{
"name": "australasia__c",
"label": "Australasia"
},
{
"name": "middle_east__c",
"label": "Middle East"
}
]
}
Possible Errors
On failure, the response displays an error type and message describing the error. Refer to the API Errors section below for additional information.
Version History
Available in API v4.0 or later.
Create Picklist Values
Use this request to add new values to an existing picklist. You can add up to 1024 values to any picklist.
Method & Endpoint
Send a POST
request to the /api/{VERSION}/objects/picklists/{NAME}
endpoint.
Request Headers
- To specify the input format, set the HTTP Request Header
Content-Type
toapplication/x-www-form-urlencoded
(name-value pair input). - JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{NAME}
- The name of the existing picklist to which you're adding new values (language__v
,therapeutic_area__vs
,regions__c
, etc.).- To see all picklists configured in your vault, use the "Retrieve All Picklists" endpoint above.
- To see all names and labels currently configured on an existing picklist, use the "Retrieve Picklist Values" endpoint above.
Name-Value Pair Input Requirements
- To add new values, use the picklist property name (
value_1=
,value_2=
,value_3=
, etc.). - Enter new picklist value labels as they will be displayed in the UI. Example:
"value_1=North America"
(surrounded by double-quotes).
Example Request
$ curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "value_1=North America" \
-d "value_2=Central America" \
-d "value_3=South America" \
https://myvault.veevavault.com/api/v13.0/objects/picklists/regions__c
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Created picklist value(s).",
"picklistValues": [
{
"name": "north_america__c",
"label": "North America"
},
{
"name": "central_america__c",
"label": "Central America"
},
{
"name": "south_america__c",
"label": "South America"
}
]
}
Possible Errors
On failure, the response displays an error type and message describing the error. Refer to the API Errors section below for additional information.
Version History
Available in API v4.0 or later.
Update Picklist Value Label
Use this request to update the labels (only) for existing picklist values in your vault.
CAUTION: This may break existing integrations that access picklist values via the API. Use caution when editing picklist labels. When these attributes are changed, they affect all existing document and object metadata that refer to the picklist. For users in the UI who are accustomed to seeing a particular selection (picklist label), the changes may also cause confusion.
Method & Endpoint
Send a PUT
request to the /api/{VERSION}/objects/picklists/{NAME}
endpoint.
Request Headers
- To specify the input format, set the HTTP Request Header
Content-Type
toapplication/x-www-form-urlencoded
(name-value pair input). - JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{NAME}
- The name of the existing picklist to which you're updating labels (language__v
,therapeutic_area__vs
,regions__c
, etc.).- To see all picklists configured in your vault, use the "Retrieve All Picklists" endpoint above.
- To see all names and labels currently configured on an existing picklist, use the "Retrieve Picklist Values" endpoint above.
Name-Value Pair Input Requirements
- To change existing values, use the existing picklist name (
north_america__c=
,central_america__c=
, etc.) and enter new labels as they will be displayed in the UI. - For example, to change the label of the existing
"north_america__c=North America"
, enter"north_america__c=North America/United States"
.
Example Request
$ curl -X PUT -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "north_america__c=North America/United States" \
https://myvault.veevavault.com/api/v13.0/objects/picklists/regions__c
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Updated picklist value(s).",
"picklistValues": [
{
"name": "north_america__c",
"label": "North America/United States"
}
]
}
As shown above, only the picklist value label has been changed. The picklist value name remains the same. All documents and objects that refer to the specified picklist value will be updated as well.
Possible Errors
On failure, the response displays an error type and message describing the error. Refer to the API Errors section below for additional information.
Version History
Available in API v4.0 or later.
Delete Picklist Value
Use this request to delete a value from an existing picklist in your vault.
CAUTION: This may break existing integrations that access picklist value via the API. When these attributes are changed, they affect all existing document and object metadata that refer to the picklist. For users in the UI who are accustomed to seeing a particular selection (picklist label), the changes may also cause confusion.
Method & Endpoint
Send a DELETE
request to the /api/{VERSION}/objects/picklists/{NAME}/{PICKLIST_VALUE_NAME}
endpoint.
Request Headers
- JSON is the default response format (
application/json
). - To request an XML response, set the HTTP Request Header
Accept
toapplication/xml
.
Request Parameters
{NAME}
- The name of the existing picklist to which you're updating names (language__v
,therapeutic_area__vs
,regions__c
, etc.).{PICKLIST_VALUE_NAME}
- The existing picklist value name which you are deleting (north_america__c=
,central_america__c=
, etc.).- To see all picklists configured in your vault, use the "Retrieve All Picklists" endpoint above.
- To see all names and labels currently configured on an existing picklist, use the "Retrieve Picklist Values" endpoint above.
Example Request
$ curl -X DELETE -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v13.0/objects/picklists/regions__c/north_america_united_states__c
Example Response
{
"responseStatus": "SUCCESS",
"responseMessage": "Deleted picklist value.",
"name": "north_america_united_states__c"
}
Possible Errors
On failure, the response displays an error type and message describing the error. Refer to the API Errors section below for additional information.
Version History
Available in API v4.0 or later.
Security Policies
The securitypolicies
object contains the configured settings of secuirty policies of Veeva Vault. This API lets you retrieve the list of all configured policies as well as get details of a specified security policy.
Retrieve Security Policies
You can retrieve all user security policies by sending a GET
request to the /api/{version}/objects/securitypolicies
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/securitypolicies
Response
On success, Vault returns the list of configured security policies.
Example:
{
"responseStatus": "SUCCESS",
"security_policies__v": [
{
"name__v": "831",
"label__v": "Basic",
"value__v": "https://customer.veevavault.com/api/v8.0/objects/securitypolicies/831"
},
{
"name__v": "871",
"label__v": "SSO Policy",
"value__v": "https://customer.veevavault.com/api/v8.0/objects/securitypolicies/871"
}
]
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Retrieve Security Policy
You can retrieve a specific user security policies by sending a GET
request to the /api/{version}/objects/securitypolicies/{id}
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/objects/securitypolicies/{id}
Response
On success, Vault returns the details of the specified security policy.
Example:
{
"responseStatus": "SUCCESS",
"responseMessage": "Success",
"security_policy__v": {
"policy_details__v": {
"name__v": "831",
"label__v": "Basic",
"description__v": "A sample security policy.",
"is_active__v": true
},
"policy_security_settings__v": {
"authentication_type__v": {
"name__v": "Password",
"label__v": "Password"
},
"passwords_require_number__v": true,
"passwords_require_uppercase_letter__v": true,
"min_password_length__v": 8,
"password_expiration__v": 90,
"password_history_reuse__v": 5,
"allow_delegated_auth_sfdc__v": true,
"sfdc_org_id__v": "00De0000000D5CvEAK"
}
}
}
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v3.0
Workflows
The workflows
object represents the actively running workflows in Veeva Vault. This API lets you retrieve the metadata of the object so it can be queried using the Query API.
Workflow Metadata
The workflows
object consists of the following fields:
Field | Description | Type | Comments |
---|---|---|---|
workflow_id__v |
Workflow ID | id |
the ID of the workflow instance |
workflow_document_id__v |
Document ID | id |
the ID of the document associated with the workflow |
workflow_document_major_version_number__v |
Document Major Version | Number |
|
workflow_document_minor_version_number__v |
Document Minor Version | Number |
|
workflow_name__v |
Workflow Name | String |
`` |
workflow_initiator__v |
Workflow Initiator ID | ObjectReference |
the user ID of the user who initiated the workflow |
workflow_initiatorName__v |
Workflow Initiator Name | String |
the name of the user |
workflow_status__v |
Workflow Status | String |
allowable values are active , completed , cancelled |
workflow_startDate__v |
Workflow Start Date | DateTime |
|
workflow_cancelationDate__v |
Workflow Cancellation Date | DateTime |
only populated if workflow has been cancelled |
workflow_completionDate__v |
Workflow Completion Date | DateTime |
only populated if workflow is completed |
workflow_dueDate__v |
Workflow Due Date | Date |
only populated if a due date has been defined |
workflow_duration__v |
Workflow Duration | Number |
number of days |
task_id__v |
Task ID | id |
the ID of the task instance |
task_name__v |
Task Name | String |
the name of the task |
task_asignee__v |
Task Assignee ID | ObjectReference |
the ID of the user assigned to the task |
task_asigneeName__v |
Task Assignee Name | String |
the name of the user assigned to the task |
task_status__v |
Task Status | String |
available , assigned , completed , cancelled |
task_assignmentDate__v |
Task Assignment Date | DateTime |
the date the task was assigned to a user |
task_cancelationDate__v |
Task Cancellation Date | DateTime |
only populated if task has been cancelled |
task_completionDate__v |
Task Completion Date | DateTime |
only populated if task has been completed |
task_creationDate__v |
Task Creation Date | DateTime |
the date the task was created |
task_dueDate__v |
Task Due Date | Date |
task due date (if defined by the workflow originator) |
task_duration__v |
Task Duration | Number |
the number of days a task was active before it was completed (with fractions) |
task_queueGroup__v |
Task Queue Group | String |
populated only if the task was sent to a group |
task_verdict__v |
Task Verdict | String |
user-driven, defined during workflow admin |
task_comment__v |
Task Comments | String |
if entered, task comment entered by workflow actor |
In addition, the values property will be filled out for the following workflow properties:
label | values |
---|---|
workflow_name__v |
list of available workflow names within the vault |
workflow_status__v |
list of possible workflow statuses across all workflows |
task_name__v |
list of available task names across all workflows |
task_queueGroup__v |
list of all groups specified as task owners across all workflow tasks |
task_status__v |
list of task statuses across all tasks. Example list would be Assigned, Available, Canceled, Completed |
task_verdict__v |
list of all available verdicts across all workflow tasks |
Retrieve Workflow Metadata
You can retrieve the list of available properties for querying on workflows
object in Vault by sending the GET
request to the /api/{version}/metadata/objects/workflows
endpoint.
For example:
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{CUSTOMER}.veevavault.com/api/{version}/metadata/objects/workflows
This will mirror the data retrieved via workflow reporting.
Response
On success, Vault returns the list of values that describes the workflows in the user's vault. Each array row contains the following:
Field | Description |
---|---|
name |
the name of the workflow property |
type |
the data type of the property (e.g. id , Date , DateTime , String , Number , ObjectReference , Picklist ) |
length |
length of the value (if type = String ) |
multivalue |
true or false |
values |
provides array of available values, in the form "label:value" in the vault's workflows |
Errors
On failure, the response will contain an error response. Refer to Errors section below for details.
Version History
Since: v4.0
Query
Query API is used to construct simple but powerful queries to retrieve data from Vault. When a client application invokes the query call, it passes in a Vault Query Language (VQL) expression (a SQL-like query) that specifies the object to query, the fields to retrieve, and any conditions to qualify an object.
For detailed information, refer to the VQL Documentation.
Errors
The Vault response to every API call includes a field called responseStatus
:
SUCCESS
- The API request has been successfully processed.FAILURE
- The API request could not be processed because of API user error.EXCEPTION
- The API request could not be processed because of API system error.
For a responseStatus
other than SUCCESS
, API users can inspect another field in the response called errors
. Each error
includes the following fields:
type
- The specific type of error, e.g.,
INVALID_DATA
,PARAMETER_REQUIRED
, etc. - These values are not subject to change for a given version of the API, even when newer versions of the API are available.
- API users need to use the error
type
value in combination with theresponseStatus
value for error handling. - In other words, the
type
andresponseStatus
values ARE contractual parts for error handling.
message
- The message accompanying each error
type
, e.g.,Missing required parameter [{FIELD_NAME}]
. - When available, the error message includes the specific reason, e.g.,
{FIELD_NAME}
for the error. - Other error messages provide more general reasons for each error.
- These values are subject to change, even for past versions. They ARE NOT contractual parts for error handling. Developers should consider error messages for debugging and troubleshooting purposes only and should not implement application logic which relies on specific error strings or formatting.
For a responseStatus
of SUCCESS
, the errors
field is either omitted or has a null value.
Example
An unsuccessful authentication request due to password not provided:
{
"responseStatus" : "FAILURE"**,
"errors" : [
{
"type" : "NO_PASSWORD_PROVIDED",
"message" : "No password was provided for the login call."
}
],
"errorType" : "AUTHENTICATION_FAILED"
}
Error Types
Type | Description |
---|---|
UNEXPECTED_ERROR |
General error catch-all when there is no specific error, or an unidentified error. |
MALFORMED_URL |
The specified resource cannot be found. |
METHOD_NOT_SUPPORTED |
The specified resource does not support the (POST, PUT, GET, DELETE) method. Or, the API request is not supported by this version of API. |
INACTIVE_USER |
User is inactive or not found. |
NO_PASSWORD_PROVIDED |
No password was provided for the login call. |
USERNAME_OR_PASSWORD_INCORRECT |
Authentication failed because an invalid username or password was provided. |
PASSWORD_CHANGE_REQUIRED |
Password change required. |
USER_LOCKED_OUT |
The user is locked out. |
PASSWORD_CHANGE_REQUIRED |
Password change required. |
INVALID_SESSION_ID |
Invalid session id provided. |
PARAMETER_REQUIRED |
Missing required parameters in the API call. |
INVALID_DATA |
Invalid data provided in the API call. |
INSUFFICIENT_ACCESS |
User does not have sufficient privileges to perform the action. |
OPERATION_NOT_ALLOWED |
Certain rules that must be met to perform this operation have not been met. |
ATTRIBUTE_NOT_SUPPORTED |
The specified resource does not recognize provided attributes. |
INVALID_FILTER |
Provided a non-existent filter to Retrieve Documents. |
INCORRECT_QUERY_SYNTAX_ERROR |
Query string used with Query API has an incorrect query syntax. |
RACE_CONDITION |
A rare condition where the same record is being simultaneously updated by another API call |
EXCEEDS_FILE_MAX_SIZE |
The size of file uploaded exceeds the maximum allowed |
API_LIMIT_EXCEEDED |
Vault limits the number of API calls that can be made every 5 minutes and every 24 hours. When either of these limits are reached, this error message is returned and no further calls will be processed until the next 5 minute or 24 hour period begins. The default limit every 5 minutes is 1000 or 2000 calls, depending on your vault. The default limit every 24 hours is 100,000 calls. |
SDK_ERROR |
An error caused by the Vault Java SDK. This error may also include a custom subtype . For more information about this error, check the Debug Log. To inquire about Vault Java SDK Solutions, contact Veeva Services. |
Backwards Compatibility
Although we do not change behavior in previous API versions, we may update and improve messages that accompany error responses. Error types will not change. Developers should consider error messages for debugging and troubleshooting purposes only and should not implement application logic which relies on specific error strings or formatting.
Security
The Vault API respects the security and permissions of the user that is logged in.
- The user will not be able to retrieve or query any document that they do not have access to through the API.
- The user will not be able to modify, create, or delete any document that they do not have the permissions to through the security matrix.
- The user will be shown metadata that is specific to the permissions set by property level security and the user's access. System administrators will be able to see properties that are hidden to them, but the metadata will reflect that with the hidden tag.