package object

Last updated on January 25, 2018

A package allows you to group inventoryAd space available on a website or app. The basic unit of inventory for OpenX is an ad unit. that can be reused for different deals or pricing controls without having to be defined again.

The package object provides the following endpoints:

Listing available fields

GET /package/available_fields

List all the available fields to create or update packages.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package/available_fields?action=create

URL parameter

Parameter

Type

Description

Required?

action

String

List the available fields for a specific action. Valid values are create and update.

Default: create

Optional

Sample response

Note: Each field shown in the sample response is defined within the relevant endpoint on this page.

Return to top.


Creating a package

POST /package

Create a new package.

Sample request

curl -X POST http://PUBLISHER-ui.openx.net/ox/4.0/package --cookie "openx3_access_token=token_string" 
--header "Content-Type:application/json" --data '{"logo":"http://www.test.com/awesome-sample-package.png","contact_name":"John Smith", 
"start_date":null, "status":"Active", "end_date":null, "contact_email":"john.smith@openx.com", "name":"Awesome Sample Package", 
"notes":"This is a super, duper, awesome sample package.", "urls":["http://scores.espn.com"], "domains":"espn.com", 
"private_market":{"discoverable":"1", "default_rate_card_cpm":"13", "default_discounted_cpm":"7", 
"participants":[{"demand_partner":"537146932", "openx_buyer_ids":null, "rate_card_cpm":"2"}]}, 
"account_uid":"00000148-accf-fff1-8123-467d57", "targeting":{"content":{"includes":{}, "excludes":{}}, 
"inter_dimension_operator":"AND", "viewability":{"viewability_score":{"val":"0.60", "op":">="}}}, "rate_card_cpm":"12", 
"discounted_cpm":null}'
			

URL parameters

The parameters below can also be listed by calling GET /package/available_fields?action=create.

Parameter

Type

Description

Required?

account_uid

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

Required

name

String

Name of the package.

In the UI, the Package Name field.

Required

status

String

Status of package. Valid values:

  • Active.
  • Paused.

Required

targeting

targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

Required

domains

String

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

Optional

 

Required either when discoverable is set to 1, or demand_partner is identified. Both parameters are listed in Private MarketplaceThe packaging, offering, and selling of high quality inventory to a limited set of buyers. Abbreviated as PMP. parameters table below.

contact_email

String

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

Optional

contact_name

String

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

Optional

end_date

Date

End date for the package.

In the UI, the Active Dates End Date field.

Optional

logo

String

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

Optional

notes

String

Text description of an item.

In the UI, the Description field.

Optional

private_market

Object

Pricing settings for a PMPPrivate marketplace, the packaging, offering, and selling of high quality inventory to a limited set of buyers. deal which including: rate cardPublishers compile rate cards to list prices for advertising on their sites. Larger sites usually give rates on a CPM basis. Technical details regarding banner size and positioning may also be included. price, discounted/list price, discoverability of deal, demand partners, and buyerA company that pays a demand partner to purchase ad inventory on OpenX Ad Exchange. names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

Optional

rate_card_cpm

Integer

List price for inventory sold directly by the publisherAn account type that represents a business with ad space to sell. to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

Optional

start_date

Date

Start date for a package.

In the UI, the Active Dates Start Date field.

Optional

urls

String (array)

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

Optional

Private Marketplace parameters

Parameter

Type

Description

Required?

default_rate_card_cpm

Integer

List price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Rate Card Price field under the Discovery, Participants & Pricing Rates section.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Required

discoverable

Boolean

Make default_rate_card_cpm and default_discounted_cpm viewable to all buyers.

  • 0 = Not discoverable.
  • 1 = Discoverable.

Note: Buyers identified in demand_partner will be exempt from the impact of the discoverable setting. The demand_partner parameter is listed in the Participants table below.

Required

default_discounted_cpm

Integer

When set, displays as price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Discounted / List Price field under the Discovery, Participants & Pricing Rates section. Rate Card Price appears red with strike-through in Package Summary.

The value is a decimal(9,4) type: a total of 9 digital are accepted, 4 of which are after the decimal point.

Optional

participants

participants

Demand partners (demand_partner) and buyers (openx_buyer_ids) who can see the Private Marketplace Package Rates. Specific prices (rate_card_cpm) can be assigned to each demand partnerA company which purchases ad inventory on OpenX Ad Exchange. or demand partner-buyer combination.

