---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.6
alternate:
  - https://docs.routeq.com/doc/en/delivery/functions/working-with-plan-fact.md
title: RouteQ — functions — plan/fact reports
---
> **Documentation Index:** Fetch the complete configuration index at https://docs.routeq.com/doc/en/llms.txt


# Plan / Fact reports

**Plan / Fact** reports are used to analyze planning accuracy and get an overview of your actual performance indicators.

The analysis includes all planning and routes for all company depots that have been loaded in Track & Trace. In the reports, planned indicators are compared with actual data on already completed routes.

{% include [reports](../_includes/reports-9b2913227da3.md) %}

The data for the **Plan / Fact** report is generated daily at 00:00 GMT+3. If a route was completed after midnight, the current data for it will be included in the report only the next day.

## Upload a plan to Track & Trace {#add-plan}

To perform a comparative analysis of planned and actual indicators, send the solution from [Planning](https://docs.routeq.com/doc/en/vrp/quickstart.md) to Track & Trace. Otherwise, the report will only contain the actual indicators.

Reports don't take into account that the route may have been edited by a manager in Routing Workspace or by the courier in the Yandex Courier app.

The plan is uploaded to Track & Trace based on how the company interacts with the service.

**Via Routing Workspace**

: The plan is saved when the route is exported to Track & Trace:

  1. Plan the route using the [Planning](https://docs.routeq.com/doc/en/vrp/quickstart.md) service.
  2. Click **Export**.
  3. In the **Export solution** window, select **Track & Trace**.

**Via the API**

: Send a request to the [route-plans](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsPlan) resource. Provide information about the route and orders in the request.

  {% note warning %}

  The route with the number specified in the request must already exist in the company.

  {% endnote %}

  {% list tabs %}

  - Windows

    **Request**

    cURL

    ```
    curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d @<File_path_in_UTF-8_encoding> -i https://courier.yandex.ru/api/v1/companies/<your-company-id>/route-plans
    ```

    File

    ```json
    [
      {
        "number":"101-2_2017-10-23",
        "nodes":[
          {
            "type":"depot",
            "arrival_time_s":25200,
            "transit_distance_m":0,
            "value":{
              "number":"0",
              "point":{
                "lat":55.799087,
                "lon":37.729377
              },
              "service_duration_s":200
            }
          },
          {
            "type":"order",
            "arrival_time_s":57526,
            "departure_time_s":57526,
            "transit_distance_m":8723,
            "used_time_window":"10:00-12:00",
            "value":{
              "number":"126",
              "point":{
                "lat":55.826326,
                "lon":37.637686
              },
              "service_duration_s":0
            }
          },
          {
            "type":"order",
            "arrival_time_s":57546,
            "departure_time_s":57546,
            "transit_distance_m":87423,
            "used_time_window":"10:00-12:00",
            "value":{
              "number":"2345",
              "address":"Address",
              "point":{
                "lat":55.826426,
                "lon":37.647686
              },
              "service_duration_s":0,
              "shared_service_duration_s":0,
              "multi_order":false,
              "customer_name":"Name",
              "shipment_size":{
                "volume_cbm":1.2,
                "weight_kg":5.1,
                "amount":4.5
              }
            }
          }
        ]
      }
    ]

    ```

    **Result**

    A response with the status code `200` means that your plan has successfully been uploaded to the server.

  - MacOS/Linux

    **Request**

    cURL

    ```
    curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d [{"number":"101-2_2017-10-23","nodes":[{"type":"depot","arrival_time_s":25200,"transit_distance_m":0,"value":{"number":"0","point":{"lat":55.799087,"lon":37.729377},"service_duration_s":200}},{"type":"order","arrival_time_s":57526,"departure_time_s":57526,"transit_distance_m":8723,"used_time_window":"10:00-12:00","value":{"number":"126","point":{"lat":55.826326,"lon":37.637686},"service_duration_s":0}},{"type":"order","arrival_time_s":57546,"departure_time_s":57546,"transit_distance_m":87423,"used_time_window":"10:00-12:00","value":{"number":"2345","address":"Address","point":{"lat":55.826426,"lon":37.647686},"service_duration_s":0,"shared_service_duration_s":0,"multi_order":false,"customer_name":"Name","shipment_size":{"volume_cbm":1.2,"weight_kg":5.1,"amount":4.5}}}]}] -i https://courier.yandex.ru/api/v1/companies/<your-company-id>/route-plans
    ```

    **Result**

    A response with the status code `200` means that your plan has successfully been uploaded to the server.

  {% endlist %}

## Build a report {#report}

**In Routing Workspace interface**

  1. Go to **Reports** → **Plan/Fact**.
  1. Click **Large report in Excel**.
  1. Click **Select date range** to set a time frame for planned and completed routes to be analyzed.

      You can select a period from the list (**Yesterday**, **7 days**, **30 days**, **Last month**) or set your own period. The maximum period duration is 60 days.

      {% note info %}

      The current day can't be included in the report, even if the routes that you're interested in have already been completed.

      {% endnote %}

  1. Click **Prepare**.
  
      After you select the period, the ![](../_images/loading.png) icon appears in the upper-right corner. This means that the report is being prepared. You can continue working anywhere in Routing Workspace interface.

**Via the API**

: Send a request to the [route-plan-info](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsRoutePlanInfo) resource.

  **Request**

  cURL

  ```
  curl -H "Authorization: OAuth <your-token>" -X GET https://courier.yandex.ru/api/v1/companies/<your-company-id>/route-plan-info
  ```

  **Result**

  ```json
  [
    {
      "id": 17872948,
      "number": "0-1-2025-03-13",
      "date": "2025-02-08",
      "plan_metrics": {
        "orders_count": 2,
        "total_transit_distance_m": 10534,
        "total_duration": {
          "value": 2882,
          "text": "0:48:02"
        }
      }
    },
    {
      "id": 18508527,
      "number": "1-1-2025-04-02",
      "date": "2025-02-12",
      "plan_metrics": {
        "orders_count": 4,
        "total_transit_distance_m": 98554,
        "total_duration": {
          "value": 10886,
          "text": "3:01:26"
        }
      }
    },
    {
      "id": 18280581,
      "number": "2-1-2025-03-13",
      "date": "2025-03-11",
      "plan_metrics": {
      "orders_count": 2,
      "total_transit_distance_m": 43246,
      "total_duration": {
          "value": 31546,
          "text": "8:45:46.358154"
        }
      }
    }
  ]
  ```

  To get a route report for a specific period, use the `start_date` and `end_date` parameters. The date range is inclusive.
  
  **Example**

  Get a route report for March 12 and 13, 2025.
  ```
  curl -H "Authorization: OAuth <your-token>" -X GET https://courier.yandex.ru/api/v1/companies/<your-company-id>/route-plan-info?start_date=2025-03-12&end_date=2025-03-13
  ```

  For more information about the request parameters, see the [route-plan-info](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/getsRoutePlanInfo) documentation.

## Download the report {#download}

{% include [download-download-report](../_includes/download-report-ff4819b3a2bb.md) %}


{% include [warehouse-feedback](../_includes/feedback-7b71896f9bc3.md) %}
