Skip to end of metadata
Go to start of metadata

Ad Quality Rule Service

An ad quality rule defines the ad quality settings which a network can define for its managed publishers. A network may have more than one ad quality rule applied conditionally across a publisher's inventory. For instance, traffic originating from certain geo-locations may require different ad quality settings.

On This Page

REST API

Note that publisher_code can be used in place of publisher_id, and ad_quality_rule_code can be used in place of ad_quality_rule_id for all of the calls below.

Add an Ad Quality Rule

To add a new ad quality rule, use one of the following:
POST https://api.appnexus.com/ad-quality-rule?publisher_id=PUBLISHER_ID
(payment rule JSON)

Modify an Existing Ad Quality Rule

To modify an existing ad quality rule, use one of the following:
PUT https://api.appnexus.com/ad-quality-rule?id=AD_QUALITY_RULE_ID&publisher_id=PUBLISHER_ID
(publisher rule JSON)

View Ad Quality Rules

To view all of the ad quality rules for a publisher:
GET https://api.appnexus.com/ad-quality-rule?publisher_id=PUBLISHER_ID

To view a specific ad quality rule for a publisher:
GET https://api.appnexus.com/ad-quality-rule?id=AD_QUALITY_RULE_ID

View multiple ad quality rules by ID using a comma-separated list:
GET https://api.appnexus.com/ad-quality-rule?id=1,2,3

JSON Parameters

Parameter

Required on POST

Required on PUT

Type

Description

Default

id

No

Yes

int

The unique identifier for a ad quality rule

Auto-incremented Number (i.e. 123)

code

No

No

string

A optional custom code used to reference an ad quality rule.

Null

name

Yes

No

string

A name used to describe an ad quality rule.

None

description

no

no

string

Optional description.

 

ad_profile_id

Yes

no

int

You are required to provide an ad profile which defines quality restrictions that should be applied to this rule.

 

publisher_id

yes

yes

int

The id of the publisher for which this ad quality rule will apply.

 

member_id

no

no

int

The id of the publisher's member for which this ad quality rule will apply.

 

profile_id

no

no

int

An optional profile_id is used to determine when to apply an ad quality rule. A profile is a generic set of rules for targeting inventory, and certain ad quality rules may only apply to certain slices of inventory. (See the Profile Service for details.)

 

priority

no

no

int

You can optionally provide a priority which defines the level at which this rule should that be applied relative to other payment rules.

5

last_modified

no

no

timestamp

Time of last modification to this ad quality rule.

 

Example