The document conversion API endpoint /conversion allows you to convert an unstructured PDF of payroll data or financial statements (balance sheet, income statement) in to structured data suitable for financial spreading and evaluation.

The conversion API operates asynchronously, in order to be notified when a conversion is complete you’ll want to setup a webhook listener for the document_conversion_complete event.

To use the conversion API you perform a multipart/form-data POST to the /conversion endpoint with the following parameters:

parameter

required

type

definition

document

yes

binary

The PDF document to convert

type

yes

string

either payroll-report or financial-statement depending on which you need to convert

url

no

string

The URL the PDF was downloaded from. This additional hint helps the conversion process and will result in a higher chance that we can convert the document

In response to this request you will receive a document processing ID which can be used to track the status of this conversion via requests to the /conversion/id endpoint, where "id" is the numeric id.

When the conversion is completed a webhook notification will be sent. You may also poll the /conversion/id endpoint though this is not recommended

Once the document has been converted a GET request can be sent to /conversion/id endpoint with the following parameters:

parameter

required

type

definition

id

yes

integer

The document processing identifier

format

yes

string

Either pages to download an unstructured Excel file or data to download astructured Excel file

You also need to send an accept header with a value of application/vnd.openxmlformats-officedocument.spreadsheetml.sheet to get an Excel output as opposed to JSON.