Synchronizing Your Inventory using the Console API

This page walks you through the process of mapping your supply to the proper corresponding objects within AppNexus, using the Console API.

Step 1. Getting Started

Before getting started, please ensure that you have access to the Console API wiki space, you have gone through our API onboarding materials, received API credentials, and generally familiarized yourself with how the API functions.

Please also ensure that you have read the parent page to this one, explaining the AppNexus sell-side object hierarchy.

The rest of this document assumes an understanding of the Console API and the AppNexus sell-side object hierarchy.

Step 2. How Bid Requests Map to Publishers and Placements

For each integration type, there are 2 fields that can be used to indicate a mapping to AppNexus sell-side objects. For example:

For custom integration types, you can contact AppNexus Support via our Customer Portal to learn how your bid requests map to AppNexus publishers and placements.

The following steps will explain how to create publisher and placement objects with the proper configuration to accept those mappings.

Step 3. Creating a Publisher

The first thing you'll do is create a new publisher, specifying the publisher.code if you're using one.

POST: http://api.appnexus.com/publisher?member_id=XXXX (where XXXX is your member ID)

{"publisher": {"name": "AAAA", "is_oo":true, "code": "BBBB", "reselling_exposure":"CCCC"}}

Once you have POST'ed successfully, the API will provide the ID of the newly-created object in its response.  You'll need to store this value for further use.

Step 4. Creating a Site (a.k.a. Placement Group)

Next, we'll create one or more Sites (or Placement Groups), which are simply a grouping mechanism if you have a large number of placements within one Publisher.  Using one is mandatory, multiple is optional.

POST: http://api.appnexus.com/site?member_id=XXXX&publisher_id=YYYY (where XXXX is your member ID, YYYY is the ID of the publisher you created in the previous step)

{"site":{"name": "AAAA", "supply_type": "BBBB"}}

Step 5. Creating a Placement

Finally, we'll create one or more Placements, which are the most granular sell-side objects.

POST: http://api.appnexus.com/placement?member_id=XXXX&publisher_id=YYYY&site_id=ZZZZ (where XXXX is your member ID, YYYY is the ID of the publisher you created earlier, ZZZZ is the ID of the site you created in the previous step)

{"placement": {"name": "AAAA", "code": "BBBB"}}