Create or update a campaign flight - DEPREACATED

Set the id of the Campaign Flight to null to create a new flight. Set the id with the flight configuration to update a flight.

Note

  1. The new Campaign Flight’s Start Date must begin after the current time.
  2. A Campaign Flight’s Start Date and End Date cannot overlap with another Campaign Flight’s Start Date and End Date within the given Campaign.

Request

POST campaignflight/byCampaign/<campaign id>

Example

Request to Create a Campaign Flight

curl -X POST -H "Content-Type: application/json" -u <user>:<password> -d '[
   {
      "id": null,
      "status": null,
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 23.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1633046400000,
      "endDate": 1635724740000
   }
]

Response

{
  "messages": [],
  "entity": [
    {
      "id": 10146,
      "status": "ACTIVE",
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 70.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1631836800000,
      "endDate": 1633046340000
    },
    {
      "id": 10148,
      "status": "PENDING",
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 23.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1633046400000,
      "endDate": 1635724740000
    }
  ]
}

Request to Update a Campaign Flight

curl -X POST -H "Content-Type: application/json" -u <user>:<password> -d '[
    {
      "id": 10146,
      "status": "ACTIVE",
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 90.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1631836800000,
      "endDate": 1633046340000
    }
  ]
' https://sandbox-api.viant.com/v1/campaignflight/byCampaign/307908

Response

{
  "messages": [],
  "entity": [
    {
      "id": 10146,
      "status": "ACTIVE",
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 90.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1631836800000,
      "endDate": 1633046340000
    },
    {
      "id": 10148,
      "status": "PENDING",
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": null,
      "dailyFrontload": 0.0,
      "maxBudget": 23.0,
      "remainingBudget": null,
      "dailyImpCap": null,
      "lifetimeImpCap": null,
      "startDate": 1633046400000,
      "endDate": 1635724740000
    }
  ]
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!