Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
bank-transactions
/
{transactionId}
/
documents
Upload transaction document
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/bank-transactions/{transactionId}/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form documentType=RECEIPT \
  --form file='@example-file' \
  --form 'description=<string>'
{
  "fileType": "JPEG",
  "filename": "exampleFile.jpg",
  "documentType": "RECEIPT",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

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 multipart/form-data

Path Parameters

businessId
string
required

The UUID of the business to upload the document for

transactionId
string
required

The UUID of the transaction to associate this document with

Body

multipart/form-data
documentType
enum<string>
required

The type of document being uploaded.

Available options:
RECEIPT
file
file
required

The document file. For RECEIPT documents, only images (jpg, png) and PDFs are supported.

description
string

Optional description for the document.

Response

Document uploaded successfully.

Contains metadata about a file, including its type, name, and the category of document it represents.

fileType
string
required

The type of the file (e.g., PDF, DOCX, JPEG).

Example:

"JPEG"

filename
string
required

The name of the file including its extension.

Example:

"exampleFile.jpg"

documentType
enum<string>
required

The type of document.

Available options:
RECEIPT
id
string<uuid> | null

Optional unique identifier for the file, can be null if not specified.