Skip to main content

Generating PDFs

Export SDK provides several ways to generate PDFs. You can use the REST API, Javascript SDK, or Zapier integration. Whatever path you choose, there are three pieces of information you'll need from your dashboard.

  1. API Key
  2. Template ID
  3. Template JSON tree

API Key#

API keys are located under the 'Settings' section of the dashboard. You can create as many keys as you need and delete them when necessary.

Screenshot of the Export SDK API key section

Template ID#

Template IDs are located next to the template name in the 'Templates' section of the dashboard. Click the copy button next to the template ID to add it to your clipboard.

Screenshot of the Export SDK templates section

JSON Tree#

The JSON tree for a given template can be found within the 'Preview' window. To get there, click on the name of the template within the 'Templates' section of the dashboard and then click the 'Preview' button in the top right.

Screenshot of the Export SDK editor preview button

The expected JSON for the template will be located in the left pane of the 'Preview' window.

Screenshot of the Export SDK editor preview dialog

Now that we know where to get all of the information needed, let's take a look at a simple API request.

Example API request#

With our API key, template ID, and JSON at the ready, here is how we could construct a POST request and receive a PDF in the response.

{    "request": {        "method": "POST",        "header": [            {                "key": "X-API-KEY",                "value": "{{apiKey}}",                "type": "text"            }        ],        "body": {            "templateId": "{{templateId}}",             "data": {                 "Company": "Bluth Banana Stand",                 "date": "10/21/2021",                 "email": "[email protected]",                 "invoiceNumber": "2003",                 "phoneNumber": "555-555-5555",                 "total": "5.99",                 "order": [                     {                         "description": "Frozen Banana",                         "price": "5.99",                         "quantity": "1"                     }                 ]             }         },        "url": "",    },}

That's it! Pretty simple, right? If you run into any issues or have any questions, hit the chat button or send an email to [email protected].