Accepted values for this parameter are in the Participants parameters table below.

Optional

Participants parameters

Parameter

Type

Description

Required?

demand_partner

String

Specific demand partners eligible to buy inventory through the package.

In the UI, this is the Demand Partner drop down.

To list all valid demand partner values, call GET /options/targetable_demand_partner_options.

Required

openx_buyer_ids

String

Specific buyers eligible to buy inventory through the package.

In the UI, this is the Buyer Names field.

To list all valid buyer values, call GET /options/options/buyer_options.

Optional

rate_card_cpm

Integer

When set, displays as price for inventory sold to a specific demand partner or demand partner-buyer combination.

In the UI, this is the Price field.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Optional

Sample response

Package response data

Parameter Description
account_id

OpenX identifier for the account.

For example: 537235117

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

contact_email

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

contact_name

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

created_date

Date and time of creation.

For example: 2015-10-15 20:58:39

deal_id

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

deleted

Flag specifying whether the item has been deleted.

  • 0 = Not deleted.
  • 1 = Deleted.

domains

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

end_date

End date for the package.

In the UI, the Active Dates End Date field.

external_id

Free-form reference identifier.

floorrule_id

OpenX identifier for a floorThe minimum price a publisher is willing to accept for a given impression. rule, the minimum price a publisher is willing to accept for a given impressionA single display of an ad on a web page, mobile app, or other delivery medium. For deals, impression is a metric to relay the total number of ads that have served. See also billable impression, forecasted impressions..

For example: 1610612745

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

id

OpenX identifier for the package.

For example: 536900407

instance_uid

Platform_hash of session.

For example:

a505e730-0b7a-11e3-8ffd-0800200c9a66

logo

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

modified_date

Timestamp of when the last change was made.

For example: 2015-10-15 21:09:36

oxtl

OpenX Targeting Language use to summarize targeting rules.

For example: "ox.viewability.score >= \"0.60\""

name

Name of the package.

In the UI, the Package Name field.

notes

Text description of an item.

In the UI, the Description field.

private_market

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

rate_card_cpm

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

revision

Revision number of the object.

For example: 4

start_date

Start date for a package.

In the UI, the Active Dates Start Date field.

status

Status of package. Valid values:

  • Active.
  • Paused.
targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

type

Type of object query.

To list all valid type values, call GET /options/model_types.

uid

OpenX identifier associated with the package.

For example: 600038a3-c0af-fff1-8123-0c9a66

urls

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

v

Version of the API.

For example: 3

Return to top.


Cloning a package

POST /package/package_uid/clone

Create a duplicate of an existing package.

As an example, use this method to duplicate a package that has performed well for a subset of clients as the foundation for another potentially successful package.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package/20007337-c0af-fff1-8123-467d57/clone --cookie "openx3_access_token=token_string"

URL parameter

Parameter

Type

Description

Required?

package_uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Required

deep

Boolean

Clone descendant objects as well if true.

Default: false.

Optional

Sample response

Response parameters

Parameter Description
account_id

OpenX identifier for the account.

For example: 537235117

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

contact_email

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

contact_name

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

created_date

Date and time of creation.

For example: 2015-10-15 20:58:39

deal_id

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

deleted

Flag specifying whether the item has been deleted.

  • 0 = Not deleted.
  • 1 = Deleted.

domains

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

end_date

End date for the package.

In the UI, the Active Dates End Date field.

external_id

Free-form reference identifier.

floorrule_id

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

id

OpenX identifier for the package.

For example: 536900407

instance_uid

Platform_hash of session.

For example:

a505e730-0b7a-11e3-8ffd-0800200c9a66

logo

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

modified_date

Timestamp of when the last change was made.

For example: 2015-10-15 21:09:36

oxtl

OpenX Targeting Language use to summarize targeting rules.

For example: "ox.viewability.score >= \"0.60\""

name

Name of the package.

In the UI, the Package Name field.

notes

Text description of an item.

In the UI, the Description field.

private_market

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

rate_card_cpm

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

revision

Revision number of the object.

For example: 4

start_date

Start date for a package.

In the UI, the Active Dates Start Date field.

status

Status of package. Valid values:

  • Active.
  • Paused.
targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

type

Type of object query.

To list all valid type values, call GET /options/model_types.

uid

OpenX identifier associated with the package.

For example: 600038a3-c0af-fff1-8123-0c9a66

