Bulk update order flight caps

Bulk update Order Flight caps.

Allows setting daily and lifetime impression caps for several flights at once. Input is an array of sparse flight objects with only three fields each: id, dailyImpCap, and lifetimeImpCap.

Request

POST /batch/flight

Request Body

Name Type Description Required
idNumberYes
statusString
budgetType string One of:
  • FIXED_BUDGET
  • AUTO_BUDGET
dailyBudgetstring
dailyFrontloadinteger
maxBudgetinteger
remainingBudgetinteger
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.
entityNumberNumber of order flights successfully updated

Example

Request to update caps for two flights

curl -u <user>:<password> -X POST -H "Content-Type: application/json" -d '[{"id": 12345, "dailyImpCap": 1000, "lifetimeImpCap": 5000 },{ "id": 67890, "dailyImpCap": 2000, "lifetimeImpCap": 10000 }]' https://sandbox-api.viant.com/v1/batch/flight

Any errors will be in the messages field. Flights will only be updated if they are eligible (e.g. a locked or completed flight can't be updated).

Response

{ "messages": [], "entity": 2 }
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!