Create Order Flights by Ad Order ID - DEPRECATED

Creates new Order Flights for a given Ad Order. Notes: The new Order Flight’s Start Date must begin after the current time. An Order Flight’s Start Date and End Date cannot overlap with another Order Flight’s Start Date and End Date within the given Ad Order.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request

POST /flight/byAdOrder/<ad order id>

Request Body

Name Type Description Required
budgetType string One of:
  • FIXED_BUDGET
  • AUTO_BUDGET
dailyBudgetstring
dailyFrontloadinteger
maxBudgetinteger
dailyImpCapinteger
lifetimeImpCapinteger
startDateinteger
endDateinteger

Response

JSON Fields Type Description
messagesObject ArrayAn array of any error messages.
messages[].levelStringError level.
messages[].codeStringError code.
messages[].messageStringError message.
entityObject ArrayAn array of Order Flight objects.
entity[].idNumberOrder Flight ID
entity[].startDateNumberStart date of the Order Flight, passed as Unix time in milliseconds.
entity[].endDateNumberEnd date of the Order Flight, passed as Unix time in milliseconds.
entity[].budgetTypeStringFIXED_BUDGET or AUTO_BUDGET
entity[].dailyBudgetNumber
entity[].dailyFrontloadNumber
entity[].dailyImpCapNumber
entity[].lifetimeImpCapNumber
entity[].maxBudgetNumberThe total budget for the order flight in USD.

Example

Request

curl -X POST -H "Content-Type: application/json" -u <user>:<password> -d '[
    {
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": 100,
      "dailyFrontload": 3,
      "maxBudget": 5003,
      "dailyImpCap": 3,
      "lifetimeImpCap": null,
      "startDate": 1517529600000,
      "endDate": 1521175792000
    }
  ]' https://sandbox-api.viant.com/v1/flight/createByAdOrder/468674

Response

{
  "messages": [],
  "entity": [
    {
      "id": 131135,
      "budgetType": "AUTO_BUDGET",
      "dailyBudget": 100,
      "dailyFrontload": 3,
      "maxBudget": 5003,
      "remainingBudget": null,
      "dailyImpCap": 3,
      "lifetimeImpCap": null,
      "startDate": 1517529600000,
      "endDate": 1521175792000
    }
  ]
}
Path Params
integer
required

Ad Order ID

Body Params
string
enum
required
Allowed:
int32

The daily budget limit in USD.
Optional. Only applicable when the campaign's budget type is MONETARY.

int32
required
int32

The maximum budget for the order flight in USD.
Required if the campaign's budget type is MONETARY.
Not applicable if the campaign's budget type is IMPRESSIONS.

int32

The daily impressions cap.
Optional. Only applicable when the campaign's budget type is IMPRESSIONS.

int32

The total lifetime impressions cap for the order flight.
Required if the campaign's budget type is IMPRESSIONS.
Not applicable if the campaign's budget type is MONETARY.

int64
required
int64
required
Responses

401

Unauthorized

403

Forbidden

404

Not Found

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json