Deprecated Forecast Requests

Warning: Deprecated request.
This page gives an example of using the Forecast API endpoint for getting a finished forecast report based on forecast ID.
Note: This request applies only to campaign forecasts.

Get a Finished Forecast Report

Method GET
URL https://api.videoplaza.com/api/2.0/forecast/report/{id}
Header Authentication header (x-o-api-key)
Content type application/json
URL params ID of the campaign forecast report
Query params exclude-competing-goals: set to true to exclude any competing goals from the campaign forecast report. By default, competing goals are included in the campaign forecast report.
Body -
Success response

HTTP status: 200 OK

Header: -

Body: FeasibilityForecastResultBean

Example:

Request header:

GET /api/2.0/forecast/report/bc0e1f07-c04f-4060-9c33-4ffc0d8d0390 HTTP/1.1
Host: api.videoplaza.com
Content-type: application/json
x-o-api-key="<your key>"

Request body: NA

Success response:

HTTP status:
    200 (OK)   

Body:
{
    "campaign": {
        "advertiser": null,
        "agency": null,
        "brand": null,
        "name": "Campaign Test",
        "customId": null,
        "frontload": null,
        "priority": 5,
        "targeting": {
            "targetingTemplates": [
                "053a4218-87c1-491d-83ac-6136abf0a866"
            ],
            "targetingRules": {
                "locationRules": [
                    {
                        "locationId": "752",
                        "locationType": "COUNTRY",
                        "locationName": "sweden",
                        "access": "ALLOW"
                    }
                ],
                "tagAndPartnerRules": [
                    {
                        "resourceType": "TAG",
                        "ruleType": "NONE_OF",
                        "tag": "violence"
                    }
                ],
                "categoryRules": [
                    {
                        "categoryId": "df5480fd-ca38-43c8-a44c-4240965e2023",
                        "categoryName": "Sport",
                        "ruleType": "AT_LEAST_ONE_OF"
                    }
                ],
                "ipRules": [],
                "userAgentRules": [],
                "timeRules": [],
                "frequencyRules": [
                    {
                        "impressions": 2,
                        "timeUnit": "DAY"
                    }
                ],
                "audienceRules": {
                    "7915b4ad-0572-4d88-bcf9-7f0813c953b3": [
                        {
                            "segmentId": "7915b4ad-0572-4d88-bcf9-7f0813c953b3[0]=1",
                            "segmentName": "Gender:Male",
                            "ruleType": "ALL_OF"
                        },
                        {
                            "segmentId": "7915b4ad-0572-4d88-bcf9-7f0813c953b3[1]=3",
                            "segmentName": "Age:21-29",
                            "ruleType": "ALL_OF"
                        }
                    ]
                }
            },
            "parentOverrides": {
                "contentRules": true,
                "tagAndPartnerRules": true,
                "frequencyRules": true,
                "locationRules": true,
                "audienceRules": true
            }
        },
        "goals": [
            {
                "customId": null,
                "name": "Test Goal",
                "startDate": 1498687200000,
                "endDate": 1499896799000,
                "priority": null,
                "frontload": null,
                "targeting": null,
                "variant": "NORMAL",
                "positionRestriction": "ANY",
                "deliveryGoal": {
                    "value": 100000,
                    "type": "IMPRESSION"
                },
                "ads": [
                    {
                        "name": "Ad 1",
                        "customId": null,
                        "format": "preroll_standard",
                        "deviceContainers": [
                            "6b79564c-8a8c-102f-9f01-001e4f3cd645",
                            "86d28d24-d025-4633-a081-bea93de04dc3",
                            "5aa5bfe0-985c-4144-9ab1-9f723ba81abf"
                        ],
                        "startDate": null,
                        "endDate": null
                    },
                    {
                        "name": "Ad 2",
                        "customId": null,
                        "format": "midroll_standard",
                        "deviceContainers": [
                            "6b79564c-8a8c-102f-9f01-001e4f3cd645",
                            "86d28d24-d025-4633-a081-bea93de04dc3",
                            "5aa5bfe0-985c-4144-9ab1-9f723ba81abf"
                        ],
                        "startDate": null,
                        "endDate": null
                    }
                ],
                "sequence": null,
                "dailyCap": null
            }
        ]
    },
    "forecasts": {
        "Test Goal": {
            "deliveryGoal": {
                "value": 100000,
                "type": "IMPRESSION"
            },
            "customId": null,
            "name": "Campaign Test",
            "forecastedDelivery": 0,
            "accessibleInventory": 0,
            "deliveryMargin": 0
        }
    },
    "unusedInventory": 0,
    "unusedInventoryByDay": {
        "2017-07-09T22:00:00.000+0000": 0,
        "2017-06-29T22:00:00.000+0000": 0,
        "2017-07-04T22:00:00.000+0000": 0,
        "2017-07-03T22:00:00.000+0000": 0,
        "2017-07-08T22:00:00.000+0000": 0,
        "2017-06-28T22:00:00.000+0000": 0,
        "2017-07-02T22:00:00.000+0000": 0,
        "2017-07-07T22:00:00.000+0000": 0,
        "2017-07-01T22:00:00.000+0000": 0,
        "2017-07-06T22:00:00.000+0000": 0,
        "2017-07-11T22:00:00.000+0000": 0,
        "2017-06-30T22:00:00.000+0000": 0,
        "2017-07-05T22:00:00.000+0000": 0,
        "2017-07-10T22:00:00.000+0000": 0
    },
    "maximumDelivery": 0,
    "maximumDeliveryByDay": {
        "2017-07-09T22:00:00.000+0000": 0,
        "2017-06-29T22:00:00.000+0000": 0,
        "2017-07-04T22:00:00.000+0000": 0,
        "2017-07-03T22:00:00.000+0000": 0,
        "2017-07-08T22:00:00.000+0000": 0,
        "2017-06-28T22:00:00.000+0000": 0,
        "2017-07-02T22:00:00.000+0000": 0,
        "2017-07-07T22:00:00.000+0000": 0,
        "2017-07-01T22:00:00.000+0000": 0,
        "2017-07-06T22:00:00.000+0000": 0,
        "2017-07-11T22:00:00.000+0000": 0,
        "2017-06-30T22:00:00.000+0000": 0,
        "2017-07-05T22:00:00.000+0000": 0,
        "2017-07-10T22:00:00.000+0000": 0
    },
    "competingGoals": {
        "impactedBy": []
    },
    "name": "Campaign Test",
    "jobId": "bc0e1f07-c04f-4060-9c33-4ffc0d8d0390"
}

Was this article helpful?