---
title: "Get a backtest's status and summary"
method: GET
path: "/api/policy_version/{version}/backtest/{heron_id}"
tags: ["Policy Backtests"]
---

# Get a backtest's status and summary

`GET /api/policy_version/{version}/backtest/{heron_id}`

## Request

- Base URL: `https://app.herondata.io`
- URL: `https://app.herondata.io/api/policy_version/{version}/backtest/{heron_id}`
- Auth: API key in header `x-api-key`

Poll a run. `recorded_deal_count` against `deal_count` is its progress, `result_counts` holds every evaluation_result bucket, and `changed_checks` names the checks behind the deals that moved. A failed run carries the reason in `error`.

## Path parameters

- `version` integer, required
- `heron_id` string, required

## Response `200`

OK

- object
  - `backtest` BacktestSchema
    - `baseline_mode` 'active' | 'as_evaluated'
    - `baseline_version` integer: Version number the run compared against
    - `candidate_version` integer: Version number the run tested
    - `created` string, date-time
    - `deal_count` integer, nullable: Deals the run claimed at setup
    - `deal_set_params` DealSetParams
      - `check_filter` DealSetCheckFilter
        - `check_identity` string
        - `result` string
        - `section_heron_id` string
      - `end_user_heron_ids` string[]
      - `limit` integer
      - `source_filter` DealSetSourceFilter
        - `names` string[]
        - `sender_addresses` string[]
        - `sender_domains` string[]
      - `window_end` string: ISO 8601, exclusive
      - `window_start` string: ISO 8601, inclusive
      - `with_policy_result` string[], nullable
    - `description` string, nullable
    - `error` string, nullable: Why the run failed, null unless it did
    - `finished_at` string, date-time, nullable
    - `heron_id` string
    - `skipped_end_user_heron_ids` SkippedDeal[]
      - `end_user_heron_id` string
      - `reason` 'not_found' | 'not_backtestable_status'
    - `stale` boolean: The version has been edited since this run was asked for
    - `started_at` string, date-time, nullable
    - `status` 'pending' | 'running' | 'complete' | 'failed'
    - `summary` BacktestSummary
      - `changed_checks` BacktestCheckChange[]: Checks behind the deals whose outcome changed, most-affected first; empty until the run finishes
        - `check_identity` string: What the check reads, which is how it is named
        - `check_name` string, nullable
        - `deal_count` integer: Deals whose outcome changed with this check moving
        - `section_name` string
      - `crm_queue_pairs` BacktestCrmQueuePair[]: Deals per (baseline, candidate) CRM queue pair, most first
        - `baseline` CrmQueueStatus
          - `crm_integration_heron_id` string
          - `status_id` string, nullable: The status the sync step sends, which the CRM may not apply (e.g. under a priority order)
          - `status_name` string, nullable
        - `candidate` CrmQueueStatus
          - `crm_integration_heron_id` string
          - `status_id` string, nullable: The status the sync step sends, which the CRM may not apply (e.g. under a priority order)
          - `status_name` string, nullable
        - `deal_count` integer
      - `crm_queue_result_counts` object: Deals per crm_queue_result, every bucket present even at zero
      - `recorded_deal_count` integer: Deals recorded so far; against deal_count this is the progress
      - `result_counts` object: Deals per evaluation_result, every bucket present even at zero
    - `triggered_by` string

## Other responses

- `404`: Policy version or backtest not found

## Changes

- **2026-11-03** `bd8008e49534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/herondata/apis/heron-data-api/changes/api/policy_version/:version/backtest/:heron_id/get.md)

---

[API](https://skmtc.dev/herondata/apis/heron-data-api.md) - [All operations](https://skmtc.dev/herondata/apis/heron-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/herondata/apis/heron-data-api/revisions/1ec936e17fef?raw)
