API Endpoints
Campaign

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

POST

Creates a campaign.

The campaign can be only created for a market in which a product feed is present, otherwise CONFLICT response code is returned. The markets for which a feed is available can be retrieved from API endpoint GET /external/v1/advertisers/{advertiserId}/publishers/markets.

Rules:

  • name of a campaign under an advertiser should be unique.
  • startDate should be before endDate.
  • startDate should be present or future date.
  • 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.

Allowed values for attributes are as follows:

  • marketId:
    • 1- Argentina(AR)
    • 2- Australia(AU)
    • 3- Austria(AT)
    • 4- Belgium(BE)
    • 5- Brazil(BR)
    • 6- Canada(CA)
    • 7- Colombia(CO)
    • 8- Czech Republic(CZ)
    • 9- Denmark(DK)
    • 10- France(FR)
    • 11- Germany(DE)
    • 12- Hong Kong(HK)
    • 13- India(IN)
    • 14- Indonesia(ID)
    • 15- Ireland(IE)
    • 16- Israel(IL)
    • 17- Italy(IT)
    • 18- Malaysia(MY)
    • 19- Mexico(MX)
    • 20- Netherlands(NL)
    • 21- New Zealand(NZ)
    • 22- Norway(NO)
    • 23- Philippines(PH)
    • 24- Poland(PL)
    • 25- Portugal(PT)
    • 26- Russia(RU)
    • 27- Saudi Arabia(SA)
    • 28- Singapore(SG)
    • 29- South Africa(ZA)
    • 30- Spain(ES)
    • 31- Sweden(SE)
    • 32- Switzerland(CH)
    • 33- Taiwan(TW)
    • 34- Thailand(TH)
    • 35- Turkey(TR)
    • 36- Ukraine(UA)
    • 37- United Arab Emirates(AE)
    • 38- United Kingdom(GB)
    • 39- USA(US) Notes:
  • Whenever advertised is not passed, value false is applied by default.
  • Whenever targetingSiteIds is not passed, all site ids from API endpoint [GET /external/v1/advertisers/{advertiserId}/eligible-campaign-targets](#/Advertiser /getEligibleCampaignTargets) are applied by default.
  • Whenever targetingAdGridLocations is not passed, all ad grid locations from API endpoint GET /external/v1/advertisers/{advertiserId}/eligible-campaign-targets are applied by default.
Path Parameters
advertiserId
*
Body Parameters
body
*
name
*
startDate
*
endDate
budget
*
dailyBudget
weeklyBudget
monthlyBudget
advertised
defaultBid
targetingSiteIds
targetingAdGridLocations
marketId
*
publisherId
*
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
409
Conflict
messages