Skip to main content
Receipts use Layer’s multipart document upload. The MCP tools never accept file bytes. The client (not the model) PUTs the file to S3. Full HTTP contract: Multipart upload guide.

Sequence

1

Prepare

Call prepare_receipt_upload (POST …/documents) with filename, content type, size, and document type such as RECEIPT. The result includes the document id, upload id, part size, and presigned part URLs.
2

PUT file bytes to S3

The HTTP client PUTs each part to the returned URLs. Do not pass file bytes or large base64 through the model.
3

Complete

Call complete_receipt_upload with the upload id and part ETags from S3 (POST …/documents/{documentId}/complete).

Reads and archive

  • list_transaction_receipts — documents on a bank transaction (GET …/bank-transactions/{transactionId}/documents), including presigned URLs.
  • get_transaction_receiptGET …/s3_doc/{documentId}.
  • archive_transaction_receipt — destructive.
Search phrases: prepare upload, S3 PUT, complete upload, receipts (not base64). These tools are in the accounting group. Writes are business mode. List/get are available in platform and business as reads.