# Lender analytics

The submission analytics narrowed to ONE entry on this workspace's Lenders board: how many crossings were sent to that lender in the window, its approval and decline rates, how long it takes to answer, and its average offer. The id is the lender's row id on the Lenders board; another workspace's id is a 404. Use it to compare one lender against the workspace's overall figures.

Access class: `workspace`.

## Endpoint

`GET /v1/lenders/{id}/analytics`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |
| body | query | null | No |
| params | query | object | No |
| query | query | object | No |

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "byLender": [
      {
        "counts": "string",
        "lenderName": "string",
        "lenderRowId": "",
        "rates": "string"
      }
    ],
    "counts": {
      "approved": 1,
      "decided": 1,
      "declined": 1,
      "offers": 1,
      "pending": 1,
      "sent": 1,
      "underReview": 1,
      "withdrawn": 1
    },
    "lenderName": "string",
    "lenderRowId": "",
    "rates": {
      "approvalRate": 1.5,
      "avgHoursToDecision": 1.5,
      "avgHoursToResponse": 1.5,
      "avgOfferMinor": 1,
      "declineRate": 1.5
    },
    "since": "string",
    "window": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