urls

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

v

Version of the API.

For example: 3

Return to top.


Listing all packages

GET /package

List the entire package object for all packages.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package?status=Paused&overload=light --cookie "openx3_access_token=token_string"

URL parameters

The list of packages can be filtered or sorted by adding a URL parameter from the table below to the GET request.

Parameter

Type

Description

Required?

account_uid

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

Optional

deal_uid

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

Optional

floorrule_uid

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

Optional

limit

Integer

Number of items to list in results.

Default is 10.

Optional

name

String

Name of the package.

In the UI, the Package Name field.

Optional

offset

account_uid

Beginning item in results.

Note: Must be used with limit.

In this instance, starting account_uid in results.

Optional

overload

String

If set to light, returns only the uid for all items in results.

If set to medium, returns full objects for all items in results.

Default is medium.

Optional

sort

String

Name of a field by which results are sorted.

Note: Appending a (-) to a field name will reverse sorting order. For instance: sort=-name.

Optional

status

String

Status of package. Valid values:

  • Active.
  • Paused.

Optional

uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Optional

Sample response

{
   "has_more": false, 
   "limit": 10, 
   "uids": [
      "60009ecc-c0af-fff1-8123-0c9a66", 
      "60009ed5-c0af-fff1-8123-0c9a66", 
      "60003580-c0af-fff1-8123-0c9a66"
   ], 
   "offset": 0
}

Response data

Parameter Description
has_more

Indicator of more results.

If the total number of results is greater than the limit value, the has_more value will be true. If total number of results is equal to or less than the limit value, the has_more value will be false.

limit

Number of items to list in results.

Default is 10.

offset

Beginning item in results.

Note: Must be used with limit.

uids

Object of OpenX package identifiers.

For example: ["60009ecc-c0af-fff1-8123-0c9a66", "60009ed5-c0af-fff1-8123-0c9a66", "60003580-c0af-fff1-8123-0c9a66"]

Return to Top.


Listing a single package

GET /package/{package_uid}

List the entire package object.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package/20007337-c0af-fff1-8123-467d57 --cookie "openx3_access_token=token_string"

URL parameter

Parameter

Type

Description

Required?

package_uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Required

Sample response

Response data

Parameter Description

account_id

OpenX identifier for the account.

For example: 537235117

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

contact_email

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

contact_name

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

created_date

Date and time of creation.

For example: 2015-10-15 20:58:39

deal_id

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

deleted

Flag specifying whether the item has been deleted.

  • 0 = Not deleted.
  • 1 = Deleted.

domains

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

end_date

End date for the package.

In the UI, the Active Dates End Date field.

external_id

Free-form reference identifier.

floorrule_id

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

has_more

Indicator of more results.

If the total number of results is greater than the limit value, the has_more value will be true. If total number of results is equal to or less than the limit value, the has_more value will be false.

id

OpenX identifier for the package.

For example: 536900407

instance_uid

Platform_hash of session.

For example:

a505e730-0b7a-11e3-8ffd-0800200c9a66

limit

Number of items to list in results.

Default is 10.

logo

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

modified_date

Timestamp of when the last change was made.

For example: 2015-10-15 21:09:36

name

Name of the package.

In the UI, the Package Name field.

notes

Text description of an item.

In the UI, the Description field.

offset

Beginning item in results.

Note: Must be used with limit.

oxtl

OpenX Targeting Language use to summarize targeting rules.

For example: "ox.viewability.score >= \"0.60\""

private_market

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

start_date

Start date for a package.

In the UI, the Active Dates Start Date field.

rate_card_cpm

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

revision

Revision number of the object.

For example: 4

status

Status of items in results. Valid values:

  • Active.
  • Paused.
  • Expired.

targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

type

Type of object query.

To list all valid type values, call GET /options/model_types.

uid

OpenX identifier associated with the package.

For example: 600038a3-c0af-fff1-8123-0c9a66

urls

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

v

Version of the API.

For example: 3

Return to top.


Listing floor rules

GET /package/{package_uid}/list_floorrules

List all the entire floor rule objects for a specific package.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package/600038a3-c0af-fff1-8123-0c9a66/list_floorrules?status=Expired&overload=light

URL parameters

The list of floor rules can be filtered or sorted by adding a URL parameter from the table below to the GET request.

Parameter

Type

Description

Required?

package_uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Required

limit

Integer

Number of items to list in results.

