Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
reports
/
transactions
/
exports
/
csv
Export transactions as CSV
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/reports/transactions/exports/csv \
  --header 'Authorization: Bearer <token>'
{
  "type": "S3_Presigned_Url",
  "presignedUrl": "https://example-bucket.s3.amazonaws.com/example-object?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=FAKEAWSACCESSKEY%2F20240710%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240710T000000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=FAKESIGNATURE1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n",
  "fileType": "csv"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business to export transactions for

Query Parameters

start_date
string<date-time>

Start date for transaction filtering (ISO 8601 format)

end_date
string<date-time>

End date for transaction filtering (ISO 8601 format)

external_account_ids
string

Comma-separated list of external account (e.g. Plaid account) IDs. This will filter for bank transactions within the provided list of accounts. Takes precedence over account_filter if both are specified.

account_filter
string

Filter transactions by external account ID. This is a legacy alias for external_account_ids - prefer using external_account_ids instead. Only used when external_account_ids is not specified.

direction
enum<string>

Filter by transaction direction.

Available options:
INFLOW,
OUTFLOW
amount_min
integer<int64>

The minimum amount of the transaction to include (in cents).

amount_max
integer<int64>

The maximum amount of the transaction to include (in cents).

category
string

Filter transactions by category identifier or stable name.

categorized
boolean

Filter transactions by whether they are categorized (true) or not categorized (false).

categorization_status
enum<string>

Filter by categorization status.

Available options:
CATEGORIZED,
UNCATEGORIZED,
PENDING,
MATCHED
is_matched
boolean

Filter transactions by whether they are matched (true) or not matched (false).

description_filter
string

Case-insensitive substring to search for in transaction descriptions (contains match, not exact equality).

description_filter_regex
string

Regex to search for in transaction descriptions. Regex will be parsed exactly as given and an error will be returned if the regex is invalid.

merchant_name_filter
string

Substring to search for in merchant name. Only exact matches will be returned.

merchant_name_filter_regex
string

Regex to search for in merchant name. Regex will be parsed exactly as given and an error will be returned if the regex is invalid.

q
string

Search query string to filter transactions. Searches across multiple fields.

memo
string

Filter transactions by exact memo match.

memo_contains
string

Filter transactions where memo contains this substring.

reference_number
string

Filter by exact reference number match. Returns only records with this exact reference number.

reference_numbers
string

Comma-separated list of reference numbers to filter transactions. Only transactions with reference numbers matching any value in this list will be returned.

customer_id
string<uuid>

UUID of the customer to filter transactions by.

customer_external_id
string

External ID of the customer to filter transactions by.

vendor_id
string<uuid>

UUID of the vendor to filter transactions by.

vendor_external_id
string

External ID of the vendor to filter transactions by.

counterparty_id
string<uuid>

UUID of the counterparty to filter transactions by.

tag_key
string

Filter transactions by tag key. Must be used together with tag_values.

tag_values
string

Comma-separated list of tag values to filter by. Must be used together with tag_key.

Response

Pre-signed URL for downloading the CSV export

A pre-signed URL to download a document

type
string

Resource type. Value will be 'S3_Presigned_Url'.

Example:

"S3_Presigned_Url"

presignedUrl
string

Pre-signed URL to download a document

Example:

"https://example-bucket.s3.amazonaws.com/example-object?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=FAKEAWSACCESSKEY%2F20240710%2Fus-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240710T000000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=FAKESIGNATURE1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n"

fileType
string

The file type of the document

Example:

"csv"