The GoFormz API supports exporting formz to PDF. Generating a PDF is a processing intensive operation and could be a long running operation. In order to improve performance, this process consists of multiple steps.

  • Exporting a form to PDF
  • Create the PDF.
  • Get the metadata for the PDF.
  • Download the PDF from the Url provided in the metadata.

To export the form into a pdf, submit a POST to the formz exports endpoint:

POST https://api.goformz.com/v2/formz/{formId}/exports

The body of the POST request has two properties:

  • type - Allows you to specify the type of format to export the form to.

📘

NOTE

Currently pdf is the only supported type

  • pages - Specify the form pages to include in the exported format.

📘

NOTE

The pages property is optional.

{
  "type": "pdf",      
  "pages": "1-5,7,9" 
}

At this point the pdf is queued for processing. The response headers will contain a location header that contains a link to an entry in the queue that can be polled for the status of the PDF creation.

Once the PDF has been created, the queue entry will provide a link to the actual PDF resource.

Location: "https://api.goformz.com/v2/queue/b047fa76-2ceb-4151-9c57-f93971e5d84d"

Get the metadata for the PDF

See Get exported PDF metadata for more information.

Download the PDF from the Url provided in the metadata

Issue a GET request to the URL supplied in the redirectUrl property of the metadata to download the PDF.

Sample Request
GET https://


Language
Authorization
Basic
base64
: