# Submission analytics

Approval rate, decline rate, average hours to a lender's decision and average offer over a window, counted per submission-to-lender crossing, with a breakdown row per lender. Rates are absent (null) rather than zero when nothing was decided in the window. Pass window=30d|90d|180d|365d. Use it to answer how submissions are going and which lenders answer fastest or say yes most.

Access class: `workspace`.

## Endpoint

`GET /v1/submissions/analytics`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| 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": [
      "string"
    ],
    "counts": {
      "approved": 1.5,
      "decided": 1.5,
      "declined": 1.5,
      "offers": 1.5,
      "pending": 1.5,
      "sent": 1.5,
      "underReview": 1.5,
      "withdrawn": 1.5
    },
    "rates": {},
    "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"
}
```
