POST
/
api
/
end_users
/
{end_user_id_or_heron_id}
/
pdfs
/
v1
curl --request POST \
  --url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/pdfs/v1 \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "account_id": "checking_account_202348",
  "currency": "USD",
  "filename": "my-favourite.pdf",
  "pdf_base64": "<string>",
  "read_us_dates": null,
  "reference_id": "my-favourite-pdf",
  "with_fraud": null
}'
{
  "pdf_heron_id": "<string>",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

end_user_id_or_heron_id
string
required

The end_user_id or heron_id of EndUser to upload

Body

application/json
pdf_base64
string
required

The base64 encoded string of the PDF file. If using Javascript, this is directly the output of the FileReader.readAsDataURL() output. See https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL for more info

account_id
string | null

Unique ID for account associated with PDF

Example:

"checking_account_202348"

currency
enum<string> | null

ISO 4217 currency code for transactions in account. We currently only support GBP and USD PDFs

Available options:
USD,
GBP
Example:

"USD"

filename
string | null

The filename of the PDF

Example:

"my-favourite.pdf"

read_us_dates
boolean | null

True if date formats in the statement are US: month/date/year

reference_id
string | null

An optional field for your unique identifier for the PDF

Maximum length: 140
Example:

"my-favourite-pdf"

with_fraud
boolean | null

True if fraud detection should be enabled for this PDF

Response

201 - application/json
OK
pdf_heron_id
string

Heron id of the uploaded pdf file

request_id
string

Unique UUID per request