agentsclimarketplace

Veeva hello world

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/veeva-pack/skills/veeva-hello-world

'Veeva Vault hello world with REST API and VQL.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill veeva-hello-world

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.8 KB, 651 tokens by cl100k_base, as published. Nobody here has run it

Veeva Vault Hello World

Overview

Create, retrieve, and query documents in Veeva Vault -- the fundamental CRUD operations. Uses the Vault REST API with VQL (Vault Query Language) for data retrieval.

Instructions

Step 1: Query Documents with VQL

import requests, os

vault_url = "https://myvault.veevavault.com/api/v24.1"
headers = {"Authorization": session_id}

# VQL is SQL-like but Vault-specific
query = "SELECT id, name__v, type__v, status__v, created_date__v FROM documents LIMIT 10"
response = requests.post(f"{vault_url}/query", headers=headers, data={"q": query})
result = response.json()

for doc in result.get("data", []):
    print(f"{doc['name__v']} | Type: {doc['type__v']} | Status: {doc['status__v']}")

Step 2: Retrieve a Document

doc_id = 123
response = requests.get(f"{vault_url}/objects/documents/{doc_id}", headers=headers)
doc = response.json()
print(f"Document: {doc['document']['name__v']}")
print(f"Version: {doc['document']['major_version_number__v']}.{doc['document']['minor_version_number__v']}")

Step 3: Create a Document

# Create document metadata
doc_data = {
    "name__v": "Protocol Amendment 001",
    "type__v": "Trial Document",
    "subtype__v": "Protocol",
    "lifecycle__v": "General Lifecycle",
}
response = requests.post(f"{vault_url}/objects/documents", headers=headers, data=doc_data)
new_id = response.json()["id"]
print(f"Created document: {new_id}")

Step 4: Upload Document File

with open("protocol.pdf", "rb") as f:
    response = requests.post(
        f"{vault_url}/objects/documents/{new_id}/file",
        headers={**headers, "Content-Type": "application/octet-stream"},
        data=f,
    )
print(f"File uploaded: {response.json()['responseStatus']}")

Output

Protocol Amendment 001 | Type: Trial Document | Status: Draft
Document: Protocol Amendment 001
Version: 0.1
Created document: 456
File uploaded: SUCCESS

Error Handling

ErrorCauseSolution
INVALID_DATA in VQLWrong field nameCheck object metadata
PARAMETER_REQUIREDMissing required fieldAdd type__v, lifecycle__v
OPERATION_NOT_ALLOWEDWrong document stateCheck lifecycle state

Resources

Next Steps

Proceed to veeva-local-dev-loop for development workflow.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.