> ## 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 Approvals

> Read whether a market runs approve-only loans

Returns the market's [approve-only loans](https://docs.trusset.org/endpoints/lending/loan-approvals.md) mode: whether the switch exists on this market and network, whether it is on, and what your instance may do.

## Path Parameters

**marketId** `string` *required*

The market's record ID on your instance.

## Response Fields

**data.mode** `object`

**supported** `boolean`

`false` means the market runs an implementation from before this feature. Its admin has to upgrade it through the seven-day notice first.

**available** `boolean`

`false` means the network does not carry the approvals factory yet.

**enabled** `boolean`

Whether the market requires the lender of record's approval for every draw.

**requested** `boolean`

`true` means the market's creator asked for approve-only loans at deployment and the lender of record has not switched them on yet.

**approvals** `string | null`

The approvals contract the market names, or `null`.

**canonical** `boolean | null`

`false` means the market names an approvals contract that the Trusset approvals factory did not build. Loan requests, approvals and revokes are not available for such a contract. Open Loan and Borrow More still read it when they can.

**upgradeRequired** `boolean`

Whether the market has to be upgraded before approve-only loans can be switched on.

**approverRole** `string`

The `LOAN_APPROVER_ROLE` identifier: keccak256 of `LOAN_APPROVER_ROLE`. Grant it with the market's own `grantRole`.

**maxValidHours** `number`

The longest an approval made through the API stays valid, in hours.

**viewer** `object | null`

`{ isBank, isAdmin, approverWallets }` for your instance, or `null`.

```json 200 Switched on theme={null}
{
  "success": true,
  "data": {
    "mode": {
      "supported": true,
      "available": true,
      "enabled": true,
      "requested": false,
      "approvals": "0x5d2e8c1a7f4b3960e2d1c8a7b6f5e4d3c2b1a098",
      "canonical": true,
      "upgradeRequired": false,
      "approverRole": "0x46f54e51673dd785402ec1df75a85f2b1da1abc02695cc95d95578f830f58153",
      "maxValidHours": 696,
      "viewer": {
        "isBank": true,
        "isAdmin": true,
        "approverWallets": [
          "0x7712db30a7b4ffd9c445793089118b60e56d752a"
        ]
      }
    },
    "marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
  },
  "error": null
}
```

```json 200 Requested at deployment theme={null}
{
  "success": true,
  "data": {
    "mode": {
      "supported": true,
      "available": true,
      "enabled": false,
      "requested": true,
      "approvals": null,
      "canonical": null,
      "upgradeRequired": false,
      "approverRole": "0x46f54e51673dd785402ec1df75a85f2b1da1abc02695cc95d95578f830f58153",
      "maxValidHours": 696,
      "viewer": {
        "isBank": true,
        "isAdmin": true,
        "approverWallets": [
          "0x7712db30a7b4ffd9c445793089118b60e56d752a"
        ]
      }
    },
    "marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
  },
  "error": null
}
```


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