---
title: "Get opportunity status change report"
method: GET
path: "/report/statuses/opportunity/{org_id}/"
tags: ["reporting"]
---

# Get opportunity status change report

`GET /report/statuses/opportunity/{org_id}/`

Get an opportunity status change report.

The date range is optional. A report may be requested
for a specific time period or overall. You can specify
either a `query` or `smart_view_id` (but not both) to
filter opportunities included in the report. The
report may optionally be filtered by the opportunity
user.

The following fields are returned (when requesting an
overall report, some inapplicable fields will not be
returned):

* `status_overview`: A list of all statuses with:
    * `status_id`, `status_label`,
      `status_is_deleted`: The ID and label of the
      status, and whether it was deleted.
    * `started`: Number of opportunities in this
      status at the start of the period.
    * `ended`: Number in this status at the end.
    * `change`: Net change during the period
      (`ended` minus `started`).
    * `change_percent`: Net change in percent.
    * `gained`: Number that were not in this status
      at the beginning but were at the end.
    * `lost`: Number that were in this status at the
      beginning but were not at the end.
    * `entered`: Number that entered this status at
      some point during the period.
    * `left`: Number that left this status at some
      point during the period.
    * `_queries`: A dictionary containing search
      queries for the different states (`started`,
      `ended`, `gained`, `lost`, `entered`, `left`).
      Search queries are wrapped in a nested
      `opportunity(...)` clause. To pass the query
      to the opportunities API endpoint, use only
      the query within the parentheses.
    * `_leads_page_urls`: A dictionary containing
      paths to the lead search UI page.
    * `_opportunities_page_urls`: A dictionary
      containing paths to the opportunity UI page.
* `status_transitions`: A list of all status
  transitions (aggregated by start/end status) for
  the given period with:
    * `from_status_id`, `from_status_label`,
      `from_status_is_deleted`: Starting status
      (null for created opportunities).
    * `to_status_id`, `to_status_label`,
      `to_status_is_deleted`: Ending status.
    * `count`: The number that transitioned.
    * `_query`: The search query for those records.
    * `_leads_page_url`: Path to the search UI page.
    * `_opportunities_page_url`: Path to the
      opportunity UI page.
* `status_transitions_summary`: Status transitions
  summarized for the period. E.g. an opportunity
  that went A→B→C is counted as A→C.

## Path parameters

- `org_id` string, required

## Query parameters

- `date_start` string
- `date_end` string
- `query` string
- `smart_view_id` string
- `user_id` string

## Response `200`

Successful response

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/close/apis/close-api.md) · [All operations](https://skmtc.net/close/apis/close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/close/close-api/revisions/0dcf3303e9d7/schema)