Default is 10.

Optional

overload

String

If set to light, returns only the uid for all items in results.

If set to medium, returns full objects for all items in results.

Default is medium.

Optional

sort

String

Name of a field by which results are sorted.

Note: Appending a (-) to a field name will reverse sorting order. For instance: sort=-name.

Optional

status

String

Status of items in results. Valid values:

  • Active.
  • Paused.
  • Expired.

Optional

Sample response

{
   "has_more": false, 
   "limit": 10, 
   "uids": [
      "60000009-f100-fff1-8123-0c9a66", 
   ], 
   "offset": 0
}

Response data

Parameter Description
has_more

Indicator of more results.

If the total number of results is greater than the limit value, the has_more value will be true. If total number of results is equal to or less than the limit value, the has_more value will be false.

limit

Number of items to list in results.

Default is 10.

offset

Beginning item in results.

Note: Must be used with limit.

uids

Object of OpenX identifiers for the items. Appears when overload=light is added as a URL parameter.

For example: ["60009ecc-c0af-fff1-8123-0c9a66", "60009ed5-c0af-fff1-8123-0c9a66", "60003580-c0af-fff1-8123-0c9a66"]

Return to top.


Listing package deals

GET /package/{package_uid}/list_deals

List all the deal objects for a specific package.

Sample request

curl http://PUBLISHER-ui.openx.net/ox/4.0/package/600038a3-c0af-fff1-8123-0c9a66/list_deals?overload=light

URL parameters

The list of deal objects can be filtered or sorted by adding a URL parameter from the table below to the GET request.

Parameter

Type

Description

Required?

package_uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Required

account_uid

String

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

Optional

limit

Integer

Number of items to list in results.

Default is 10.

Optional

overload

String

If set to light, returns only the uid for all items in results.

If set to medium, returns full objects for all items in results.

Default is medium.

Optional

sort

String

Name of a field by which results are sorted.

Note: Appending a (-) to a field name will reverse sorting order. For instance: sort=-name.

Default field is deal_priority.

Optional

status

String

Status of items in results. Valid values:

  • Active.
  • Paused.
  • Expired.

Optional

uid

String

OpenX identifier for an item.

Optional

Sample response

{
   "has_more": false, 
   "limit": 7, 
   "uids": [
      "6000e993-c0a9-fff1-8123-0c9a66", 
      "6000e98e-c0a9-fff1-8123-0c9a66",
      "6000e990-c0a9-fff1-8123-0c9a66",
      "6000e994-c0a9-fff1-8123-0c9a66",
      "600124aa-c0a9-fff1-8123-0c9a66",
      "6000c199-c0a9-fff1-8123-0c9a66",
      "6000e98f-c0a9-fff1-8123-0c9a66"
   ], 
   "offset": 0
}

Response data

Parameter Description
has_more

Indicator of more results.

If the total number of results is greater than the limit value, the has_more value will be true. If total number of results is equal to or less than the limit value, the has_more value will be false.

limit

Number of items to list in results.

Default is 10.

offset

Beginning item in results.

Note: Must be used with limit.

uids

Object of OpenX identifiers for the items. Appears when overload=light is added as a URL parameter.

For example: ["60009ecc-c0af-fff1-8123-0c9a66", "60009ed5-c0af-fff1-8123-0c9a66", "60003580-c0af-fff1-8123-0c9a66"]

Return to top.


Updating a package

PUT /package/{package_uid}

Update a specific package. Use GET /package to retrieve a list of all package_uid values.

Sample request

curl -X PUT http://PUBLISHER-ui.openx.net/ox/4.0/package/20007337-c0af-fff1-8123-467d57 --cookie "openx3_access_token=token_string"
--header "Content-Type:application/json" --data '{"logo":"http://www.test.com/awesome-sample-package.png", "contact_name":"John Smith", 
"start_date":null, "status":"Active","end_date":null, "contact_email":"john.smith@openx.com", "name":"Awesome Sample Package", 
"notes":"This is a super, duper, awesome sample package.", "urls":["http://scores.espn.com"], "domains":"espn.com", 
"private_market":{"discoverable":"1", "default_rate_card_cpm":"13", "default_discounted_cpm":"7", 
"participants":[{"demand_partner":"537146932", "openx_buyer_ids":null, "rate_card_cpm":"2"}]}, 
"account_uid":"00000148-accf-fff1-8123-467d57", "targeting":{"content":{"includes":{}, "excludes":{}}, "inter_dimension_operator":"AND", 
"viewability": {"viewability_score":{"val":"0.60", "op":">="}}}, "rate_card_cpm":"12", "discounted_cpm":null}'
			

