pandadoc / php-client
The Official PandaDoc PHP client SDK
Installs: 110 765
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
README
PandaDoc SDK spans a broad range of functionality to help you build incredible documents automation experiences inside your product.
Docs
Requirements
PHP 7.3 and later
Installation
Composer
To install the bindings via Composer, use
composer require pandadoc/php-client
or add the following to composer.json
:
{ "require": { "pandadoc/php-client": "6.2.0" } }
Then run composer install
Getting Started
<?php require_once(__DIR__ . '/vendor/autoload.php'); # Defining the host is optional and defaults to https://api.pandadoc.com # See Configuration.php for a list of all supported configuration parameters. $apiKey = 'YOUR_API_KEY'; $config = PandaDoc\Client\Configuration::getDefaultConfiguration() ->setApiKey('Authorization', $apiKey) ->setApiKeyPrefix('Authorization', 'API-Key'); $apiInstance = new PandaDoc\Client\Api\TemplatesApi( // If you want to use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->listTemplates(); print_r($result); } catch (Exception $e) { echo 'Exception when calling TemplatesApi->listTemplates: ', $e->getMessage(), PHP_EOL; }
Authorization
apiKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
oauth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://app.pandadoc.com/oauth2/authorize
- Scopes:
- read+write: Use
read+write
to create, send, delete, and download documents, andread
to view templates and document details.
Examples
Docs
Official PandaDoc public API docs
https://developers.pandadoc.com/reference/about
Documentation for API Endpoints
All URIs are relative to https://api.pandadoc.com
Class | Method | HTTP request | Description |
---|---|---|---|
APILogsApi | detailsLog | GET /public/v1/logs/{id} | Details API Log |
APILogsApi | listLogs | GET /public/v1/logs | List API Log |
ContactsApi | createContact | POST /public/v1/contacts | Create contact |
ContactsApi | deleteContact | DELETE /public/v1/contacts/{id} | Delete contact by id |
ContactsApi | detailsContact | GET /public/v1/contacts/{id} | Get contact details by id |
ContactsApi | listContacts | GET /public/v1/contacts | List contacts |
ContactsApi | updateContact | PATCH /public/v1/contacts/{id} | Update contact by id |
ContentLibraryItemsApi | detailsContentLibraryItem | GET /public/v1/content-library-items/{id}/details | Details Content Library Item |
ContentLibraryItemsApi | listContentLibraryItems | GET /public/v1/content-library-items | List Content Library Item |
DocumentAttachmentsApi | createDocumentAttachment | POST /public/v1/documents/{id}/attachments | Document Attachment Create |
DocumentAttachmentsApi | deleteDocumentAttachment | DELETE /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Delete |
DocumentAttachmentsApi | detailsDocumentAttachment | GET /public/v1/documents/{id}/attachments/{attachment_id} | Document Attachment Details |
DocumentAttachmentsApi | downloadDocumentAttachment | GET /public/v1/documents/{id}/attachments/{attachment_id}/download | Document Attachment Download |
DocumentAttachmentsApi | listDocumentAttachments | GET /public/v1/documents/{id}/attachments | Document Attachment List |
DocumentRecipientsApi | addDocumentRecipient | POST /public/v1/documents/{id}/recipients | Add Document Recipient |
DocumentRecipientsApi | deleteDocumentRecipient | DELETE /public/v1/documents/{id}/recipients/{recipient_id} | Delete Document Recipient |
DocumentRecipientsApi | editDocumentRecipient | PATCH /public/v1/documents/{id}/recipients/recipient/{recipient_id} | Edit Document Recipient |
DocumentRecipientsApi | reassignDocumentRecipient | POST /public/v1/documents/{id}/recipients/{recipient_id}/reassign | Reassign Document Recipient |
DocumentsApi | changeDocumentStatus | PATCH /public/v1/documents/{id}/status | Document status change |
DocumentsApi | createDocument | POST /public/v1/documents | Create document |
DocumentsApi | createDocumentLink | POST /public/v1/documents/{id}/session | Create a Document Link |
DocumentsApi | createLinkedObject | POST /public/v1/documents/{id}/linked-objects | Create Linked Object |
DocumentsApi | deleteDocument | DELETE /public/v1/documents/{id} | Delete document by id |
DocumentsApi | deleteLinkedObject | DELETE /public/v1/documents/{id}/linked-objects/{linked_object_id} | Delete Linked Object |
DocumentsApi | detailsDocument | GET /public/v1/documents/{id}/details | Document details |
DocumentsApi | documentMoveToFolder | POST /public/v1/documents/{id}/move-to-folder/{folder_id} | Document move to folder |
DocumentsApi | downloadDocument | GET /public/v1/documents/{id}/download | Document download |
DocumentsApi | downloadProtectedDocument | GET /public/v1/documents/{id}/download-protected | Download document protected |
DocumentsApi | listDocuments | GET /public/v1/documents | List documents |
DocumentsApi | listLinkedObjects | GET /public/v1/documents/{id}/linked-objects | List Linked Objects |
DocumentsApi | sendDocument | POST /public/v1/documents/{id}/send | Send Document |
DocumentsApi | statusDocument | GET /public/v1/documents/{id} | Document status |
DocumentsApi | transferAllDocumentsOwnership | PATCH /public/v1/documents/ownership | Transfer all documents ownership |
DocumentsApi | transferDocumentOwnership | PATCH /public/v1/documents/{id}/ownership | Update document ownership |
DocumentsApi | updateDocument | PATCH /public/v1/documents/{id} | Update Document only in the draft status |
FoldersAPIApi | createDocumentFolder | POST /public/v1/documents/folders | Create Documents Folder |
FoldersAPIApi | createTemplateFolder | POST /public/v1/templates/folders | Create Templates Folder |
FoldersAPIApi | listDocumentFolders | GET /public/v1/documents/folders | List Documents Folders |
FoldersAPIApi | listTemplateFolders | GET /public/v1/templates/folders | List Templates Folders |
FoldersAPIApi | renameDocumentFolder | PUT /public/v1/documents/folders/{id} | Rename Documents Folder |
FoldersAPIApi | renameTemplateFolder | PUT /public/v1/templates/folders/{id} | Rename Templates Folder |
FormsApi | listForm | GET /public/v1/forms | Forms |
MembersApi | detailsCurrentMember | GET /public/v1/members/current | Current member details |
MembersApi | detailsMember | GET /public/v1/members/{id} | Member details |
MembersApi | listMembers | GET /public/v1/members | List members |
OAuth20AuthenticationApi | accessToken | POST /oauth2/access_token | Create/Refresh Access Token |
QuotesApi | quoteUpdate | PUT /public/v1/documents/{document_id}/quotes/{quote_id} | Quote update |
SectionsApi | listSections | GET /public/v1/documents/{document_id}/sections | List sections |
SectionsApi | sectionDetails | GET /public/v1/documents/{document_id}/sections/uploads/{upload_id} | Section details |
SectionsApi | sectionInfo | GET /public/v1/documents/{document_id}/sections/{section_id} | Section Info |
SectionsApi | uploadSection | POST /public/v1/documents/{document_id}/sections/uploads | Upload section |
TemplatesApi | deleteTemplate | DELETE /public/v1/templates/{id} | Delete Template |
TemplatesApi | detailsTemplate | GET /public/v1/templates/{id}/details | Details Template |
TemplatesApi | listTemplates | GET /public/v1/templates | List Templates |
UserAndWorkspaceManagementApi | addMember | POST /public/v1/workspaces/{workspace_id}/members | Add member |
UserAndWorkspaceManagementApi | createUser | POST /public/v1/users | Create User |
UserAndWorkspaceManagementApi | createWorkspace | POST /public/v1/workspaces | Create Workspace |
WebhookEventsApi | detailsWebhookEvent | GET /public/v1/webhook-events/{id} | Get webhook event by uuid |
WebhookEventsApi | listWebhookEvent | GET /public/v1/webhook-events | Get webhook event page |
WebhookSubscriptionsApi | createWebhookSubscription | POST /public/v1/webhook-subscriptions | Create webhook subscription |
WebhookSubscriptionsApi | deleteWebhookSubscription | DELETE /public/v1/webhook-subscriptions/{id} | Delete webhook subscription |
WebhookSubscriptionsApi | detailsWebhookSubscription | GET /public/v1/webhook-subscriptions/{id} | Get webhook subscription by uuid |
WebhookSubscriptionsApi | listWebhookSubscriptions | GET /public/v1/webhook-subscriptions | Get all webhook subscriptions |
WebhookSubscriptionsApi | updateWebhookSubscription | PATCH /public/v1/webhook-subscriptions/{id} | Update webhook subscription |
WebhookSubscriptionsApi | updateWebhookSubscriptionSharedKey | PATCH /public/v1/webhook-subscriptions/{id}/shared-key | Regenerate webhook subscription shared key |
License
SDK is licensed under the following License.