# Deal Forecast

<mark style="color:green;">`POST`</mark> `/v3/api`

Use this method to get your deal forecast reporting data. This table contains both actual delivery data and forecasted data, distinguished by the `datatype` field.

> **Note:** When `creative_id` or `creative_name` is selected as a dimension, `requests_total` and `requests_played` will always return 0. This is because requests are logged before a creative is selected, so they have no creative associated.

#### **Headers**

| Name          | Value           |
| ------------- | --------------- |
| Authorization | `Basic <token>` |

#### Body

{% tabs %}
{% tab title="By day" %}

```typescript
{
    table: "deal_forecast",
    startDate: string, // (format: YYYY-MM-DDThh:mm:ss)
    endDate: string, // (format: YYYY-MM-DDThh:mm:ss)
    fields: [
      { name: "timestamp", as?: string },
      { name: "dealid", as?: string },
      { name: "ssp", as?: string },
      { name: "datatype", as?: string },
      { name: "expired", as?: string },
      { name: "line_item_id", as?: string },
      { name: "line_item_name", as?: string },
      { name: "split_id", as?: string },
      { name: "split_name", as?: string },
      { name: "creative_id", as?: string },
      { name: "creative_name", as?: string },
      { name: "order_id", as?: string },
      { name: "order_name", as?: string },
      { name: "advertiser_id", as?: string },
      { name: "advertiser_name", as?: string },
      { name: "start_date", as?: string },
      { name: "end_date", as?: string }
    ],
    metrics: [
      { name: "requests_total", as?: string },
      { name: "requests_played", as?: string },
      { name: "responses", as?: string },
      { name: "impressions", as?: string },
      { name: "clicks", as?: string },
      { name: "views", as?: string },
      { name: "revenue_net_eur", as?: string },
      { name: "revenue_net_usd", as?: string },
      { name: "revenue_gross_eur", as?: string },
      { name: "revenue_gross_usd", as?: string },
      { name: "booked_revenue_eur", as?: string },
      { name: "booked_revenue_usd", as?: string },
      { name: "impressions_goal", as?: string },
      { name: "clicks_goal", as?: string }
    ],
    timeSplit: "day"
  }
```

{% endtab %}

{% tab title="By hour" %}

```typescript
{
    table: "deal_forecast",
    startDate: string, // (format: YYYY-MM-DDThh:mm:ss)
    endDate: string, // (format: YYYY-MM-DDThh:mm:ss)
    fields: [
      { name: "timestamp", as?: string },
      { name: "dealid", as?: string },
      { name: "ssp", as?: string },
      { name: "datatype", as?: string },
      { name: "expired", as?: string },
      { name: "line_item_id", as?: string },
      { name: "line_item_name", as?: string },
      { name: "split_id", as?: string },
      { name: "split_name", as?: string },
      { name: "creative_id", as?: string },
      { name: "creative_name", as?: string },
      { name: "order_id", as?: string },
      { name: "order_name", as?: string },
      { name: "advertiser_id", as?: string },
      { name: "advertiser_name", as?: string },
      { name: "start_date", as?: string },
      { name: "end_date", as?: string }
    ],
    metrics: [
      { name: "requests_total", as?: string },
      { name: "requests_played", as?: string },
      { name: "responses", as?: string },
      { name: "impressions", as?: string },
      { name: "clicks", as?: string },
      { name: "views", as?: string },
      { name: "revenue_net_eur", as?: string },
      { name: "revenue_net_usd", as?: string },
      { name: "revenue_gross_eur", as?: string },
      { name: "revenue_gross_usd", as?: string },
      { name: "booked_revenue_eur", as?: string },
      { name: "booked_revenue_usd", as?: string },
      { name: "impressions_goal", as?: string },
      { name: "clicks_goal", as?: string }
    ],
    timeSplit: "hour"
  }
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="200 Valid Request" %}

```json
[
    {
      "timestamp": "2026-04-02T00:00:00.000Z",
      "dealid": "DEAL-12345",
      "ssp": "dsp",
      "datatype": "ACTUAL",
      "expired": false,
      "line_item_id": "10000",
      "line_item_name": "Test Banner",
      "split_id": null,
      "split_name": null,
      "creative_id": null,
      "creative_name": null,
      "order_id": "1000",
      "order_name": "Test Order",
      "advertiser_id": "1000",
      "advertiser_name": "Test Advertiser",
      "start_date": "2024-02-05",
      "end_date": "2030-01-01",
      "requests_total": 82,
      "requests_played": 41,
      "responses": 39,
      "impressions": 41,
      "clicks": 0,
      "views": 31,
      "revenue_net_eur": 0.1062742,
      "revenue_net_usd": 0.123,
      "revenue_gross_eur": 0.1062742,
      "revenue_gross_usd": 0.123,
      "booked_revenue_eur": 0,
      "booked_revenue_usd": 0,
      "impressions_goal": 0,
      "clicks_goal": 0
    }
  ]
```

{% endtab %}

{% tab title="401 Unauthorized" %}
Unauthorized
{% endtab %}

{% tab title="400 Bad Request " %}

```json
[
    {
        "message": "'unvalid_name' must be equal to one of the allowed values for table 'deal_forecast'",
        "params": {
            "allowedValues": [
                "timestamp",
                "dealid",
                "ssp",
                "datatype",
                "expired",
                "line_item_id",
                "line_item_name",
                "split_id",
                "split_name",
                "creative_id",
                "creative_name",
                "order_id",
                "order_name",
                "advertiser_id",
                "advertiser_name",
                "start_date",
                "end_date"
            ]
        }
    }
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nexx360.io/platform-apis/reporting-api/reporting-v3/deal-forecast.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
