Class which communicates with Veeva to manage documents on the platform.
Rest API instance
API for managing document lifecycles
API for managing document relationships
Private restAPIAPI for getting types related to documents
API for managing document versions
Create a document in the Veeva environment.
The file/contents to upload to Veeva can be defined by the filename__v property - include a
full path string to the .zip file to upload, and the API Service will also define the file
name for you.
const service = new VeevaService(credentials)
await service.document.create({
filename__v: './path/to/content.zip'
lifecycle__v: 'CRM Content Lifecycle',
type__v: 'Slide',
product__v: '00P000000000C01',
country__v: 'unitedKingdom',
name__v: 'Test Document'
})
Response from Veeva
The document object to create in Veeva
Delete a document in the Veeva environment.
const service = new VeevaService(credentials)
await service.document.delete(2000)
Response from Veeva
Document to delete in Veeva
Update the metadata for a document in veeva
This does not update the actual file contents of the document. To do that - look at
document.version.create()
const service = new VeevaService(credentials)
await service.document.update(2000, {
name__v: 'Updated Name'
})
Response from Veeva
The ID of the document to update
The document data to update
Generated using TypeDoc
The DocumentAPI is used to manage documents within Veeva