Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
ledger
/
accounts
/
{accountId}
/
exports
/
excel
Export account transactions as Excel
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/ledger/accounts/{accountId}/exports/excel \
  --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"
}

Rate Limiting

This endpoint has a custom rate limit policy. Rate Limit Details:
EnvironmentLimitRefill PeriodInitial Size
Sandbox20 requests1 second40 requests
Production20 requests1 second40 requests
Response Headers: All responses include the following rate limit headers:
  • X-RateLimit-Limit: The rate limit bucket capacity
  • X-RateLimit-Remaining: The number of tokens remaining in the bucket
  • X-RateLimit-Reset: UTC timestamp (in seconds) when the bucket will be refilled
For more details on rate limiting, see Rate Limiting.

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<uuid>
required

The UUID of the business

accountId
string
required

The ID or stable_name of the ledger account

Query Parameters

start_date
string<date-time>

Start date for filtering transactions (inclusive). ISO-8601 format.

end_date
string<date-time>

End date for filtering transactions (exclusive). ISO-8601 format.

reporting_basis
enum<string>

Reporting basis for the export (ACCRUAL or CASH). Defaults to the business's default reporting basis.

Available options:
ACCRUAL,
CASH
tag_key
string

Tag key to filter transactions by. 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.

include_child_account_lines
boolean
default:false

If true, includes transactions from child accounts in the export. Each child account will have its own section. Defaults to false.

include_entries_before_activation
boolean
default:false

If true, includes ledger entries from before the business activation date. Defaults to false.

Response

Pre-signed URL for downloading the Excel 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"