API Endpoints
Campaign

/external/v1/advertisers/{advertiserId}/campaigns/{campaignId}

PUT

Updates attributes of a campaign.

A campaign can only target sites under same publisher and market, otherwise it returns BAD REQUEST response code. The eligible values for targetingSiteIds can be retrieved from API endpoint GET /external/v1/advertisers/{advertiserId}/eligible-campaign-targets.

A campaign can only target ad grid locations under sites with same publisher and market, otherwise it returns BAD REQUEST response code. The eligible values for targetingAdGridLocations can be retrieved from API endpoint GET /external/v1/advertisers/{advertiserId}/eligible-campaign-targets.

Rules:

  • Campaign name should be unique under an advertiser.
  • startDate should be before endDate.
  • startDate should be present or future date.
  • startDate can be modified only if current start date is a future date.
  • hasEndDate should be false in order to drop the endDate.
  • budget should always be greater than equal to budgetSpent.
  • dailyBudget should always be less than or equal to budget.
  • dailyBudget should always be less than or equal to monthBudget.
  • dailyBudget should always be less than or equal to weeklyBudget.
  • weeklyBudget should always be less than or equal to budget.
  • weeklyBudget should always be less than or equal to monthBudget.
  • monthlyBudget should always be less than or equal to budget.
Path Parameters
advertiserId
*
campaignId
*
Query Parameters
dropDailyBudget
dropWeeklyBudget
dropMonthlyBudget
Body Parameters
body
*
name
*
startDate
*
endDate
budget
*
dailyBudget
weeklyBudget
monthlyBudget
advertised
defaultBid
targetingSiteIds
targetingAdGridLocations
hasEndDate
Responses
200
OK
id
name
publishers
status
advertised
startDate
endDate
budget
budgetSpent
dailyBudget
dailyBudgetSpent
weeklyBudget
monthlyBudget
targeting
defaultBid
archived
createdAt
modifiedAt
marketId
400
Bad Request
messages
401
Unauthorized
403
Forbidden
404
Not Found
messages