Create a document
Headers
-
Content-Type string
-
Accept string
-
X-PLANNR-ACCOUNT-UUID string
Body Required
-
The name of the document.
-
An array containing the client uuids that should be sent the document when it is built.
-
template_uuid string
The UUID of the document template you want to be used with this document. You must not provide the sfdt or docx fields when creating from a template.
-
known_dependants array[string]
Optional: The document variable dependants. Used to swap variables out for real data.
POST /api/v1/document
curl \
-X POST https://api.plannrcrm.com/api/v1/document \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
-d '{"name":"Client Service Agreement","client_uuids":["cc93725f-880b-4ff0-95bc-0d8f33b90d35","9d819d64-8c0d-488a-9bd6-18153147e1df"],"template_uuid":"5487bb6c-9bff-4db0-9e65-da2c20fc080f","known_dependants":[{"client-1":"fefc313b-7f2a-4fbe-b8de-fc9554ab04be"}]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"name": "Client Service Agreement",
"client_uuids": [
"cc93725f-880b-4ff0-95bc-0d8f33b90d35",
"9d819d64-8c0d-488a-9bd6-18153147e1df"
],
"template_uuid": "5487bb6c-9bff-4db0-9e65-da2c20fc080f",
"known_dependants": [
{
"client-1": "fefc313b-7f2a-4fbe-b8de-fc9554ab04be"
}
]
}
Response examples (201)
{
"name": "Welcome Template",
"uuid": "15ba617a-43fb-4e74-838b-575dcaa794b9",
"status": "published",
"version": 3,
"created_at": "2024-11-20T13:24:02+00:00",
"updated_at": "2024-11-20T13:24:02+00:00",
"public_pdf_url": "https://plannr.valet/document/91583215-6896-4821-8dba-7e4f7ae91bfe/content/pdf?plannr_account_uuid=38cdd453-28ea-4a43-ba0d-ead7f46c6cf9",
"public_docx_url": "https://plannr.valet/document/f861dfad-8ca2-454a-a8a3-aeae9a57d66b/content/docx?plannr_account_uuid=9591b0c2-08d1-4a2b-a449-0396fa17e7cd",
"public_sfdt_url": "https://plannr.valet/document/cb43b202-2875-472d-9e64-e64f8e23a249/content/sfdt?plannr_account_uuid=4e0aad59-dfb1-4559-81a4-9a7108521fd3",
"known_dependants": {
"client-1": "c7811ba2-d92f-437b-bab4-55446c43423d"
},
"public_preview_url": "https://plannr.valet/document/10c0ea5e-130d-46d1-a0bf-c4b99123c50a/content/preview?plannr_account_uuid=09ef8f58-9095-466b-8bc3-3cdaa93e6f44",
"required_dependants": {
"client-1": "client"
}
}