URL parameters

These parameters can also be listed by calling GET /package/available_fields?action=update.

Parameter

Type

Description

Required?

name

String

Name of the package.

In the UI, the Package Name field.

Required

status

String

Status of package. Valid values:

  • Active.
  • Paused.

Required

targeting

targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

Required

domains

String

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

Optional

 

Required either when discoverable is set to 1, or demand_partner is identified. Both parameters are listed in Private Marketplace parameters table below.

account_uid

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

Optional

contact_email

String

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

Optional

contact_name

String

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

Optional

deal_id

Integer

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

Optional

deal_uid

uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

Optional

end_date

Date

End date for the package.

In the UI, the Active Dates End Date field.

Optional

external_id

String

Free-form reference identifier.

Optional

floorrule_id

Integer

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

Optional

floorrule_uid

uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

Optional

logo

String

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

Optional

notes

String

Text description of an item.

In the UI, the Description field.

Optional

private_market

Object

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

Optional

rate_card_cpm

Integer

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

Optional

start_date

Date

Start date for a package.

In the UI, the Active Dates Start Date field.

Optional

urls

String (array)

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

Optional

Private Marketplace parameters

Parameter

Type

Description

Required?

default_rate_card_cpm

Integer

List price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Rate Card Price field under the Discovery, Participants & Pricing Rates section.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Required

discoverable

Boolean

Make default_rate_card_cpm and default_discounted_cpm viewable to all buyers.

  • 0 = Not discoverable.
  • 1 = Discoverable.

Note: Buyers identified in demand_partner will be exempt from the impact of the discoverable setting. The demand_partner parameter is listed in the Participants table below.

Required

default_discounted_cpm

Integer

When set, displays as price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Discounted / List Price field under the Discovery, Participants & Pricing Rates section. Rate Card Price appears red with strike-through in Package Summary.

The value is a decimal(9,4) type: a total of 9 digital are accepted, 4 of which are after the decimal point.

Optional

participants

participants

Demand partners (demand_partner) and buyers (openx_buyer_ids) who can see the Private Marketplace Package Rates. Specific prices (rate_card_cpm) can be assigned to each demand partner or demand partner-buyer combination.

Accepted values for this parameter are in the Participants parameters table below.

Optional

Participants parameters

Parameter

Type

Description

Required?

demand_partner

String

Specific demand partners eligible to buy inventory through the package.

In the UI, this is the Demand Partner drop down.

To list all valid demand partner values, call GET /options/targetable_demand_partner_options.

Required

openx_buyer_ids

String

Specific buyers eligible to buy inventory through the package.

In the UI, this is the Buyer Names field.

To list all valid buyer values, call GET /options/options/buyer_options.

Optional

rate_card_cpm

decimal(9,4)

When set, displays as price for inventory sold to a specific demand partner or demand partner-buyer combination.

In the UI, this is the Price field.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Optional

Sample response

Response data

Parameter Description
account_id

OpenX identifier for the account.

For example: 537235117

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

contact_email

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

contact_name

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

created_date

Date and time of creation.

For example: 2015-10-15 20:58:39

deal_id

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

deleted

Flag specifying whether the item has been deleted.

  • 0 = Not deleted.
  • 1 = Deleted.

domains

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

end_date

End date for the package.

In the UI, the Active Dates End Date field.

external_id

Free-form reference identifier.

floorrule_id

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

id

OpenX identifier for the package.

For example: 536900407

instance_uid

Platform_hash of session.

For example:

a505e730-0b7a-11e3-8ffd-0800200c9a66

logo

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

modified_date

Timestamp of when the last change was made.

For example: 2015-10-15 21:09:36

oxtl

OpenX Targeting Language use to summarize targeting rules.

For example: "ox.viewability.score >= \"0.60\""

name

Name of the package.

In the UI, the Package Name field.

notes

Text description of an item.

In the UI, the Description field.

private_market

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

rate_card_cpm

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

revision

Revision number of the object.

For example: 4

start_date

Start date for a package.

In the UI, the Active Dates Start Date field.

status

Status of package. Valid values:

  • Active.
  • Paused.
targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

type

Type of object query.

