> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Receipts

> Prepare a receipt upload, PUT bytes to S3, then complete. Never send base64 through the model.

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](/api-reference/v1/multipart-upload-guide).

## Sequence

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Complete">
    Call `complete_receipt_upload` with the upload id and part ETags from S3 (`POST …/documents/{documentId}/complete`).
  </Step>
</Steps>

## Reads and archive

* `list_transaction_receipts` — documents on a bank transaction (`GET …/bank-transactions/{transactionId}/documents`), including presigned URLs.
* `get_transaction_receipt` — `GET …/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.
