HomeDocumentation and GuidesAPI Reference
API Reference

Update a deal

Update a deal

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required
Body Params

A payload containing the fields required to update a deal.

string | null
date
date
boolean

The base CPM value derived from the unit's Floor CPM. Used to automate pricing based on established rate card minimums. One of cpm_from_rate_card or cpm_fixed must be set. Can't be set if cpm_fixed is also set.

number | null

One of cpm_from_rate_card or cpm_fixed must be set. Can't be set if cpm_from_rate_card is set.

integer | null
0 to 180

Required for 'purchase_type' 'G'. Set both ad_duration_max and
ad_duration_min. Must be greater than or equal to ad_duration_min.

integer | null
0 to 180

Required for 'purchase_type' 'G'. Set both ad_duration_max and
ad_duration_min. Must be less than or equal to ad_duration_max.

string
enum

FIRST_PRICE or FIXED_PRICE. If purchase_type is G this is ignored and
always set to FIXED_PRICE.

Allowed:
string
enum

B (budget) or I (impressions). Required when purchase_type is 'G'.

Allowed:
number | null

When budget_mode is 'B', set both budget_min and budget_max. Omit or
null when budget_mode is 'I'. budget_min must be less than or equal
to budget_max.

number | null

When budget_mode is 'B', set both budget_min and budget_max. Omit or
null when budget_mode is 'I'. budget_min must be less than or equal
to budget_max.

integer | null

When budget_mode is 'I', set both market_targeted_impressions_min
and market_targeted_impressions_max. Omit or null when budget_mode
is 'B'. market_targeted_impressions_min must be less than or equal
to market_targeted_impressions_max.

integer | null

When budget_mode is 'I', set both market_targeted_impressions_min
and market_targeted_impressions_max. Omit or null when budget_mode
is 'B'. market_targeted_impressions_min must be less than or equal
to market_targeted_impressions_max.

integer | null

For purchase_type 'G' deals. When provided, set both
min_seconds_between_plays_min and min_seconds_between_plays_max;
min_seconds_between_plays_min must be less than or equal to
min_seconds_between_plays_max.

integer | null

For purchase_type 'G' deals. When provided, set both
min_seconds_between_plays_min and min_seconds_between_plays_max;
min_seconds_between_plays_min must be less than or equal to
min_seconds_between_plays_max.

integer | null

For purchase_type 'G' deals. When provided, set both min and max;
number_of_days_min must be less than or equal to
number_of_days_max.

integer | null

For purchase_type 'G' deals. When provided, set both min and max;
number_of_days_min must be less than or equal to
number_of_days_max.

dsp_ids
array of integers

List of DSP IDs for Open Deals. Used to make inventory available to all buyers on the specified DSPs. Internal and external DSPs cannot be mixed in a single deal. At most one internal DSP may be specified.

dsp_ids
buyer_organization_dsp_ids
array of integers

List of specific DSP organization IDs for PMP Deals. Restricts
bidding access to only the listed organizations. Internal and
external buyer organization DSPs cannot be mixed in a single deal.

For purchase_type 'G' note the following additional details.
Required on create when lineitem is present; must be a list of
exactly one external DSP buyer. On update with a lineitem, may be
omitted if it was previously set on the deal.

buyer_organization_dsp_ids
curator_organization_ids
array of integers

List of organization IDs for Curated Deals. Limits deal access and management to the specified curators.

curator_organization_ids
string
length between 168 and 168

168 character string of 1 or 0 representing each hour in a week, eg "1001111...1010111"

demographic_ids
array of integers

For demographic targeting

demographic_ids
inventory_targeting
object
boolean

Boolean flag for deals with no expiration date. Indicates the deal
remains active indefinitely until manually paused or archived.
'true' is not allowed when purchase_type is 'G'.

package_properties
array of objects
package_properties
package_targetingcriteria
array of objects

Rule-based logic for Event Targeting. Used to trigger the deal based on external conditions like weather or live data.

package_targetingcriteria
string
enum

Only 'NG' (non-guaranteed) and 'G' (guaranteed) are supported currently.

Allowed:
string
enum

A request may only use 'D' (draft) or 'P' (published). A response may
additionally be 'C' (cancelled). If this field is not provided, a deal
create will leave the deal in the default draft state and a deal update
will leave the deals state unchanged. A 'P' will trigger a publish to
occur after the deal is created. If a lineitem field (see lineitem
field description) is present in either a deal update or create it will
also trigger a publish.

Allowed:
string | null

Unique identifier (random prefix + package id). For API calls that require an id to specify a deal, use package_id

lineitem
object

An empty object that signals the intent to publish the deal and create
a linked lineitem. Supported for purchase_type 'G' only. Object must
be empty. Responses will include the populated lineitem object with
additional fields if a lineitem was successfully created.

A deal with purchase_type 'G' requires a lineitem in order to be
deliverable.

See also the buyer_organization_dsp_ids, which is required when
creating a lineitem.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json