Skip to content
Last updated

PDF Insights Quickstart

This Quickstart applies to:

  • PDF Insights
  • PDF Insights w/Thumbprint

1. Verify your credentials

Verify that you can log into the Insights UI using your username and password.

2. Authenticate to the API

Call GET https://insights.moneythumb.com/api/v1.5/authenticate.

Include the following headers:

HeaderValue
AuthorizationBasic [base64-encoded username:password]
MT-ProductEitherpdfinsights (PDF Insights), or
pdfinsightstp (PDF Insights w/Thumbprint)

No request body is required.

You should receive a 200 OK response with a session token in the response body.

For further details, see:

3. Convert a file

Call POST https://insights.moneythumb.com/api/v1.5/uploadpdfs.

Include the following headers:

HeaderValue
AuthorizationBearer [session token]
MT-ProductEitherpdfinsights (PDF Insights), or
pdfinsightstp (PDF Insights w/Thumbprint)
Content-Typemultipart/form-data

Include the following form-data fields in the body:

NameTypeValue
appnumberstringAny string to identify this application.
pdf-filenameblobThe file (i.e., bank statement) to upload.

You should receive a 200 OK response with a reponse body matching this structure:

{ 
  statement_summmaries: [],
  appinfo: {}
}

For details, see the /uploadpdfs endpoint.

Note: You should now be able to see this deal in the UI.

4. Return Scorecard and Transactions

Repeat the same /uploadpdfs call from Step 3, but now add three additional form-data fields:

NameTypeValue
includescorecardstringtrue
includetransactionsstringtrue
formatstringjsonobject

You should receive a 200 OK response with a reponse body matching this structure:

{ 
  statement_summmaries: [],
  appinfo: {},
  scorecard: {},
  transactions: []
}

5. Provide a callback

Image documents are converted asynchronously and their results returned by callback (aka webhook). We strongly encourage you to use this approach for all documents.

5a. Create the recipient

Either use a third-party service or create your own endpoint to receive the callback. The body of the callback request will match the output you received from /uploadpdfs in Step 4.

5b. Upload a document with callback

Repeat the same /uploadpdfs call from Step 4, but add one additional form-data field:

NameTypeValue
webhookstringThe URL to which the results should be sent.
It should be in the format https://www.mydomain.com/my-endpoint

You should receive a 202 ACCEPTED response.

A few seconds to a few minutes later (depending on the size and format of the file), your callback endpoint should receive a request. The request body should match this structure:

{ 
  statement_summmaries: [],
  appinfo: {},
  scorecard: {},
  transactions: []
}

6. Next Steps

  1. Explore the /uploadpdfs documentation.
  2. Set the finduntrue form-data field to true to automatically identify untrue transactions.
  3. Try converting multiple files at once (include as many pdf-filename form-data fields as you like).
  4. Customize which scorecard sections you want returned with the sections form-data field.
  5. Add retry logic to your API calls (but please include a retry limit).