To list all valid type values, call GET /options/model_types.

uid

OpenX identifier associated with the package.

For example: 600038a3-c0af-fff1-8123-0c9a66

urls

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

v

Version of the API.

For example: 3

Return to top.


Updating multiple packages

PUT /package

Update multiple packages. Use GET /package to retrieve a list of all package_uid values.

Sample request

The request below updates the status of two packages.

curl -X PUT http://PUBLISHER-ui.openx.net/ox/4.0/package --cookie "openx3_access_token=token_string" 
--header "Content-Type:application/json" --data-binary '[{"uid":"60146fc1-c0af-fff1-8123-0c9a66","status":"Paused"}, 
{"uid":"6000cb82-c0af-fff1-8123-0c9a66","status":"Paused"}]'

URL parameters

These parameters can also be listed by calling GET /package/available_fields?action=update.

Parameter

Type

Description

Required?

name

String

Name of the package.

In the UI, the Package Name field.

Required

status

String

Status of package. Valid values:

  • Active.
  • Paused.

Required

targeting

targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

Required

domains

String

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

Optional

 

Required either when discoverable is set to 1, or demand_partner is identified. Both parameters are listed in Private Marketplace parameters table below.

account_uid

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

Optional

contact_email

String

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

Optional

contact_name

String

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

Optional

deal_id

Integer

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

Optional

deal_uid

uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

Optional

end_date

Date

End date for the package.

In the UI, the Active Dates End Date field.

Optional

external_id

String

Free-form reference identifier.

Optional

floorrule_id

Integer

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

Optional

floorrule_uid

uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

Optional

logo

String

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

Optional

notes

String

Text description of an item.

In the UI, the Description field.

Optional

private_market

Object

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

Optional

rate_card_cpm

Integer

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

Optional

start_date

Date

Start date for a package.

In the UI, the Active Dates Start Date field.

Optional

urls

String (array)

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

Optional

Private Marketplace parameters

Parameter

Type

Description

Required?

default_rate_card_cpm

Integer

List price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Rate Card Price field under the Discovery, Participants & Pricing Rates section.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Required

discoverable

Boolean

Make default_rate_card_cpm and default_discounted_cpm viewable to all buyers.

  • 0 = Not discoverable.
  • 1 = Discoverable.

Note: Buyers identified in demand_partner will be exempt from the impact of the discoverable setting. The demand_partner parameter is listed in the Participants table below.

Required

default_discounted_cpm

Integer

When set, displays as price for inventory sold to a limited set of buyers.

In the UI, the Private Marketplace Package Rates Discounted / List Price field under the Discovery, Participants & Pricing Rates section. Rate Card Price appears red with strike-through in Package Summary.

The value is a decimal(9,4) type: a total of 9 digital are accepted, 4 of which are after the decimal point.

Optional

participants

participants

Demand partners (demand_partner) and buyers (openx_buyer_ids) who can see the Private Marketplace Package Rates. Specific prices (rate_card_cpm) can be assigned to each demand partner or demand partner-buyer combination.

Accepted values for this parameter are in the Participants parameters table below.

Optional

Participants parameters

Parameter

Type

Description

Required?

demand_partner

String

Specific demand partners eligible to buy inventory through the package.

In the UI, this is the Demand Partner drop down.

To list all valid demand partner values, call GET /options/targetable_demand_partner_options.

Required

openx_buyer_ids

String

Specific buyers eligible to buy inventory through the package.

In the UI, this is the Buyer Names field.

To list all valid buyer values, call GET /options/options/buyer_options.

Optional

rate_card_cpm

Integer

When set, displays as price for inventory sold to a specific demand partner or demand partner-buyer combination.

In the UI, this is the Price field.

The value is a decimal(9,4) type: a total of 9 digits are accepted, 4 of which are after the decimal point.

Optional

Sample response

Response data

Parameter Description
account_id

OpenX identifier for the account.

For example: 537235117

account_uid

OpenX identifier for the account.

For example:

600aa500-accf-fff1-8123-b0769b

contact_email

Email of the person to contact if questions exist about the package.

In the UI, the Contact Email field.

contact_name

Name of the person to contact if questions exist about the package.

In the UI, the Contact Name field.

created_date

Date and time of creation.

For example: 2015-10-15 20:58:39

deal_id

OpenX identifier for a deal ID.

For example: "OX-qav-AfLYGL"

deal_uid

