Create from Public PDF

This recipe assumes:

Create the original PDF

If you want to include PandaDoc native elements such as signature or text fields in your PDF-derived Document you’ll need to use either the PDF native form fields structure or add manual field tags to the PDF.
An example of form fields is available here
An example of field tags is available here
You can read more about the structure and respective benefits of form fields vs. field tags in the create document from pdf documentation. If you choose to use form fields, makes sure you set "parse_form_fields": true, otherwise set "parse_form_fields": false
When you’ve finalized your PDF document you’re ready for the next step.

Upload the Document to your host

You’ll need to post your PDF document to a publicly accessible URL. For example, if you’re using an S3 bucket on AWS you must make sure to set the GetObject to “allow” for *. The PDF must be fully uploaded and accessible before you post it to PandaDoc.

POST the Document to PandaDoc

To inform PandaDoc to ingest and parse your PDF use
POST https://api.pandadoc.com/public/v1/documents/
With content type application/JSON and a JSON block to identify the Document

{ 
   "name": "My minimal document",
   "url": "https://example.com/path/to/mydocument.pdf",
   "recipients": [
      {
       "email":"[email protected]"
      }
 	 ],
   "parse_form_fields": false
}

The response will contain the document ID as the element “id”

{
  "id":"XHjv8z3SfDuTseFSnhprML",
  "name":"My minimal document",
  "Status":"document.uploaded",
  "date_created":"2021-07-05T15:05:27.787341Z",
  "date_modified":"2021-07-05T15:05:27.787341Z",
  "Expiration_date":null,
  "Version":null,
  "uuid":"XHjv8z3SfDuTseFSnhprML"
}

Wait for the Document to enter a draft status

See Listening for changes in document status. If you are actively polling your document ID is “id” from the previous step.

Send the Document

Once you’ve determined that the document has entered “document.draft” status you can send it with a
POST https://api.pandadoc.com/public/v1/documents/{id}/send
Where {id} is the document ID from above. If you want you can include the optional parameters in your POST to set a subject line and body text

{
  "message": "Hello! This document was sent from the PandaDoc API.",
  "subject": "Please check this test API document from PandaDoc"
}

Do not set the “silent” parameter to “true” unless you don’t want an email to go out with the document link. For more information about why you might want to send silently see “Create a document and share it in real time”