For details on API authentication, see Authentication for FreeWheel Demand APIs.

Overview

The Demand Campaign Manager API supports non-guaranteed deal activation for contextually (standard attributes (content, geographic, device and the like) targeted deals.

You can use it to:

  • Create draft deals
  • Retrieve a Marketplace forecast, including forecasting opportunities, reach, and price ranges
  • Modify draft deals while they are in flight
  • Decide whether to activate/order the deal

At the end of the workflow you get an external_deal_ID against which you can target.

Demand Campaign Manager API Workflow

Sequence Diagram

1466

Demand Campaign Manager API Workflow Description

Agency Buyer

  1. Creates a deal in the Demand-Side Platform (DSP).

Demand-Side Platform

  1. Creates a deal in Campaign Manager (via POST /deals).

Campaign Manager

  1. Confirms that the deal is created and returns an internal_deal_id.

Demand-Side Platform

  1. Creates a draft deal.
  2. Retrieves a forecast for the deal (via GET deals/{internal_deal_id}).

📘

Note

While draft deals are in flight, you can retrieve a list of draft deals and refresh forecast results.

Campaign Manager

  1. Returns the forecast .

Demand-Side Platform

  1. Sends forecast metrics.

Agency Buyer

  1. Submits order to Marketplace to DSP.

Demand-Side Platform

  1. Orders Non-Guaranted deals in Campaign Manager via PUT {internal_deal_id}:order.
  2. Optional: edits a Non-Guaranteed deal via PATCH deals/{deal_id}.
  3. Optional: cancels the draft deal.
  4. Optional: deletes the draft deals with Ready or Generating status.

Campaign Manager

  1. Confirms deal order.

Basic Attributes

FieldDescriptionTypeGuaranteed (G) or Non-Guaranteed (NG) deals)Required in POST?Notes
idCampaign Manager internal deal ID.

Auto-generated by a database
integerNGNoCannot be edited in draft or when deal is ordered.
deal_idMRM- or Marketplace-generated public deal IDstringNGNoCannot be edited in draft or when deal is ordered.
nameDeal's namestringNGNoEditable in draft or when deal is ordered.
advertiserThe advertiser targeted by that particular line itemBothEditable in draft.

Not editable when deal is ordered.
statusCampaign Manager deal's statusenum

Possible values:

  • GENERATING
  • READY
  • ORDERED
  • DELETED
  • REVISION
  • CANCELLED
  • COMPLETED
  • AWAITING_APPROVAL (G)
  • APPROVED (G)
  • DECLINED (G)

Note: G/NG - Guaranteed or Non-Guaranteed only
BothNoYou can cancel via POST or use DELETE.

Cannot be edited in draft or when deal is ordered.
start_dateThe start date of the dealstring

Possible formats:
  • date-time
  • ISO-8601
NGYesEditable in draft or when deal is ordered, if existing and new start dates are both in the future.
end_dateThe end date of the dealstring

Possible formats:
  • date-time
  • ISO-8601
NGYesEditable in draft or when deal is ordered, if existing and new start dates are both in the future.
budget_modelThe budget type of the dealenum

Possible values:

  • IMPRESSION
  • CURRENCY
NGYesCannot be edited in draft or when deal is ordered.
currency_goalThe budget of the dealfloat64NGYes (if budgetmodel = currency)Editable in draft if budgetmodel = currency.

Editable when deal is ordered only if the goal is being increased
secondary_goalSets a secondary goal for impressions and CPM, if primary goal is not achievedStringGNoSample code:

"secondary_goal": {
"imp":0,
"cpm":{
"lower":0,
"upper":0
}
}
frequency_capThe frequency cap of the dealNGEditable in draft or when deal is ordered.
seatThe open real-time-bidding (RTB) seat that the deal wants to usestringNGYesEditable in draft.

Cannot be edited when deal is ordered.
dsp_idThe DSP that this deal wants to use.integerNGYesEditable in draft.

Cannot be edited when deal is ordered.
creative_durationThe creative duration that a buyer can specifyenum

Possible values:

  • 6
  • 15
  • 30
  • 60
  • 90
  • 120


Only one value can be used for targeting.
NGYesEditable in draft or when deal is ordered.
transaction_typeThe type of dealenum

Possible values:

  • Non-Guaranteed
  • Guaranteed
NGCannot be edited in draft or when deal is ordered.
impression_goalThe budget of the dealint64NGCannot be edited in draft or when deal is ordered.
targetingTargeting object that includes the FreeWheel standard attributesNGEditable in draft or when deal is ordered.
forecastThe forecast generated by the Recommendation Service (RS)NGCannot be edited in draft or when deal is ordered.
pacingSMOOTH_ASG
audience_idThe audience identifierstringG, NGNoString length: 1~255

Advertiser Object

FieldDescriptionTypeRequired in POST?
nameAdvertiser's namestringYes
brand_nameThe name of the product/brand that is being advertised (usually the same as advertiser name)stringNo
industry_idThe industry ID to which that advertiser belongs. This ID is retrieved from the Industry Reference API.integerYes

Frequency Cap Object

FieldDescriptionType
typeOnly supports UNIVERSAL_HHIDenum
capThe maximum number of times that a unique viewer may see ads for this deal during the specified interval.integer
periodDefines the frequency cap intervals that the API supports. The frequency interval specifies the units in which the frequency count is expressed. For example, if a line’s frequency count is two and the interval is Day, display the ad to the same user a maximum of 2 times in the same calendar day.enum

Possible values:

  • NONE
  • DAY
  • WEEK
  • MONTH

📘

Note

If the frequency cap period is NONE, the type and cap is not required.

If it's not NONE, the cap and type are required.

Forecast Object

FieldDescriptionPossible Values
forecastThe forecast generated by the Recommendation Service (RS)
forecast object:
statusThe status of the Recommendation Service job.
  • NEW
  • IN_PROGRESS
  • SUCCESS
  • FAILURE (with failure reason)
cpmCost per thousand (CPM) range
opportunitiesThe estimated total opportunities provided to deliver an ad
digital_trpEstimated percentage of your target audience that will be reached, expressed in target content rating points.

Targeting Object

See Targeting Reference API.