OpenX identifier for a deal ID.

For example: "60146f8e-c0a9-fff1-8123-0c9a66"

deleted

Flag specifying whether the item has been deleted.

  • 0 = Not deleted.
  • 1 = Deleted.

domains

Top-level domains associated with the package.

In the UI, the Domains field.

For example: "elle.com, cnn.com"

end_date

End date for the package.

In the UI, the Active Dates End Date field.

external_id

Free-form reference identifier.

floorrule_id

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 1610612745

floorrule_uid

OpenX identifier for a floor rule, the minimum price a publisher is willing to accept for a given impression.

For example: 60000009-f100-fff1-8123-0c9a66

id

OpenX identifier for the package.

For example: 536900407

instance_uid

Platform_hash of session.

For example:

a505e730-0b7a-11e3-8ffd-0800200c9a66

logo

URL of the logo to represent the package.

In the UI, the Package Logo (URL) field.

For example: "http://www.site.com/package_logo.jpg"

modified_date

Timestamp of when the last change was made.

For example: 2015-10-15 21:09:36

oxtl

OpenX Targeting Language use to summarize targeting rules.

For example: "ox.viewability.score >= \"0.60\""

name

Name of the package.

In the UI, the Package Name field.

notes

Text description of an item.

In the UI, the Description field.

private_market

Pricing settings for a PMP deal which including: rate card price, discounted/list price, discoverability of deal, demand partners, and buyer names.

In the UI, all the Private Marketplace Package Rates values in the Discover, Participants & Pricing Rates section. Accepted values for this parameter are in the Private Marketplace parameters table below.

rate_card_cpm

List price for inventory sold directly by the publisher to an advertiser.

In the UI, the Direct Package Rates Rate Card Price under the Discovery, Participants & Pricing Rates section.

revision

Revision number of the object.

For example: 4

start_date

Start date for a package.

In the UI, the Active Dates Start Date field.

status

Status of package. Valid values:

  • Active.
  • Paused.
targeting

Rules that define inventory to be bought and sold and how inventory is targeted for delivery to viewers.

In the UI, the target values in the Targeting section.

For example:

"targeting": {
   "geographic": {
      "excludes": {
         "city": "122985"
      },
      "includes": {
         "dma": "2",
         "state": "3588"
      }
   }
}

Note: If no targeting is selected, the targeting of the package will be set to MATCH ALL.

type

Type of object query.

To list all valid type values, call GET /options/model_types.

uid

OpenX identifier associated with the package.

For example: 600038a3-c0af-fff1-8123-0c9a66

urls

Example URLs included in package.

In the UI, this is the Sample URLs field.

For example: ["http://sub1.site.com", "http://sub2.site.com", "http://sub3.site.com"]

v

Version of the API.

For example: 3

Return to top.


Deleting a package

DELETE /package/{package_uid}

Delete a single package.

Sample request

curl -X DELETE http://PUBLISHER-ui.openx.net/ox/4.0/package/20007337-c0af-fff1-8123-467d57 --cookie "openx3_access_token=token_string"

URL parameter

Parameter

Type

Description

Required?

package_uid

package_uid

OpenX identifier for a package.

For example: 20007337-c0af-fff1-8123-467d57

Tip: Use GET /package to retrieve a list of all package_uid values.

Required

Sample response

{"2000748a-c0af-fff1-8123-467d57": true}

Response data

Parameter Description
(package_uid)

The unique OpenX identifier for a package. The value will be true if the deletion was successful. If the package was not deleted, the value will be false.

Return to top.


Deleting multiple packages

DELETE /package

Delete multiple packages.

To delete multiple packages, the package_uid for each package must be passed as an array in the DELETE request. Use GET /package to retrieve a list of all package_uid values.

Sample request

curl -X DELETE http://PUBLISHER-ui.openx.net/ox/4.0/package --cookie "openx3_access_token=token_string"
--header "Content-Type:application/json" --data-binary '["6008c33a-c0af-fff1-8123-0c9a66", "6008c339-c0af-fff1-8123-0c9a66"]'

Sample response

{"6008c33a-c0af-fff1-8123-0c9a66": true, "6008c339-c0af-fff1-8123-0c9a66": true}

Response data

Parameter Description
(package_uid)

The value for the package_uid will be true if the deletion was successful. If a package was not deleted, the value will be false for that package_uid.

Return to top.

See also

Packages in the OpenX help.