PandaDoc API allows to Send Document for approval if "Approval Workflow" is turned on in the template used for document creation. Document sent for approval will have "document.waiting_approval" status.

You need to make Send Document call after a document is approved in order to send the document to recipients.

If a document is in "waiting_approval" or "rejected" status, you can't use Share Document call. Share Document endpoint will return HTTP 400 with one of the following error messages:

If document is in "Waiting for Approval" status

{
  "type": "state_error",
  "detail": "Cannot create session ID for a document in document.waiting_approval status"
}

If document is in "Rejected" status

{
  "type": "state_error",
  "detail": "Cannot create session ID for a document in document.rejected status"
}

Tags can now be specified on Create Document from a template, form fields PDF, field tags PDF.

API example:

{  
    "name": "API Sample Document from PandaDoc Template",
    "tags": [
       "tag_1",
       "tag_2"
    ],
    ...
}

PandaDoc API allows Delete Document and Delete Template.

API returns following HTTP statuses:

  • "204 No Content" on successful deletion
  • "403 Forbidden" if a document is deleted.

JSON response example if a document is already deleted:

{
    "type": "permissions_error",
    "detail": "You do not have permission to perform this action."
}

Using PandaDoc API (List Documents endpoint) you can list documents, created from a specific template.

Request example:
https://api.pandadoc.com/public/v1/documents?template_id=111222333

Response example:

{
    "results": [
        {
            "id": "XQZvGbfYoCCXSLAEdWPQ6C",
            "name": "Integration test",
            "status": "document.completed",
            "date_created": "2018-08-28T19:28:01.539904Z",
            "date_modified": "2018-08-28T19:28:42.923935Z",
            "expiration_date": "2018-10-27T19:28:28.813375Z"
        }
    ]
}

Document details endpoint and Webhooks now return information about the template that was used for document creation. If a document was created from PDF, it will return null instead of template information.

API example:

{
    "id": "g2wE9fJikvJTPaeyYDe82J",
    ...
    "template": null,
    "expiration_date": "2028-06-16T09:27:01.219415Z",
    "metadata": {},
    "tokens": [],
    ...
}

Webhook example:

[
  {
    "event": "document_state_changed",
    "data": {
      "id": "YcNQSR7kV5CHXivEKpEPY3",
      ...
      },
      ...
      "template": {
        "id": "rpsdeCfuLVNGhA2YJkU4PK",
        "name": "Integration test"
      }
    }
  }
]

Document details endpoint and Webhooks now return document's expiration date.

API example:

{
    "id": "g2wE9fJikvJTPaeyYDe82J",
    ...
    "expiration_date": "2028-06-16T09:27:01.219415Z",
    "metadata": {},
    "tokens": [],
    ...
}

Webhook example:

[
  {
    "event": "document_state_changed",
    "data": {
      "id": "g2wE9fJikvJTPaeyYDe82J",
      "name": "Integration test",
      "date_created": "2018-08-08T11:39:56.871553Z",
      "date_modified": "2018-08-08T11:39:57.180209Z",
      "expiration_date": "2028-06-16T09:27:01.219415Z",
      ...
    }
  }
]

PandaDoc API allows creating documents from PDF.
There is 50 MB limit on file attachment size.

Now API returns a specific error in case of bigger files - HTTP status "413 Request entity too large".

JSON response example:

{
  "type": "request_error",
  "detail": "Attached file is too big. Maximum file size is 50 MB"
}

Document details endpoint and Webhooks now return information about document's Grand Total.

API example:

{
    ...
    "id": "WHT7fGF2QeWSTZEsg6un75",
    "grand_total": {
        "amount": "29.99",
        "currency": "USD"
    },
    ...
}

Webhook example:

{
    "data": {
        ...
        "id": "WHT7fGF2QeWSTZEsg6un75",
        "grand_total": {
        "amount": "29.99",
        "currency": "USD"
        },
        ...
    },
    "event": "document_state_changed"
}

PandaDoc API and Webhooks now return information about document's expiration date.

Please, take a note that the expiration date may be null as this property only makes sense for documents in Sent, Viewed, Waiting for Payment, and Paid statuses.

List of endpoints that return expiration date:

  1. Create document. The expiration date will always be null here as there is no expiration date for documents in Uploaded and Draft.
  2. Document status.
  3. Document details.
  4. Send document.

API example:

{
    "id": "dvEnR6iJ8pVSEssbQoEshT",
    "name": "API Sample Document from PandaDoc Template",
    "status": "document.waiting_approval",
    "date_created": "2018-06-18T12:07:17.721482Z",
    "date_modified": "2018-06-18T12:07:46.108405Z",
    "expiration_date": null,
    "uuid": "dvEnR6iJ8pVSEssbQoEshT"
}

Webhook example:

{
    "data": {
        ...
        "date_created": "2018-06-18T12:06:54.389089Z",
        "date_modified": "2018-06-18T12:31:24.920614Z",
        "expiration_date": "2018-08-17T12:31:24.833779Z",
        ...
    },
    "event": "document_state_changed"
}

Our API Reference documentation now contains the list of (limitations):

  1. Request size is limited to 2.5 MB.
  2. The number of API requests per minute may be limited by PandaDoc.
  3. Webhook subscription may be deactivated if a significant number of consequent requests to endpoint URL ends up with HTTP 4xx and 5xx responses.