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

# Get Loan Agreement

> Read one loan agreement with its schedule, salt and acceptance typed data

Returns one agreement to a party: the bank, or the borrower side. Anyone else gets `AGREEMENT_NOT_FOUND`. The answer carries the schedule, the salt once the agreement is issued, the loans it is bound to, and, while it waits for acceptance, the typed data the borrower signs.

## Path Parameters

**marketId** `string` *required*

The market's record ID on your instance.

**ref** `string` *required*

The agreement reference: `agr_` followed by 20 characters.

## Query Parameters

**copyVerified** `string`

`true` or `false` (default). The value written into `acceptTypedData`: whether the borrower's copy matched the reported commitment. The borrower signs exactly the typed data it reads.

## Response Fields

**data.agreement** `object`

**ref** `string`

`agr_` followed by 20 characters.

**kind** `string`

`LOAN` or `FRAMEWORK`.

**status** `string`

See [States](https://docs.trusset.org/endpoints/lending/loan-agreements.md#states). `EXPIRED` is read from `expiresAt`.

**borrowerWallet** `string`

The borrowing wallet.

**externalReference** `string | null`

Your own case number, if given.

**schedule** `object`

The loan schedule: `ref`, `kind`, `chainId`, `network`, `marketAddress`, `lender.adminWallet`, `borrower.{wallet, payTo}`, `collateral.{token, symbol, decimals, amount, amountRaw}`, `principal.{asset, symbol, decimals}` with `amount` (`LOAN`) or `limit` (`FRAMEWORK`), `rate`, `term`, `risk`, `realization`, `fees`, `termsOfUse`, `issuedAt`, `expiresAt`, `validUntil`. The field names double as merge fields for an e-signature template.

**scheduleHash** `string`

keccak256 over the UTF-8 bytes of the canonical schedule JSON (keys sorted, no whitespace).

**scheduleFrozen** `boolean`

`false` while `REQUESTED`: the bank may still lower the figures when it issues.

**termsOfUse** `object | null`

The published terms version and hash the agreement was issued against. A change before acceptance makes it `STALE`.

**hashScheme** `string`

Always `SALTED_V1`.

**documentCommitment** `string | null`

The salted commitment of the signed contract, once reported.

**certificateCommitment** `string | null`

The salted commitment of the signing certificate, when reported.

**copyVerified** `boolean | null`

The borrower's own signed statement that its copy matched. Trusset cannot check it.

**acceptance** `string | null`

The borrower's acceptance signature.

**salt** `string`

32 bytes, once issued. Keep it with the signed file: file plus salt proves the record.

**links** `object[]`

The loans it is bound to: `{ loanId, openTxHash, matched, differences, recordedTxHash, recordedAt }`. `differences` lists `{ field, expected, actual }` where the opened loan differs from the schedule.

**remainingLimit** `string`

`FRAMEWORK` in force: the limit minus the open principal of the wallet's loans in this market.

**acceptTypedData** `object`

While `SIGNED`: the EIP-712 typed data the borrower signs. See [Acceptance](https://docs.trusset.org/endpoints/lending/loan-agreements.md#acceptance).

**viewerRole** `object`

`{ bank, borrower }` for your instance.

**nextStep** `string`

What your side does next: `ISSUE`, `REPORT_SIGNED`, `VERIFY_AND_ACCEPT`, `OPEN_LOAN`, `RECORD`, `IN_FORCE`, `DONE` and similar.

```json 200 Waiting for acceptance theme={null}
{
  "success": true,
  "data": {
    "agreement": {
      "ref": "agr_k3vx7q2mwd4h5pn6tr8a",
      "kind": "LOAN",
      "status": "SIGNED",
      "marketAddress": "0x41b9c4d5dee70a5e3682094462e5065275e728a9",
      "chainRef": {
        "network": "ETHEREUM",
        "instanceType": "DEVELOPMENT"
      },
      "borrowerWallet": "0x7c1e3a5f2b9d4e6a8c0f1b3d5e7a9c2b4d6f8e1a",
      "externalReference": "CASE-2026.11_042",
      "scheduleHash": "0x8e2c4a6f1b3d5e7a9c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d1e3a5c7f9b0d2e4a",
      "scheduleVersion": "1.0.0",
      "scheduleFrozen": true,
      "hashScheme": "SALTED_V1",
      "documentCommitment": "0x3a7f9c2e5b1d8a4f6c0e2b9d7a3f1c5e8b4d2a6f0c9e7b3d1a5f8c2e6b4d0a9f",
      "certificateCommitment": null,
      "copyVerified": null,
      "nextStep": "VERIFY_AND_ACCEPT",
      "expiresAt": "2026-12-21T16:02:11.000Z",
      "salt": "0x9f3c2a7d1e5b8c4a6f0d2e9b7c3a1f5e8d4b2c6a0e9f7d3b1c5a8e2f6d4b0c9a",
      "viewerRole": {
        "bank": false,
        "borrower": true
      },
      "links": [],
      "acceptTypedData": {
        "domain": {
          "name": "Trusset Loan Agreement",
          "version": "1",
          "chainId": 11155111
        },
        "types": {
          "LoanAgreementAcceptance": [
            {
              "name": "ref",
              "type": "string"
            },
            {
              "name": "market",
              "type": "address"
            },
            {
              "name": "borrower",
              "type": "address"
            },
            {
              "name": "kind",
              "type": "string"
            },
            {
              "name": "scheduleHash",
              "type": "bytes32"
            },
            {
              "name": "documentCommitment",
              "type": "bytes32"
            },
            {
              "name": "certificateCommitment",
              "type": "bytes32"
            },
            {
              "name": "copyVerified",
              "type": "bool"
            }
          ]
        },
        "primaryType": "LoanAgreementAcceptance",
        "message": {
          "ref": "agr_k3vx7q2mwd4h5pn6tr8a",
          "market": "0x41B9C4d5DEe70A5e3682094462E5065275E728a9",
          "borrower": "0x7c1E3A5F2b9d4e6A8C0f1b3D5e7A9c2B4D6f8E1a",
          "kind": "LOAN",
          "scheduleHash": "0x8e2c4a6f1b3d5e7a9c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d1e3a5c7f9b0d2e4a",
          "documentCommitment": "0x3a7f9c2e5b1d8a4f6c0e2b9d7a3f1c5e8b4d2a6f0c9e7b3d1a5f8c2e6b4d0a9f",
          "certificateCommitment": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "copyVerified": true
        }
      }
    },
    "marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
  },
  "error": null
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `INVALID_AGREEMENT_FILTER` | `400` | `copyVerified` is neither `true` nor `false` |
| `AGREEMENT_NOT_FOUND` | `404` | No agreement with this reference on this market, or your instance is not a party to it. List the agreements to find it |
| `MARKET_NOT_FOUND` | `404` | No market with this ID on your instance |
| `CHAIN_UNAVAILABLE`, `SERVICE_UNAVAILABLE` | `503` | The market or your instance's wallets could not be read just now. Nothing was decided. Retry shortly |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.