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

# Reports

> Review productivity and quality for a period - lookups, decisions and decision times.

One report: how many lookups were created in a period, how they ended, what reviewers decided and how long
decisions took. It needs the `reviewer` or the `admin` role and the plan feature `feature.reports`.

## The report object

| Field | Type | Meaning |
| --- | --- | --- |
| `from`, `to` | string | The period. The last 30 days by default |
| `total_lookups` | integer | Lookups created in the period |
| `by_status`, `by_decision` | object | Lookups per status and per decision |
| `review_queue` | integer | Lookups in the review queue |
| `ai_acceptance_rate` | number or null | Decisions with `approved`, divided by all decisions of the period. `null` without decisions |
| `users` | array | Per account: lookups, batch rows, decisions of each kind, comments, average decision time |
| `daily` | array | Lookups and decisions per day |
| `kpis`, `previous` | object | Figures of the period, and of the period before |
| `markets` | array | Figures per market |
| `top_overridden` | array | Up to 10 entries about overridden codes |

## Get the productivity report

`GET /api/reports/productivity`

Needs the reviewer or the admin role.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `date_from` | string or null | No | - |
| `date_to` | string or null | No | - |

**Returns** `200` with a JSON object, as in the example.

**Errors**: `401` No valid API key was sent; `403` The role of the key, or the plan of the account, does not allow this call; `422` The request is not valid; `500` An unexpected failure.

**Example request**

```bash
curl "https://htspilot.com/api/reports/productivity" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
```

**Example response** `200`

```json
{
  "from": "2026-09-05",
  "to": "2026-10-04",
  "total_lookups": 8,
  "by_status": {
    "needs_info": 1,
    "proposed": 7
  },
  "by_decision": {
    "approved": 1
  },
  "review_queue": 1,
  "ai_acceptance_rate": 1,
  "users": [
    {
      "user_id": "a7ba4a2440c7422fb695a1fd80d65ce5",
      "name": "Administrator",
      "role": "Admin",
      "lookups": 3,
      "batch_rows": 4,
      "approved": 1,
      "overridden": 0,
      "rejected": 0,
      "comments": 0,
      "avg_decision_hours": 0,
      "median_decision_hours": 0,
      "decisions": 1
    },
    {
      "user_id": "4363f5a21c0c4faf929abadcb1f82806",
      "name": "Data Entry Clerk",
      "role": "User",
      "lookups": 1,
      "batch_rows": 0,
      "approved": 0,
      "overridden": 0,
      "rejected": 0,
      "comments": 0,
      "avg_decision_hours": null,
      "median_decision_hours": null,
      "decisions": 0
    }
  ],
  "daily": [
    {
      "day": "2026-10-03",
      "count": 8,
      "auto_proposed": 7,
      "routed_to_review": 1,
      "decisions": 1
    }
  ],
  "kpis": {
    "lookups": 8,
    "auto_proposed": 7,
    "routed_to_review": 1,
    "errors": 0,
    "auto_rate": 0.875,
    "decisions": 1,
    "approved": 1,
    "overridden": 0,
    "rejected": 0,
    "approval_rate": 1,
    "override_rate": 0,
    "reject_rate": 0,
    "median_decision_hours": 0
  },
  "previous": {
    "from": "2026-08-06",
    "to": "2026-09-04",
    "lookups": 0,
    "auto_proposed": 0,
    "routed_to_review": 0,
    "errors": 0,
    "auto_rate": null,
    "decisions": 0,
    "approved": 0,
    "overridden": 0,
    "rejected": 0,
    "approval_rate": null,
    "override_rate": null,
    "reject_rate": null,
    "median_decision_hours": null
  },
  "markets": [
    {
      "market": "US",
      "lookups": 8,
      "auto_proposed": 7,
      "routed_to_review": 1,
      "errors": 0,
      "approved": 1,
      "overridden": 0,
      "rejected": 0,
      "decisions": 1,
      "approval_rate": 1
    }
  ],
  "top_overridden": []
}
```

Try it: https://docs.htspilot.com/explorer/#/Reports/getProductivityReport
