post
https://sandbox-api.viantinc.com/{basePath}/campaignflightcaps/byAdOrder/
Set the id of the FlightCaps to null to add a new cap. Only the caps you specify will be modified.To remove caps, use the delete endpoint.
Example
Request to Create Campaign Flight Order Caps
curl -X POST -H "Content-Type: application/json" -u <user>:<password> -d '[
{
"id": null,
"orderId": 1578710,
"flightId": 10149,
"maxBudget": 10.0,
"dailyBudget": 2.0,
"lifetimeImpressions": null,
"dailyImpressions": null
}
]
' https://sandbox-api.viant.com/v1/campaignflightcaps/byAdOrder/1578710
Response
{
"messages": [],
"entity": [
{
"id": 245,
"orderId": 1578710,
"flightId": 10146,
"maxBudget": 12.0,
"dailyBudget": 1.0,
"lifetimeImpressions": null,
"dailyImpressions": null
},
{
"id": 248,
"orderId": 1578710,
"flightId": 10149,
"maxBudget": 10.0,
"dailyBudget": 2.0,
"lifetimeImpressions": null,
"dailyImpressions": null
}
]
}
Request to Update Campaign Flight Order Caps
Only the caps you specify will be modified. To remove caps, use the delete endpoint.
curl -X POST -H "Content-Type: application/json" -u <user>:<password> -d '[
{
"id": 248,
"orderId": 1578710,
"flightId": 10149,
"maxBudget": 20.0,
"dailyBudget": 4.0,
"lifetimeImpressions": null,
"dailyImpressions": null
}
]
' https://sandbox-api.viant.com/v1/campaignflightcaps/byAdOrder/1578710
Response
{
"messages": [],
"entity": [
{
"id": 245,
"orderId": 1578710,
"flightId": 10146,
"maxBudget": 12.0,
"dailyBudget": 1.0,
"lifetimeImpressions": null,
"dailyImpressions": null
},
{
"id": 248,
"orderId": 1578710,
"flightId": 10149,
"maxBudget": 20.0,
"dailyBudget": 4.0,
"lifetimeImpressions": null,
"dailyImpressions": null
}
]
}