Skip to content

Quickstart

Turn a bank statement PDF into transactions in three steps.

Sign in with your email, create an integration and accept the API terms, then create a key. A key is shown once: store it as a secret, never in client-side code.

Send the PDF as the request body, or as a form upload from any HTTP client.

Terminal window
curl -X POST https://parse.mooola.co.za/v1/parse \
-H "Authorization: Bearer $MOOOLA_API_KEY" \
-H "Content-Type: application/pdf" \
--data-binary @statement.pdf

A 200 answer carries status:

  • verified when every transaction was checked against the statement, or
  • needs_review when every transaction was read but a check did not pass (its warnings say what).

A statement the API cannot stand behind is refused with NOT_VERIFIED and a reason. Add ?unverified=include to receive its transactions anyway, with status unverified. Warnings and reasons use the same issue codes, which you can show to your users. Handling results explains each status.

Amounts are integers in minor units (cents): 250000 is 2,500.00. Add ?format=csv for CSV instead of JSON.

One branch per outcome. Issue messages are written for people, so you can show them to your users as they are.

const result = await response.json()
if (response.ok) {
// 200: verified, needs_review, or unverified (only when you asked for it).
if (result.status === 'verified') save(result.accounts)
else if (result.status === 'needs_review') saveForReview(result.accounts, result.warnings)
else saveAsDraft(result.accounts, result.reason) // unverified: a person should check it
} else {
const { code, message, reason } = result.error
switch (code) {
case 'NOT_VERIFIED': // read, but could not be verified
tellUser(reason.message) // e.g. "Some transactions have no date that could be read."
break
case 'PASSWORD_REQUIRED':
case 'INCORRECT_PASSWORD':
askForPassword() // send it in X-Statement-Password
break
case 'RATE_LIMITED': // 30 a minute per key: retry after a short wait
retryLater(5_000)
break
case 'QUOTA_EXCEEDED': // this month's allowance is used
retryAfter(response.headers.get('x-quota-reset'))
break
default: // UNREADABLE, UNSUPPORTED_DOCUMENT, INVALID_FILE, TOO_LARGE, ...
tellUser(message)
}
}

Every code is listed on the error response page. The whole API is described as OpenAPI 3.1 at parse.mooola.co.za/openapi.json, for generating a client or importing into Postman or Insomnia; browse it in the operation reference or try requests in the API explorer.