*** September 2026 Major Release ***Read and watch
Document type

Extracting data from bailee letters

A warehouse lender sends a bailee letter with every mortgage note it ships to an investor. Each warehouse bank writes its own form. The investor's document custodian receives one with each loan it buys, as paper in the note shipment and as copies by fax or email.

An investor needs the loan number, the warehouse lender, the purchase price and the funding deadline. A collateral tracking system matches the letter to the note on file, and the funding desk wires the price to the warehouse lender before the window closes.

Page 1 of a sample Bailee Letter, with extracted values outlined
5,558Markdown characters
23parse blocks
27fields extracted
The problem

What makes bailee letters hard

Parties identified in legal prose

A bailee letter names its parties by role inside legal paragraphs: the warehouse lender, the originator and the investor acting as bailee.

A form per warehouse lender

Fannie Mae's Selling Guide defines a bailee letter by its function, so each warehouse lender drafts its own wording and layout.

Two amounts, one wire

A bailee letter can print the loan amount on its schedule and the purchase price to wire in its body, as two different figures.

How it works

Parse, extract, verify

1

Parse

Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.

2

Extract

You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.

3

Verify

Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.

Worked example

One bailee letter, end to end

About this document: A synthetic bailee letter that a document AI vendor publishes as its sample, shown unredacted because the parties and loan are invented. Four portrait pages: the letter across pages 1 and 2, a signed acknowledgment on page 3, and a one-loan Schedule A on page 4. Page 1 is featured.

Processing objective: The objective is to capture the deal the letter puts on hold: the loan, the parties on each side of it and the deadline for payment. Page 1 names the warehouse lender inside a legal paragraph, and spells out the funding window in words.

Demonstration fields: Loan number, Letter date, Investor (payee), Warehouse lender, Funding window (business days)

The document

4 of 4 pages
  • Page 1 of the sample Bailee LetterPage 1shown below
  • Page 2 of the sample Bailee LetterPage 2
  • Page 3 of the sample Bailee LetterPage 3
  • Page 4 of the sample Bailee LetterPage 4

Where each value came from

Page 1 of the sample Bailee Letter, with every featured field outlined
Loan numberloan_number
123456789
The region of the sample Bailee Letter containing Loan number, with the extracted value outlined
extraction_metadata["loan_number"]
{
  "value": "123456789",
  "page": 1,
  "range": {
    "end": 36,
    "start": 16
  },
  "box": {
    "xmin": 0.1021,
    "ymin": 0.13469,
    "xmax": 0.27765,
    "ymax": 0.14957
  }
}
Letter dateletter_date
2024-12-12
The region of the sample Bailee Letter containing Letter date, with the extracted value outlined

Printed on the page as Date: 12/12/2024, normalized on extraction.

extraction_metadata["letter_date"]
{
  "value": "2024-12-12",
  "page": 1,
  "range": {
    "end": 76,
    "start": 60
  },
  "box": {
    "xmin": 0.10173,
    "ymin": 0.20879,
    "xmax": 0.24223,
    "ymax": 0.2232
  }
}
Investor (payee)payee.name
Fake Home Mortgage
The region of the sample Bailee Letter containing Investor (payee), with the extracted value outlined
extraction_metadata["payee.name"]
{
  "value": "Fake Home Mortgage",
  "page": 1,
  "range": {
    "end": 111,
    "start": 78
  },
  "box": {
    "xmin": 0.10172,
    "ymin": 0.24514,
    "xmax": 0.40645,
    "ymax": 0.26199
  }
}
Warehouse lenderwarehouse_lender_name
ABC Sample Inc.
The region of the sample Bailee Letter containing Warehouse lender, with the extracted value outlined
extraction_metadata["warehouse_lender_name"]
{
  "value": "ABC Sample Inc.",
  "page": 1,
  "range": {
    "end": 570,
    "start": 477
  },
  "box": {
    "xmin": 0.0996,
    "ymin": 0.41017,
    "xmax": 0.89254,
    "ymax": 0.42761
  }
}
Funding window (business days)funding_expiration_days
10
The region of the sample Bailee Letter containing Funding window (business days), with the extracted value outlined
extraction_metadata["funding_expiration_days"]
{
  "value": 10,
  "page": 1,
  "range": {
    "end": 1891,
    "start": 1796
  },
  "box": {
    "xmin": 0.09952,
    "ymin": 0.68459,
    "xmax": 0.85494,
    "ymax": 0.70277
  }
}

How to try it yourself

Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.

  • Claude Skilldescribe the job; the agent writes it
  • CLIno code at all
  • MCPexpose ADE docs as an agent tool
  • REST APIany language
  • Pythonlandingai-ade
  • TypeScriptlandingai-ade
Why LandingAI?

Documents into data

Accurate

The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.

Auditable

Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.

Agentic

Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.

API-first

Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.

Affordable

Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.

Enterprise-grade

Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.

Built for high-volume, high-throughput production

  • Zero data retention
  • Priority rate limits
  • Enhanced support
  • VPC and on-prem deployment

Available on Team and Enterprise plans.

Compare plans
Capabilities

Bailee Letter processing highlights

No per-lender templates
Party roles from contract text
Loan numbers and amounts
Purchase price and wire terms
Funding windows as integers
Warehouse lender identification
Investor and payee addresses
Schedule A loan listings
Signature detection
Native PDFs, scans and faxes
Dates normalized to ISO
Bounding box for every value
FAQs

Questions, answered

No. A schema names the fields you want and describes them in plain language. Extraction reads the parsed letter for meaning, so one schema covers every lender's form, including parties identified only in the legal text.

Yes. Type the field as an integer in your schema. A period spelled out in words with the numerals in brackets comes back as a single number, and its grounding points at the sentence that sets the deadline.

Yes. Parsing marks signatures, stamps and seals as attestation blocks, labelled SIGNED in the Markdown. A boolean field in your schema can read that label, and its grounding points at the signature on the page.

Every extracted value carries the character range it was quoted from in the parsed Markdown. The Ground API maps that range to a page and a bounding box, so a reviewer sees each party's name in the sentence it came from.

A bailee letter carries the borrower's name and address, the loan number and wire instructions. A schema can ask for the deal terms alone. Accounts are available with zero data retention, alongside SOC 2 Type II, GDPR and HIPAA compliance.

Start extracting bailee letter data

Reliable, structured outputs with full traceability in minutes