curl --request POST \
--url 'https://actionkit.useparagon.com/projects/{project_id}/actions/#PANDA_DOC_CREATE_DOCUMENT' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "PANDA_DOC_CREATE_DOCUMENT",
"parameters": {
"from": "pandadoc_template",
"name": "<string>",
"templateUuid": "<string>",
"recipients": {},
"fileUrl": "<string>",
"data": {},
"folderUuid": "<string>",
"tags": "<string>",
"tokens": {},
"fields": {},
"metadata": {},
"pricingTable": {},
"contentPlaceholders": {},
"images": {}
}
}
'curl --request POST \
--url 'https://actionkit.useparagon.com/projects/{project_id}/actions/#PANDA_DOC_CREATE_DOCUMENT' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "PANDA_DOC_CREATE_DOCUMENT",
"parameters": {
"from": "pandadoc_template",
"name": "<string>",
"templateUuid": "<string>",
"recipients": {},
"fileUrl": "<string>",
"data": {},
"folderUuid": "<string>",
"tags": "<string>",
"tokens": {},
"fields": {},
"metadata": {},
"pricingTable": {},
"contentPlaceholders": {},
"images": {}
}
}
'Your Paragon User Token (JWT), which you can generate using your project's signing keys.
Your Paragon Project ID. You can copy your Project ID from your dashboard URL or by clicking Copy Project ID under the Environment switcher.
Show child attributes
From : Create a document from
pandadoc_template, file Name : Name the document you are creating. This field appears only when 'from' = 'pandadoc_template')
Template UUID : The ID of a template you want to use. You can copy it from an in app template url such as https://app.pandadoc.com/a/#/templates/{ID}/content. A template ID is also obtained by listing templates. (example: "hryJY9mqYZHjQCYQuSjRQg") This field appears only when 'from' = 'pandadoc_template')
Recipients : Update already existing recipients using Recipient ID from document details or add new recipients to the document (example: "[ { "id": "MiySpPNiyhhmFXnDDrrawC", "email": "[email protected]", "first_name": "John", "last_name": "Doe" } ]") This field appears only when 'from' = 'pandadoc_template')
File URL : Specify a PDF/DocX/RTF File URL. (example: "https://cdn2.hubspot.net/hubfs/2127247/public-templates/SamplePandaDocPdf_FormFields.pdf") This field appears only when 'from' = 'file')
Data : Specify data fields that should be used in this document as JSON. (example: "{
"name": "Public Document",
"recipients": [
{
"email": "[email protected]",
"first_name": "John",
"last_name": "Dow",
"role": "user"
}
],
"fields": {
"userName": {
"value": "John",
"role": "user"
}
},
"metadata": {
"my_favorite_pet": "Panda"
},
"tags": [
"created_via_api"
],
"parse_form_fields": true
}")
This field appears only when 'from' = 'file')
Folder UUID : The ID of the folder where the created document should be stored. (example: "QMDSzwabfFzTgjW4kUijqQ") This field appears only when 'from' = 'pandadoc_template')
Tags : Mark your document with new tags (example: "[
"created_via_api",
"test_document"
]")
This field appears only when 'from' = 'pandadoc_template')
Tokens : Update tokens or add new ones (example: "[ { "name": "Favorite.Pet", "value": "New Panda" } ]") This field appears only when 'from' = 'pandadoc_template')
Fields : Update field values (example: "{ "Like": { "value": false }, "Date": { "value": "2022-08-24T00:00:00.000Z" } }") This field appears only when 'from' = 'pandadoc_template')
Metadata : Update or add metadata (example: "{ "my_favorite_pet": "New Panda" }") This field appears only when 'from' = 'pandadoc_template')
Pricing Table : Update or add metadata. See reference (https://developers.pandadoc.com/reference/create-document-from-pandadoc-template#pricing-table) (example: "[ { "name": "Pricing Table 1", "sections": [ { "title": "Sample Section", "default": true } ] } ]") This field appears only when 'from' = 'pandadoc_template')
Content Placeholders : You may replace Content Library Item Placeholders with a few content library items each and pre fill fields/variables values, pricing table items, and assign recipients to roles from there. See reference (https://developers.pandadoc.com/reference/create-document-from-pandadoc-template#content-placeholder) (example: "[
{
"block_id": "{{block_id}}",
"content_library_items": [...]
}
]")
This field appears only when 'from' = 'pandadoc_template')
Images : You may pass a list of images to image blocks (one image per block) for replacement. See a note about linking images to templates below. Image formats supported: GIF, JPG, PNG. (example: "[ { "name": "Image 1", "urls": [ "https://s3.amazonaws.com/pd-static-content/public-docs/pandadoc-panda-bear.png" ] } ]") This field appears only when 'from' = 'pandadoc_template')
Success
Was this page helpful?