pandadoc
Module pandadoc
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_pandadoc_1.0.0.png)
ballerinax/pandadoc Ballerina library
Overview
This is a generated connector from PandaDoc API version 4.3.0 OpenAPI Specification.
PandaDoc API spans a broad range of functionality to help you build incredible documents automation experiences inside your product. PandaDoc API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes, authentication, and verbs.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a PandaDoc account.
- You can start using PandaDoc API with their free sandbox plan, which allows you to open all the available features.
- The sandbox API key you can generate on the Developer Dashboard with predefined rate limits.
Quickstart
To use the PandaDoc connector in your Ballerina application, update the .bal file as follows:
Step 1: Import connector
First, import the ballerinax/pandadoc
module into the Ballerina project.
import ballerinax/pandadoc;
Step 2: Create a new connector instance
Create a pandadoc:AuthConfig
with the API-Key
obtained, and initialize the connector with it.
pandadoc:AuthConfig authConfig = { auth: { authorization: "API-Key <API Key>" } }; pandadoc:Client baseClient = check new Client(authConfig);
Step 3: Invoke connector operation
-
Now you can use the operations available within the connector. Note that they are in the form of remote operations.
Following is an example on how to list opportunities, using the connector.
Gets a list of opportunities.
public function main() returns error? { pandadoc:DocumentListResponse response = check baseClient->listDocuments(); log:printInfo(response.toJsonString()); }
-
Use
bal run
command to compile and run the Ballerina program.
Clients![](/images/permalink.svg)
pandadoc: Client![](/images/permalink.svg)
This is a generated connector from PandaDoc API version 4.3.0 OpenAPI Specification. PandaDoc API spans a broad range of functionality to help you build incredible documents automation experiences inside your product. PandaDoc API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes, authentication, and verbs.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
You can start using PandaDoc API with our free sandbox plan, which allows you to open all the available features.
The sandbox API key you can generate on the Developer Dashboard with predefined rate limits.
init (AuthConfig authConfig, ClientConfiguration clientConfig, string serviceUrl)
- authConfig AuthConfig - Configurations used for Authentication
- clientConfig ClientConfiguration {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.pandadoc.com" - URL of the target service
accessToken![](/images/permalink.svg)
function accessToken(Oauth2AccessTokenBody payload) returns OAuth2AccessTokenResponse|error
Create/Refresh Access Token
Parameters
- payload Oauth2AccessTokenBody - Authentication request
Return Type
listDocuments![](/images/permalink.svg)
function listDocuments(string? completedFrom, string? completedTo, string? contactId, int? count, string? createdFrom, string? createdTo, boolean? deleted, string? id, string? folderUuid, string? formId, string? membershipId, string? metadata, string? modifiedFrom, string? modifiedTo, DocumentOrderingFieldsEnum? orderBy, int? page, string? q, DocumentStatusRequestEnum? status, DocumentStatusRequestEnum? statusNe, string? tag, string? templateId) returns DocumentListResponse|error
List documents
Parameters
- completedFrom string? (default ()) - Return results where the
date_completed
field (ISO 8601) is greater than or equal to this value.
- completedTo string? (default ()) - Return results where the
date_completed
field (ISO 8601) is less than or equal to this value.
- contactId string? (default ()) - Returns results where 'contact_id' is present in document as recipient or approver
- count int? (default ()) - Specify how many document results to return. Default is 50 documents, maximum is 100 documents.
- createdFrom string? (default ()) - Return results where the
date_created
field (ISO 8601) is greater than or equal to this value.
- createdTo string? (default ()) - Return results where the
date_created
field (ISO 8601) is less than this value.
- deleted boolean? (default ()) - Returns only the deleted documents.
- id string? (default ()) - Specify document's ID.
- folderUuid string? (default ()) - The UUID of the folder where the documents are stored.
- formId string? (default ()) - Specify the form used for documents creation. This parameter can't be used with template_id.
- membershipId string? (default ()) - Returns results where 'membership_id' is present in document as owner (should be member uuid)
- metadata string? (default ()) - Specify metadata to filter by in the format of
metadata_{metadata-key}={metadata-value}
such asmetadata_opportunity_id=2181432
. Themetadata_
prefix is always required.
- modifiedFrom string? (default ()) - Return results where the
date_modified
field (iso-8601) is greater than or equal to this value.
- modifiedTo string? (default ()) - Return results where the
date_modified
field (iso-8601) is less than this value.
- orderBy DocumentOrderingFieldsEnum? (default ()) - Specify the order of documents to return. Use
value
(for example,date_created
) for ASC and-value
(for example,-date_created
) for DESC.
- page int? (default ()) - Specify which page of the dataset to return.
- q string? (default ()) - Search query. Filter by document reference number (this token is stored on the template level) or name.
- status DocumentStatusRequestEnum? (default ()) - Specify the status of documents to return. * 0: document.draft * 1: document.sent * 2: document.completed * 3: document.uploaded * 4: document.error * 5: document.viewed * 6: document.waiting_approval * 7: document.approved * 8: document.rejected * 9: document.waiting_pay * 10: document.paid * 11: document.voided * 12: document.declined * 13: document.external_review
- statusNe DocumentStatusRequestEnum? (default ()) - Specify the status of documents to return (exclude). * 0: document.draft * 1: document.sent * 2: document.completed * 3: document.uploaded * 4: document.error * 5: document.viewed * 6: document.waiting_approval * 7: document.approved * 8: document.rejected * 9: document.waiting_pay * 10: document.paid * 11: document.voided * 12: document.declined * 13: document.external_review
- tag string? (default ()) - Search tag. Filter by document tag.
- templateId string? (default ()) - Specify the template used for documents creation. Parameter can't be used with form_id.
Return Type
createDocument![](/images/permalink.svg)
function createDocument(DocumentCreateRequest payload, string? editorVer) returns DocumentCreateResponse|error
Create document
Parameters
- payload DocumentCreateRequest - Use a PandaDoc template or an existing PDF to create a document.
- editorVer string? (default ()) - Set this parameter as
ev1
if you want to create a document from PDF with Classic Editor when both editors are enabled for the workspace.
Return Type
statusDocument![](/images/permalink.svg)
function statusDocument(string id) returns DocumentStatusResponse|error
Document status
Parameters
- id string - Specify document ID.
Return Type
deleteDocument![](/images/permalink.svg)
Delete document by id
Parameters
- id string - Document ID
changeDocumentStatus![](/images/permalink.svg)
function changeDocumentStatus(string id, DocumentStatusChangeRequest payload) returns Response|error
Document status change
Parameters
- id string - Specify document ID.
- payload DocumentStatusChangeRequest - Document status change request
detailsDocument![](/images/permalink.svg)
function detailsDocument(string id) returns DocumentDetailsResponse|error
Document details
Parameters
- id string - Document ID
Return Type
createDocumentLink![](/images/permalink.svg)
function createDocumentLink(string id, DocumentCreateLinkRequest payload) returns DocumentCreateLinkResponse|error
Create a Document Link
Parameters
- id string - Document ID
- payload DocumentCreateLinkRequest - Request to create document link
Return Type
sendDocument![](/images/permalink.svg)
function sendDocument(string id, DocumentSendRequest payload) returns DocumentSendResponse|error
Send Document
Return Type
downloadDocument![](/images/permalink.svg)
function downloadDocument(string id, string? watermarkColor, int? watermarkFontSize, float? watermarkOpacity, string? watermarkText) returns string|error
Document download
Parameters
- id string - Specify document ID.
- watermarkColor string? (default ()) - HEX code (for example
#FF5733
).
- watermarkFontSize int? (default ()) - Font size of the watermark.
- watermarkOpacity float? (default ()) - In range 0.0-1.0
- watermarkText string? (default ()) - Specify watermark text.
downloadProtectedDocument![](/images/permalink.svg)
Download document protected
Parameters
- id string - Specify document ID.
listLinkedObjects![](/images/permalink.svg)
function listLinkedObjects(string id) returns LinkedObjectListResponse|error
List Linked Objects
Parameters
- id string - Specify document ID.
Return Type
- LinkedObjectListResponse|error - Success response
createLinkedObject![](/images/permalink.svg)
function createLinkedObject(string id, LinkedObjectCreateRequest payload) returns LinkedObjectCreateResponse|error
Create Linked Object
Parameters
- id string - Specify document ID.
- payload LinkedObjectCreateRequest - Request to create linked object
Return Type
deleteLinkedObject![](/images/permalink.svg)
Delete Linked Object
listDocumentAttachments![](/images/permalink.svg)
function listDocumentAttachments(string id) returns DocumentAttachmentResponse[]|error
Document Attachment List
Parameters
- id string - Document UUID
Return Type
- DocumentAttachmentResponse[]|error - OK
createDocumentAttachment![](/images/permalink.svg)
function createDocumentAttachment(string id, DocumentAttachmentRequest payload) returns DocumentAttachmentResponse|error
Document Attachment Create
Parameters
- id string - Document UUID
- payload DocumentAttachmentRequest - Uploads attachment to document by using Multipart Form Data
Return Type
detailsDocumentAttachment![](/images/permalink.svg)
function detailsDocumentAttachment(string id, string attachmentId) returns DocumentAttachmentResponse|error
Document Attachment Details
Return Type
deleteDocumentAttachment![](/images/permalink.svg)
Document Attachment Delete
downloadDocumentAttachment![](/images/permalink.svg)
Document Attachment Download
transferDocumentOwnership![](/images/permalink.svg)
function transferDocumentOwnership(string id, DocumentTransferOwnershipRequest payload) returns Response|error
Update document ownership
Parameters
- id string - Specify document ID.
- payload DocumentTransferOwnershipRequest - Request to transfer document ownership
transferAllDocumentsOwnership![](/images/permalink.svg)
function transferAllDocumentsOwnership(DocumentTransferAllOwnershipRequest payload) returns Response|error
Transfer all documents ownership
Parameters
- payload DocumentTransferAllOwnershipRequest - Request to transfer all document ownerships
listContentLibraryItems![](/images/permalink.svg)
function listContentLibraryItems(string? q, string? id, boolean? deleted, string? folderUuid, int? count, int? page, string? tag) returns ContentLibraryItemListResponse|error
List Content Library Item
Parameters
- q string? (default ()) - Search query. Filter by content library item name.
- id string? (default ()) - Specify content library item ID.
- deleted boolean? (default ()) - Returns only the deleted content library items.
- folderUuid string? (default ()) - The UUID of the folder where the content library items are stored.
- count int? (default ()) - Specify how many content library items to return. Default is 50 content library items, maximum is 100 content library items.
- page int? (default ()) - Specify which page of the dataset to return.
- tag string? (default ()) - Search tag. Filter by content library item tag.
Return Type
detailsContentLibraryItem![](/images/permalink.svg)
function detailsContentLibraryItem(string id) returns ContentLibraryItemResponse|error
Details Content Library Item
Parameters
- id string - Content Library Item ID
Return Type
listTemplates![](/images/permalink.svg)
function listTemplates(string? q, boolean? shared, boolean? deleted, int? count, int? page, string? id, string? folderUuid, string[]? tag) returns TemplateListResponse|error
List Templates
Parameters
- q string? (default ()) - Optional search query. Filter by template name.
- shared boolean? (default ()) - Returns only the shared templates.
- deleted boolean? (default ()) - Optional. Returns only the deleted templates.
- count int? (default ()) - Optionally, specify how many templates to return. Default is 50 templates, maximum is 100 templates.
- page int? (default ()) - Optionally, specify which page of the dataset to return.
- id string? (default ()) - Optionally, specify template ID.
- folderUuid string? (default ()) - UUID of the folder where the templates are stored.
- tag string[]? (default ()) - Optional search tag. Filter by template tag.
Return Type
detailsTemplate![](/images/permalink.svg)
function detailsTemplate(string id) returns TemplateDetailsResponse|error
Details Template
Parameters
- id string - Template ID
Return Type
deleteTemplate![](/images/permalink.svg)
Delete Template
Parameters
- id string - Template ID
listForm![](/images/permalink.svg)
function listForm(int? count, int? page, string[]? status, string? orderBy, boolean? asc, string? name) returns FormListResponse|error
Forms
Parameters
- count int? (default ()) - Optionally, specify how many forms to return. Default is 50 forms, maximum is 100 forms.
- page int? (default ()) - Optionally, specify which page of the dataset to return.
- status string[]? (default ()) - Optionally, specify which status of the forms dataset to return.
- orderBy string? (default ()) - Optionally, specify the form dataset order to return.
- asc boolean? (default ()) - Optionally, specify sorting the result-set in ascending or descending order.
- name string? (default ()) - Specify the form name.
Return Type
- FormListResponse|error - List of forms
listDocumentFolders![](/images/permalink.svg)
function listDocumentFolders(string? parentUuid, int? count, int? page) returns DocumentsFolderListResponse|error
List Documents Folders
Parameters
- parentUuid string? (default ()) - The UUID of the folder containing folders. To list the folders located in the root folder, remove this parameter in the request.
- count int? (default ()) - Optionally, specify how many folders to return. Default is 50 folders, maximum is 100 folders.
- page int? (default ()) - Optionally, specify which page of the dataset to return.
Return Type
- DocumentsFolderListResponse|error - List of document folders
createDocumentFolder![](/images/permalink.svg)
function createDocumentFolder(DocumentsFolderCreateRequest payload) returns DocumentsFolderCreateResponse|error
Create Documents Folder
Parameters
- payload DocumentsFolderCreateRequest - Document folder details
Return Type
- DocumentsFolderCreateResponse|error - Success response
renameDocumentFolder![](/images/permalink.svg)
function renameDocumentFolder(string id, DocumentsFolderRenameRequest payload) returns DocumentsFolderRenameResponse|error
Rename Documents Folder
Parameters
- id string - The UUID of the folder that you are renaming.
- payload DocumentsFolderRenameRequest - Details to rename document folder
Return Type
listTemplateFolders![](/images/permalink.svg)
function listTemplateFolders(string? parentUuid, int? count, int? page) returns TemplatesFolderListResponse|error
List Templates Folders
Parameters
- parentUuid string? (default ()) - The UUID of the folder containing folders. To list the folders located in the root folder, remove this parameter in the request.
- count int? (default ()) - Optionally, specify how many folders to return. Default is 50 folders, maximum is 100 folders.
- page int? (default ()) - Optionally, specify which page of the dataset to return.
Return Type
createTemplateFolder![](/images/permalink.svg)
function createTemplateFolder(TemplatesFolderCreateRequest payload) returns TemplatesFolderCreateResponse|error
Create Templates Folder
Parameters
- payload TemplatesFolderCreateRequest - Details to create new folder for templates
Return Type
renameTemplateFolder![](/images/permalink.svg)
function renameTemplateFolder(string id, TemplatesFolderRenameRequest payload) returns TemplatesFolderRenameResponse|error
Rename Templates Folder
Parameters
- id string - The UUID of the folder which you are renaming.
- payload TemplatesFolderRenameRequest - Request to rename template folder
Return Type
listLogs![](/images/permalink.svg)
function listLogs(string? since, string? to, int? count, int? page, int[]? statuses, string[]? methods, string? search, string? environmentType) returns APILogListResponse|error
List API Log
Parameters
- since string? (default ()) - Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as "-90d" (for past 90 days).
- to string? (default ()) - Determines a point in time from which logs should be fetched. Either a specific ISO 8601 datetime or a relative identifier such as "-10d" (for past 10 days) or a special "now" value.
- count int? (default ()) - The amount of items on each page.
- page int? (default ()) - Page number of the results returned.
- statuses int[]? (default ()) - Returns only the predefined status codes. Allows 1xx, 2xx, 3xx, 4xx, and 5xx.
- methods string[]? (default ()) - Returns only the predefined HTTP methods. Allows GET, POST, PUT, PATCH, and DELETE.
- search string? (default ()) - Returns the results containing a string.
- environmentType string? (default ()) - Returns logs for production/sandbox.
Return Type
- APILogListResponse|error - OK
detailsLog![](/images/permalink.svg)
function detailsLog(string id) returns APILogDetailsResponse|error
Details API Log
Parameters
- id string - Log event id.
Return Type
listContacts![](/images/permalink.svg)
function listContacts() returns ContactListResponse|error
List contacts
Return Type
- ContactListResponse|error - OK
createContact![](/images/permalink.svg)
function createContact(ContactCreateRequest payload) returns ContactDetailsResponse|error
Create contact
Parameters
- payload ContactCreateRequest - Contact details
Return Type
detailsContact![](/images/permalink.svg)
function detailsContact(string id) returns ContactDetailsResponse|error
Get contact details by id
Parameters
- id string - Contact id.
Return Type
deleteContact![](/images/permalink.svg)
Delete contact by id
Parameters
- id string - Contact id.
updateContact![](/images/permalink.svg)
function updateContact(string id, ContactUpdateRequest payload) returns ContactDetailsResponse|error
Update contact by id
Return Type
listMembers![](/images/permalink.svg)
function listMembers() returns MemberListResponse|error
List members
Return Type
- MemberListResponse|error - OK
detailsCurrentMember![](/images/permalink.svg)
function detailsCurrentMember() returns MemberDetailsResponse|error
Current member details
Return Type
detailsMember![](/images/permalink.svg)
function detailsMember(string id) returns MemberDetailsResponse|error
Member details
Parameters
- id string - Membership id
Return Type
Records![](/images/permalink.svg)
pandadoc: ApiKeysConfig![](/images/permalink.svg)
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- authorization string - Represents API Key available in PandaDoc Developer Dashboard.
pandadoc: APILogDetailsResponse![](/images/permalink.svg)
Fields
- id string? -
- url string? -
- method string? -
- status int? -
- request_time string? -
- response_time string? -
- response_body record {}? -
- query_params_string string? -
- query_params_object record {}? -
- request_body record {}? -
- token_type string? -
- application string? -
- 'key string? -
- request_id string? -
- user_email string? -
- user_id string? -
pandadoc: APILogListResponse![](/images/permalink.svg)
Fields
- results ApiloglistresponseResults[]? -
pandadoc: ApiloglistresponseResults![](/images/permalink.svg)
Fields
- id string? -
- url string? -
- status int? -
- request_time string? -
- response_time string? -
pandadoc: AuthConfig![](/images/permalink.svg)
Provides Auth configurations needed when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig|ApiKeysConfig - Auth Configuration
pandadoc: ContactCreateRequest![](/images/permalink.svg)
Fields
- email string -
- first_name string? -
- last_name string? -
- company string? -
- job_title string? -
- phone string? -
- state string? -
- street_address string? -
- city string? -
- postal_code string? -
pandadoc: ContactDetailsResponse![](/images/permalink.svg)
Fields
- id string? -
- email string? -
- first_name string? -
- last_name string? -
- company string? -
- job_title string? -
- phone string? -
- state string? -
- street_address string? -
- city string? -
- postal_code string? -
pandadoc: ContactListResponse![](/images/permalink.svg)
Fields
- results ContactDetailsResponse[]? -
pandadoc: ContactUpdateRequest![](/images/permalink.svg)
Fields
- email string? -
- first_name string? -
- last_name string? -
- company string? -
- job_title string? -
- phone string? -
- state string? -
- street_address string? -
- city string? -
- postal_code string? -
pandadoc: ContentLibraryItemListResponse![](/images/permalink.svg)
Fields
- results ContentlibraryitemlistresponseResults[]? -
pandadoc: ContentlibraryitemlistresponseResults![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- date_created string? -
- date_modified string? -
- 'version string? -
pandadoc: ContentLibraryItemResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- date_created string? -
- date_modified string? -
- created_by ContentlibraryitemresponseCreatedBy? -
- metadata record {}? -
- tokens record {}[]? -
- fields record {}[]? -
- pricing PricingTablesResponse? -
- tags string[]? -
- roles record {}[]? -
- 'version string? -
- content_placeholders record {}[]? -
- images record {}[]? -
pandadoc: ContentlibraryitemresponseCreatedBy![](/images/permalink.svg)
Fields
- id string? -
- email string? -
- first_name string? -
- last_name string? -
- avatar string? -
pandadoc: DocumentAttachmentRequest![](/images/permalink.svg)
Fields
- file string? - Binary file to be attached to a document
- 'source string? - URL link to the file to be attached to a document
- name string? - Optional name to set for uploaded file
pandadoc: DocumentAttachmentResponse![](/images/permalink.svg)
Fields
- uuid string? -
- date_created string? -
- created_by DocumentattachmentresponseCreatedBy? -
- name string? -
pandadoc: DocumentattachmentresponseCreatedBy![](/images/permalink.svg)
Fields
- id string? -
- email string? -
- first_name string? -
- last_name string? -
- avatar string? -
pandadoc: DocumentCreateByPdfRequest![](/images/permalink.svg)
Fields
- url string - Use a URL to specify the PDF. We support only URLs starting with https.
- recipients DocumentcreatebytemplaterequestRecipients[] - The list of recipients you're sending the document to. Every object must contain the email parameter. The
role
,first_name
andlast_name
parameters are optional. If therole
parameter passed, a person is assigned all fields matching their corresponding role. If not passed, a person will receive a read-only link to view the document. If thefirst_name
andlast_name
not passed the system 1. creates a new contact, if none exists with the givenemail
; or 2. gets the existing contact with the givenemail
that already exists.
- parse_form_fields boolean? - Set this parameter as
true
if you create a document from a PDF with form fields and asfalse
if you upload a PDF with field tags.
- name string? -
- tags string[]? - Mark your document with one or several tags.
- fields record {}? - If you are creating a document from a PDF with field tags, you can pass a list of the fields you'd like to pre-fill in the document. If you are creating a document from a PDF with form fields, list all the fields and provide the
role
parameter so that the fields are assigned to document recipients. You can provide empty value for the field so that it's not pre-filled: "value": "".
- metadata record {}? - You can pass arbitrary data in the key-value format to associate custom information with a document. This information is returned in any API requests for the document details by id.
pandadoc: DocumentCreateByTemplateRequest![](/images/permalink.svg)
Fields
- name string - Name the document you are creating.
- template_uuid string - 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.
- folder_uuid string? -
- recipients DocumentcreatebytemplaterequestRecipients[] - The list of recipients you're sending the document to. Every object must contain the email parameter. The
role
,first_name
andlast_name
parameters are optional. If therole
parameter passed, a person is assigned all fields matching their corresponding role. If not passed, a person will receive a read-only link to view the document. If thefirst_name
andlast_name
not passed the system 1. creates a new contact, if none exists with the givenemail
; or 2. gets the existing contact with the givenemail
that already exists.
- tokens DocumentcreatebytemplaterequestTokens[]? - You can pass a list of tokens/values to pre-fill tokens used in a template. Name is a token name in a template. Value is a real value you would like to replace a token with.
- fields record {}? - You can pass a list of fields/values to pre-fill fields used in a template. Note that the Signature field can't be pre-filled.
- metadata record {}? - You can pass arbitrary data in the key-value format to associate custom information with a document. This information is returned in any API requests for the document details by id.
- tags string[]? - Mark your document with one or several tags.
- images DocumentcreatebytemplaterequestImages[]? - You can pass a list of images to image blocks (one image in one block) for replacement.
- pricing_tables PricingTableRequest[]? - Information to construct or populate a pricing table can be passed when creating a document. All product information must be passed when creating a new document. Products stored in PandaDoc cannot be used to populate table rows at this time. Keep in mind that this is an array, so multiple table objects can be passed to a document. Make sure that "Automatically add products to this table" is enabled in the PandaDoc template pricing tables you wish to populate via API.
- content_placeholders DocumentcreatebytemplaterequestContentPlaceholders[]? - 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.
pandadoc: DocumentcreatebytemplaterequestContentLibraryItems![](/images/permalink.svg)
Fields
- id string -
- fields record {}? -
- pricing_tables PricingTableRequest[]? -
- recipients DocumentcreatebytemplaterequestRecipients[]? -
pandadoc: DocumentcreatebytemplaterequestContentPlaceholders![](/images/permalink.svg)
Fields
- content_library_items DocumentcreatebytemplaterequestContentLibraryItems[]? -
- block_id string -
pandadoc: DocumentcreatebytemplaterequestImages![](/images/permalink.svg)
Fields
- urls string[] -
- name string -
pandadoc: DocumentcreatebytemplaterequestRecipients![](/images/permalink.svg)
Fields
- email string -
- first_name string? -
- last_name string? -
- role string? -
- signing_order int? -
pandadoc: DocumentcreatebytemplaterequestTokens![](/images/permalink.svg)
Fields
- name string -
- value string -
pandadoc: DocumentCreateLinkRequest![](/images/permalink.svg)
Fields
- recipient string - The email address for the recipient you're creating a document link for.
- lifetime decimal? - Provide the number of seconds that a document link should be valid for. Default is 3600 seconds.
pandadoc: DocumentCreateLinkResponse![](/images/permalink.svg)
Fields
- id string? -
- expires_at string? -
pandadoc: DocumentCreateRequest![](/images/permalink.svg)
Fields
- name string? - Name the document you are creating.
- template_uuid string? - ID of the 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.
- folder_uuid string? - ID of the folder where the created document should be stored.
- recipients DocumentcreaterequestRecipients[]? - The list of recipients you're sending the document to. Every object must contain the
email
parameter. Therole
,first_name
andlast_name
parameters are optional. If therole
parameter is passed, a person is assigned all fields matching their corresponding role. If a role was not passed, a person receives a read-only link to view the document. If thefirst_name
andlast_name
are not passed, the system does this 1. Creates a new contact, if none exists with the givenemail
; or 2. Gets the existing contact with the givenemail
that already exists.
- tokens DocumentcreatebytemplaterequestTokens[]? - You can pass a list of tokens/values to pre-fill tokens used in a template. Name is a token name in a template. Value is a real value you would like to replace a token with.
- fields record {}? - You can pass a list of fields/values to pre-fill fields used in a template. Please note Signature field can't be pre-filled.
- metadata record {}? - You can pass arbitrary data in the key-value format to associate custom information with a document. This information is returned in any API requests for the document details by id.
- tags string[]? - Mark your document with one or several tags.
- images DocumentcreaterequestImages[]? - You can pass a list of images to image blocks (one image in one block) for replacement.
- pricing_tables PricingTableRequest[]? - Information to construct or populate a pricing table can be passed when creating a document. All product information must be passed when creating a new document. Products stored in PandaDoc cannot be used to populate table rows at this time. Keep in mind that this is an array, so multiple table objects can be passed to a document.
- content_placeholders DocumentcreaterequestContentPlaceholders[]? - 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.
- url string? - Use a URL to specify the PDF. We support only URLs starting with https.
- parse_form_fields boolean? - Set this parameter as true if you create a document from a PDF with form fields and as false if you upload a PDF with field tags.
pandadoc: DocumentcreaterequestContentLibraryItems![](/images/permalink.svg)
Fields
- id string - Content library item id
- pricing_tables PricingTableRequest[]? -
- fields record {}? -
- recipients DocumentcreatebytemplaterequestRecipients[]? -
pandadoc: DocumentcreaterequestContentPlaceholders![](/images/permalink.svg)
Fields
- block_id string? - Content placeholder block id
- content_library_items DocumentcreaterequestContentLibraryItems[]? -
pandadoc: DocumentcreaterequestImages![](/images/permalink.svg)
Fields
- urls string[] -
- name string -
pandadoc: DocumentcreaterequestRecipients![](/images/permalink.svg)
Fields
- email string -
- first_name string? -
- last_name string? -
- role string? -
- signing_order int? -
pandadoc: DocumentCreateResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- status DocumentStatusEnum? -
- date_created string? -
- date_modified string? -
- expiration_date string? -
- uuid string? -
- links DocumentcreateresponseLinks[]? -
- info_message string? -
pandadoc: DocumentcreateresponseLinks![](/images/permalink.svg)
Fields
- rel string? -
- href string? -
- 'type string? -
pandadoc: DocumentDetailsResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- autonumbering_sequence_name_prefix anydata? -
- date_created string? -
- date_modified string? -
- date_completed string? -
- created_by DocumentdetailsresponseCreatedBy? -
- template DocumentdetailsresponseTemplate? -
- expiration_date anydata? -
- metadata record {}? -
- tokens record {}[]? -
- fields record {}[]? -
- pricing PricingTablesResponse? -
- 'version string? -
- tags string[]? -
- sent_by anydata? -
- recipients DocumentdetailsresponseRecipients[]? -
- grand_total DocumentdetailsresponseGrandTotal? -
- linked_objects DocumentdetailsresponseLinkedObjects[]? -
- status string? -
pandadoc: DocumentdetailsresponseCreatedBy![](/images/permalink.svg)
Fields
- id string? -
- membership_id string? -
- email string? -
- first_name string? -
- last_name string? -
- avatar string? -
pandadoc: DocumentdetailsresponseGrandTotal![](/images/permalink.svg)
Fields
- amount string? -
- currency string? -
pandadoc: DocumentdetailsresponseLinkedObjects![](/images/permalink.svg)
Fields
- provider string? -
- entity_type string? -
- entity_id string? -
pandadoc: DocumentdetailsresponseRecipients![](/images/permalink.svg)
Fields
- recipient_type string? -
- role string? -
- roles string[]? -
- last_name string? -
- signing_order anydata? -
- id string? -
- contact_id string? -
- first_name string? -
- email string? -
- has_completed boolean? -
- shared_link string? -
pandadoc: DocumentdetailsresponseTemplate![](/images/permalink.svg)
Fields
- id string? -
- name string? -
pandadoc: DocumentListResponse![](/images/permalink.svg)
Fields
- results DocumentlistresponseResults[]? -
pandadoc: DocumentlistresponseResults![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- status string? -
- date_created string? -
- date_modified string? -
- expiration_date string? -
- 'version string? -
pandadoc: DocumentSendRequest![](/images/permalink.svg)
Fields
- message string? - A message that will be sent by email with a link to a document to sign.
- subject string? - Value that will be used as the email subject.
- silent boolean? - Disables sent, viewed, comment, and completed email notifications for document recipients and the document sender. By default, notifications emails are sent for specific actions. If set as true, it won't affect the "Approve document" email notification sent to the Approver.
pandadoc: DocumentSendResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- status string? -
- date_created string? -
- date_modified string? -
- expiration_date string? -
- 'version string? -
- uuid string? -
- shared_link string? -
pandadoc: DocumentsFolderCreateRequest![](/images/permalink.svg)
Fields
- name string - Name the folder for the Documents you are creating.
- parent_uuid string? - ID of the parent folder. To create a new folder in the root folder, remove this parameter in the request.
pandadoc: DocumentsFolderCreateResponse![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
pandadoc: DocumentsFolderListResponse![](/images/permalink.svg)
Fields
- results DocumentsfolderlistresponseResults[]? -
pandadoc: DocumentsfolderlistresponseResults![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
- has_folders boolean? -
- has_items boolean? -
pandadoc: DocumentsFolderRenameRequest![](/images/permalink.svg)
Fields
- name string - Provide a new name for the folder.
pandadoc: DocumentsFolderRenameResponse![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
pandadoc: DocumentStatusChangeRequest![](/images/permalink.svg)
Fields
- status DocumentStatusRequestEnum -
- note string? - Provide “private notes” regarding the manual status change.
- notify_recipients boolean? - Send a notification email about the status change to all recipients.
pandadoc: DocumentStatusResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- status string? -
- date_created string? -
- date_modified string? -
- date_completed string? -
- expiration_date string? -
- 'version string? -
- uuid string? -
pandadoc: DocumentTransferAllOwnershipRequest![](/images/permalink.svg)
Fields
- from_membership_id string? - A unique identifier of a workspace member from whom you want to transfer ownership.
- to_membership_id string? - A unique identifier of a workspace member to whom you want to transfer ownership.
pandadoc: DocumentTransferOwnershipRequest![](/images/permalink.svg)
Fields
- membership_id string? - A unique identifier of a workspace member.
pandadoc: FormListResponse![](/images/permalink.svg)
Fields
- results FormlistresponseResults[]? -
- has_next_page boolean? -
pandadoc: FormlistresponseResults![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- date_created string? -
- date_modified string? -
- status string? -
pandadoc: IdStatusBody![](/images/permalink.svg)
Fields
- file string? - Binary attachment file
- data record {}? - JSON as a multipart/form-data string.
pandadoc: InlineResponse400![](/images/permalink.svg)
Fields
- _error string? -
pandadoc: InlineResponse4001![](/images/permalink.svg)
Fields
- 'type string? -
- detail record {}? -
pandadoc: InlineResponse4002![](/images/permalink.svg)
Fields
- 'type string? -
- detail record {}? -
pandadoc: InlineResponse401![](/images/permalink.svg)
Fields
- 'type string? -
- detail string? -
pandadoc: InlineResponse403![](/images/permalink.svg)
Fields
- 'type string? -
- detail string? -
pandadoc: InlineResponse404![](/images/permalink.svg)
Fields
- 'type string? -
- detail string? -
pandadoc: InlineResponse409![](/images/permalink.svg)
Fields
- id string? -
- status string? -
- info_message string? -
pandadoc: InlineResponse429![](/images/permalink.svg)
Fields
- 'type string? -
- detail string? -
pandadoc: LinkedObjectCreateRequest![](/images/permalink.svg)
Fields
- provider string - CRM name (lowercase). See the list above.
- entity_type string - Entity type. The system validates if the type is supported. See the list for each CRM above.
- entity_id string - Entity unique identifier. The system validates if the entity exists.
pandadoc: LinkedObjectCreateResponse![](/images/permalink.svg)
Fields
- id string? -
- provider string? - CRM name (lowercase). See the list above.
- entity_type string? - Entity type. The system validates if the type is supported. See the list for each CRM above.
- entiry_id string? - Entity unique identifier. The system validates if the entity exists.
pandadoc: LinkedObjectListResponse![](/images/permalink.svg)
Fields
- linked_objects LinkedObjectCreateResponse[]? -
pandadoc: MemberDetailsResponse![](/images/permalink.svg)
Fields
- user_id string? - A unique identifier of the user in the organization.
- membership_id string? - A unique identifier of the user in the workspace.
- email string? - A user's email address.
- first_name string? - A user's first name.
- last_name string? - A user's last name.
- is_active boolean? - A boolean value that identifies if a member is active in the workspace.
- workspace string? - A name of the user's current active workspace.
- workspace_name string? - A unique identifier of the user's current active workspace.
- emails_verified boolean? - A boolean value that identifies if the email is verified.
- role string? - A member's role in the workspace.
- user_license string? - A user license in the organization.
- date_created string? - A date when a member was added to the workspace.
- date_modified string? - Last modified date of a member.
pandadoc: MemberListResponse![](/images/permalink.svg)
Fields
- results MemberDetailsResponse[]? -
pandadoc: OAuth2AccessTokenResponse![](/images/permalink.svg)
Fields
- access_token string? -
- token_type string? -
- expires_in decimal? -
- scope string? -
- refresh_token string? -
pandadoc: OAuth2CreateAccessTokenRequest![](/images/permalink.svg)
Fields
- grant_type string - This value must be set to
authorization_code
.
- client_id string - Client ID that is automatically generated after application creation in the Developer Dashboard.
- client_secret string - Client secret that is automatically generated after application creation in the Developer Dashboard.
- code string -
auth_code
from the server on the previous step (Authorize a PandaDoc User).
- scope string? - Requested permissions. Use
read+write
to create, send, delete, and download documents, andread
to view templates and document details.
pandadoc: OAuth2RefreshAccessTokenRequest![](/images/permalink.svg)
Fields
- grant_type string - This value must be set to
refresh_token
.
- client_id string - Client ID that is automatically generated after application creation in the Developer Dashboard.
- client_secret string - Client secret that is automatically generated after application creation in the Developer Dashboard.
- refresh_token string -
refresh_token
you received and stored from the server when initially creating anaccess_token
.
- scope string? - Requested permissions. Use
read+write
as our default value to send documents.
pandadoc: PricingTableRequest![](/images/permalink.svg)
Fields
- name string -
- data_merge boolean? - When set to true all field names in data rows must be passed as external names defined in the template.
- options PricingtablerequestOptions? -
- sections PricingtablerequestSections[]? -
pandadoc: PricingtablerequestOptions![](/images/permalink.svg)
Fields
- currency string? -
- discount PricingtablerequestOptionsDiscount? -
- tax_first PricingtablerequestOptionsTaxFirst? -
- tax_second PricingtablerequestOptionsTaxSecond? -
pandadoc: PricingtablerequestOptionsDiscount![](/images/permalink.svg)
Fields
- 'type string -
- name string -
- value decimal -
pandadoc: PricingtablerequestOptionsTaxFirst![](/images/permalink.svg)
Fields
- 'type string -
- name string -
- value decimal -
pandadoc: PricingtablerequestOptionsTaxSecond![](/images/permalink.svg)
Fields
- 'type string -
- name string -
- value decimal -
pandadoc: PricingTableRequestRowData![](/images/permalink.svg)
Fields
- name string -
- description string? -
- price decimal -
- cost decimal? -
- qty int -
- sku string? -
- discount PricingTableRequestRowDataDiscount? -
- tax_first PricingTableRequestRowDataTaxFirst? -
- tax_second PricingTableRequestRowDataTaxSecond? -
pandadoc: PricingTableRequestRowDataDiscount![](/images/permalink.svg)
Fields
- value decimal? -
- 'type string? -
pandadoc: PricingTableRequestRowDataTaxFirst![](/images/permalink.svg)
Fields
- value decimal? -
- 'type string? -
pandadoc: PricingTableRequestRowDataTaxSecond![](/images/permalink.svg)
Fields
- value decimal? -
- 'type string? -
pandadoc: PricingTableRequestRowOptions![](/images/permalink.svg)
Fields
- qty_editable boolean? -
- optional_selected boolean? -
- optional boolean? -
pandadoc: PricingtablerequestRows![](/images/permalink.svg)
Fields
- options PricingTableRequestRowOptions? -
- data PricingTableRequestRowData? -
- custom_fields record {}? -
pandadoc: PricingtablerequestSections![](/images/permalink.svg)
Fields
- title string -
- 'default boolean? -
- multichoice_enabled boolean? -
- rows PricingtablerequestRows[]? -
pandadoc: PricingTablesResponse![](/images/permalink.svg)
Fields
- tables PricingtablesresponseTables[]? -
- total string? -
pandadoc: PricingtablesresponseDiscount![](/images/permalink.svg)
Fields
- value string? -
- 'type string? -
pandadoc: PricingtablesresponseItems![](/images/permalink.svg)
Fields
- id string? -
- sku string? -
- qty string? -
- name string? -
- cost string? -
- price string? -
- description string? -
- custom_fields record {}? -
- custom_columns record {}? -
- discount PricingtablesresponseDiscount? -
- tax_first PricingtablesresponseDiscount? -
- tax_second PricingtablesresponseDiscount? -
- subtotal string? -
- options PricingtablesresponseOptions? -
- sale_price string? -
- taxes record {}? -
- discounts record {}? -
- fees record {}? -
- merged_data record {}? - Will contain all the fields in flat structure with external field names defined in the template.
pandadoc: PricingtablesresponseOptions![](/images/permalink.svg)
Fields
- optional boolean? -
- optional_selected boolean? -
- multichoice_enabled boolean? -
- multichoice_selected boolean? -
pandadoc: PricingtablesresponseSummary![](/images/permalink.svg)
Fields
- subtotal string? -
- total string? -
- discount string? -
- tax string? -
pandadoc: PricingtablesresponseTables![](/images/permalink.svg)
Fields
- name string? -
- id string? -
- total string? -
- is_included_in_total boolean? -
- summary PricingtablesresponseSummary? -
- items PricingtablesresponseItems[]? -
- currency string? -
pandadoc: TemplateDetailsResponse![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- date_created string? -
- date_modified string? -
- created_by ContentlibraryitemresponseCreatedBy? -
- metadata record {}? -
- tokens TemplatedetailsresponseTokens[]? -
- fields record {}[]? -
- pricing PricingTablesResponse? -
- tags string[]? -
- roles TemplatedetailsresponseRoles[]? -
- 'version string? -
- content_placeholders TemplatedetailsresponseContentPlaceholders[]? -
- images TemplatedetailsresponseImages[]? -
pandadoc: TemplatedetailsresponseContentPlaceholders![](/images/permalink.svg)
Fields
- uuid string? -
- block_id string? -
- description string? -
pandadoc: TemplatedetailsresponseImages![](/images/permalink.svg)
Fields
- name string? -
- block_uuid string? -
- urls string[]? -
pandadoc: TemplatedetailsresponsePreassignedPerson![](/images/permalink.svg)
Fields
- email string? -
- 'type string? -
pandadoc: TemplatedetailsresponseRoles![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- signing_order string? -
- preassigned_person TemplatedetailsresponsePreassignedPerson? -
pandadoc: TemplatedetailsresponseTokens![](/images/permalink.svg)
Fields
- name string? -
- value string? -
pandadoc: TemplateListResponse![](/images/permalink.svg)
Fields
- results TemplatelistresponseResults[]? -
pandadoc: TemplatelistresponseResults![](/images/permalink.svg)
Fields
- id string? -
- name string? -
- date_created string? -
- date_modified string? -
- 'version string? -
pandadoc: TemplatesFolderCreateRequest![](/images/permalink.svg)
Fields
- name string - Name the folder for Templates you are creating.
- parent_uuid string? - ID of the parent folder. To create a new folder in the root folder, remove this parameter in the request.
pandadoc: TemplatesFolderCreateResponse![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
pandadoc: TemplatesFolderListResponse![](/images/permalink.svg)
Fields
- results TemplatesfolderlistresponseResults[]? -
pandadoc: TemplatesfolderlistresponseResults![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
- has_folders boolean? -
- has_items boolean? -
pandadoc: TemplatesFolderRenameRequest![](/images/permalink.svg)
Fields
- name string - Provide a new name for the folder.
pandadoc: TemplatesFolderRenameResponse![](/images/permalink.svg)
Fields
- uuid string? -
- name string? -
- date_created string? -
pandadoc: V1DocumentsBody![](/images/permalink.svg)
Fields
- file string? - Binary PDF File
- data record {}? - JSON as a multipart/form-data string.
Union types![](/images/permalink.svg)
pandadoc: Oauth2AccessTokenBody![](/images/permalink.svg)
Oauth2AccessTokenBody
String types![](/images/permalink.svg)
Integer types![](/images/permalink.svg)
pandadoc: DocumentStatusRequestEnum![](/images/permalink.svg)
DocumentStatusRequestEnum
Import
import ballerinax/pandadoc;
Metadata
Released date: over 2 years ago
Version: 1.0.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.2
GraalVM compatible: Yes
Pull count
Total: 3
Current verison: 0
Weekly downloads
Keywords
Content & Files/Documents
Cost/Freemium
Contributors