GET
/
v1
/
businesses
/
{business_id}
/
reports
/
profit-and-loss
/
exports
/
csv
curl -X GET 'https://sandbox.layerfi.com/v1/businesses/f9baa8fd-9413-4bcf-810b-6d32604de649/reports/profit-and-loss/exports/csv?month=3&year=2024&reporting_basis=CASH' \
  -H 'Authorization: Bearer <access_token>'

{
    "data":{
        "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",
        "fileType": "csv"
    }
}
business_id
string
required

ID of the Business to download the Profit and Loss CSV for.

start_date
string

The start date for the Profit and Loss report in ISO-8601 format.

end_date
string

The end date for the Profit and Loss report in ISO-8601 format.

reporting_basis
string

The reporting basis for the report (e.g., “CASH” or “ACCRUAL”).

tag_filter
string

Filter the report by specific tags.

year
integer

The year for the Profit and Loss report.

month
integer

The month for the Profit and Loss report.

money_format
string

The format for the monetary values in the report, defaults to CENTS. CENTS formats all values as integers in cents (10099). DOLLAR_STRING formats all values as strings with a dollar sign ($100.99).

Response

Returns a pre-signed AWS S3 URL for the generated Profit and Loss report as a CSV.

curl -X GET 'https://sandbox.layerfi.com/v1/businesses/f9baa8fd-9413-4bcf-810b-6d32604de649/reports/profit-and-loss/exports/csv?month=3&year=2024&reporting_basis=CASH' \
  -H 'Authorization: Bearer <access_token>'

{
    "data":{
        "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",
        "fileType": "csv"
    }
}