save_wholesale_product and read it with search and get. The field-level
rules for prices, formats, channels and audience declarations are in
Create products from ad-server inventory.
This page is the V3 workflow.
Which sources hold products you can author
You author products only on a source Apostra manages for you, which means an ad-server-backed source. Pass itssourceId, as returned by
search({ "kind": "inventory_source" }), on every call. A source that does not
hold products you author refuses the write with refused: "not_our_system_of_record" and says why:
A source whose ad server is disconnected is refused with
source_disconnected.
Reconnect it first. A source still being set up upstream is refused with
source_not_provisioned. Read it with get and include: ["diagnostics"],
then retry.
Create a product
A create has noid. It needs name, channels and inventory with an
inventory.execution block. When you send pricingOptions you also send
deliveryType.
-
channelsare AdCP media channels. The tool refusesaudioandvideo, an empty list, and more distinct channels than a product can hold. -
inventoryhas two parts.inventory.executionis how the ad server runs the product, and buyers never see it.inventory.publisher_propertiesis the publisher scope buyers see, as AdCP publisher selectors (publisher_domain,selection_typeand, forby_idorby_tag,property_idsorproperty_tags). Both are closed: the tool refuses a field it does not list. -
inventory.executionneeds anadapter(the source’s ad-server adapter) and carries theselectorsto sell and anyformat_bindings. A selector is aselector_type, anexternal_idand optionally anameandoptions. A format binding is aformat_option_idand optionally anadapter_config. The tool refuses a create withoutinventory.executionand itsadapterbefore it contacts the source, and names the field in the refusal. V3 has no tool that searches selectors, so use the values you already hold. -
A selector’s
optionsand a format binding’sadapter_configdepend on the ad server, so each is a list of{ "key", "value" }entries, one per setting.keyis the path to the setting: dotted names for nested objects,[n]for a list item, and["a.b"]for a name that holds a dot, a bracket or a space.valueis a string, a number, a boolean, a list of strings,nullor an empty object{}. These entries:send{ "creative_placeholders": [{ "slot_id": "leaderboard" }], "roadblocking": "as_many_as_possible" }to the source. A key listed twice, a key that is both a value and the parent of another, or a gap in a list is refused. -
getandsearchreturninventoryin the shape a save takes:executionunder the names above, eachoptionsandadapter_configas entries, andpublisher_propertiesas AdCP selectors. To change one setting, read the product, edit itsinventory, and send the wholeinventoryback. Setting names come back exactly as stored. -
A change may leave
executionout (or send it asnull) and keeps the stored one. Anexecutionit does send needs anadapterand replaces the stored block whole, so anyselectorsorformat_bindingsit leaves out are no longer on the product: send the complete block you want.publisher_propertiesis replaced whole the same way, and[]clears it. -
The older open
inventory, whereoptionsandadapter_configare objects and any other key is passed through, still works for now. Send entries instead: the open form will be removed. -
statusisdraft,activeorarchived. Adraftis hidden from buyers. The result states the status the source gave the product. Savestatus: "active"when the product is ready. -
fixed_pricecan be0. A$0fixed price is a complete price that buyers can see and book, for donated, house or added-value inventory. It is not the same as leavingfixed_priceout: an option with nofixed_priceis an auction and keeps listing with no floor and no price guidance. Afixed_pricecannot be negative. Thefixed_pricestill has to be in your settlement currency to list. A$0price makes the product visible and bookable at that price. A buyer books it with a$0budget and states the delivery owed as an impressions goal, which reaches you as the package’simpressions. -
A create is validated against the source before anything is written. A
blocking finding stops the save and the result carries
saved: false,refused: "validation_failed"and the findings aserrors, each with acode, amessageand afieldwhen the source named one. Advisory findings do not block the save and come back aswarnings.
Check a create without saving it
AdddryRun: true to a create to validate it and write nothing. A valid
product returns saved: false, dryRun: true and valid: true. A change
cannot be dry-run, because a change carries only the fields you named and the
source validates complete products.
On a Google Ad Manager source, a valid dry run also returns
lineItemTargeting: the targeting every line item booked from the product
carries, exactly as Google Ad Manager will receive it. Use it to confirm a
product’s fixed targeting
before you make the product active.
Change a product
Pass the productid and only the fields you want to change. Every field you
omit keeps its stored value.
pricingOptionsare replaced whole. Send every price you want to keep.- If you change prices without a
deliveryType, the tool reads the product’s stored delivery type and uses it. - A change with
idand no other field is refused as nothing to change. - A change cannot empty
channels. - The fields
includedAgeSignalandaudienceEvidencefollow one rule: omit to keep, a value to replace,nullto clear. fixedTargetingchanges part by part; see Change fixed targeting.overlaySupportis kept when you omit it and replaced whole when you send it.
Take a product off the market, or delete it
status: "archived" stops buyers from seeing a product and is reversible. Save
status: "active" to bring the same product back.
delete: true removes the product from the source for good. The tool enforces
three conditions before it deletes:
- The product is
draftorarchived. Anactiveproduct is refused withrefused: "product_not_off_market"andnextAction: "archive_first". - You pass
confirmName, the product’s exact stored name. Read the product withget, show the operator its name, and send that name back. A wrong name is refused withname_confirmation_mismatch, and the stored name is not echoed to you. - The call carries no other field. A delete cannot also edit, and it cannot be dry-run.
action: "unchanged" with
code: "NOT_FOUND" instead of failing. Deleting does not touch the ad-server
inventory the product packaged. To sell that inventory again, create a new
product, which gets a new id.
Read the result
A successful save returnssaved: true with these fields:
A status of
active means the product is eligible. It does not prove buyers
can see it. Buyers read the storefront catalogue, which refreshes after the
save. Check buyer visibility with get once it has.
Find and inspect products
List a source’s products withsearch:
filter.productStatus is draft, active or archived. Each result has an
origin: ad_server for a product you author, modular_source for one a
modular source offers, and agent_source for one a third-party sales agent
publishes. You change the last two at their source.
A search without a sourceId lists the products of your ad-server and modular
sources and names the third-party sales agent sources it did not read. Pass one
of those as sourceId to list its products.
Read one product with get. It needs the sourceId:
inventory, channels,
formatOptions, pricingOptions, deliveryType and
prebidIntegrationActive. It also returns:
buyerVisibility, which isvisible, orhiddenwith the check that failed, such as a paused storefront, a catalogue that has not warmed, unresolved pricing, or no price in a storefront currency;inferredChannels, a guess made from the formats, shown only when you have declared none. It is never stored; andcomposerCompleteness.missing, the facts the proposal composer still needs. The composer can pitch an active product only when it has a channel, a canonical format and a priced option with a currency and delivery type.
Read a third-party sales agent’s products
A third-party sales agent holds its own products. Apostra keeps the last copy the agent published and serves it to buyers, sosearch and get with that
source’s sourceId list it, including each product’s formatOptions and
prices. The copy is read-only: change a product in the agent, and
save_wholesale_product on this source is refused.
The result says when the copy was last fetched. If the latest fetch failed, the
products from the last good fetch are still listed and the result says the copy
may be out of date. If nothing has been fetched yet, or the agent publishes no
catalogue Apostra can read, the search names the source as one it could not
read. That is not the same as the agent having no products. A sales agent need
not report a product status, so status can be unknown. The count line says
how many products have no status and does not count them as inactive;
buyerVisibility says whether buyers can find each product. Each product comes
back with origin: "agent_source".
Seller-fixed and buyer-chosen targeting
A wholesale product is the inventory it sells, the targeting you fix on it, and the targeting a buyer may add. On a Google Ad Manager product:Fix targeting on a product
fixedTargeting holds the targeting every line item booked from the product
carries:
geo.geo_countriestakes ISO 3166-1 alpha-2 codes, AdCP’sgeo_countries. Every line item runs in these countries. A buyer who names no country gets them, and a buyer who asks for a country outside them is refused, with the allowed countries named. Only countries can be fixed today.key_valuesnames your Google Ad Manager custom-targeting keys and values by their ids, as your inventory sync holds them. Anincludeentry targets the key with any of its values; anexcludeentry targets the key with none of them. Every entry applies to every line item, together. Give each key one entry acrossincludeandexclude, listing all its values there.- A key or value your inventory sync does not hold is refused, naming it.
- A buyer’s own targeting is added on top of the fixed targeting. It can narrow a buy, never remove or widen what you fixed.
- Fixed targeting is for Google Ad Manager sources; other sources refuse it.
Change fixed targeting
A change tofixedTargeting works part by part. The parts are geo,
key_values.include and key_values.exclude.
- Omit a part to keep it. Send a part to replace it. Send it as
nullto remove it;key_values: nullremoves both lists. - A change to one part never removes another. Changing the countries or the includes keeps the exclusions you have stored.
fixedTargeting: nullremoves all of it. LeavingfixedTargetingout of a change keeps all of it.- Empty values are refused:
{}forfixedTargetingorkey_values, and[]forincludeorexclude. Onlynullremoves. - A key can be in
includeorexclude, not both. A change that adds a key to one list while your stored other list holds it is refused, naming the key. - Line items already booked pick up the product’s current fixed key-values the next time their targeting is changed.
overlaySupport is the product’s AdCP overlay_support: the targeting
dimensions a buyer may set on a package. It is a permission, not a value, and
never adds targeting to a buy. To allow no buyer geography, leave the geo
dimensions out of it. See Targeting buyers can book.
Before you make the product active, dry-run it and read lineItemTargeting,
which shows the countries, key-values and exclusions exactly as Google Ad
Manager will receive them.
What the tool does with GAM selectors
- A GAM selector’s
selector_typeisad_unitorplacement. Any other type is refused withunsupported_selector_type. A key-value is fixed targeting, not a selector type. - A selector’s
optionson GAM takes one key:include_descendantson anad_unitselector. Any other option key is refused withunknown_selector_option, naming the key.
Targeting buyers can book
A product’s declared targeting, its AdCPoverlay_support, is what buyers can
set on a package for that product: dimensions such as countries, regions,
Nielsen DMA metros or a frequency cap, the metro and postal systems you list,
and any per-package limits. Set it with overlaySupport on
save_wholesale_product or in the product editor; the field rules are in
Create products from ad-server inventory.
Buyers read it on the product, so a declaration is a promise: your fixed prices
and floors still apply to every selection you allow. Buyers see
signal_targeting_groups only on a product that offers them signals to add
(signal_targeting_allowed: true), as AdCP requires. Property signals do not
count, because Apostra manages them, so a product whose only signals are
property signals is shown without the groups.
Every media buy is checked against the declaration when the buyer saves a
draft, books, or changes targeting, including targeting the package inherits
from its campaign. This happens before the buy reaches your approval queue or
your sales agent. A package that targets a dimension the product doesn’t
declare, a metro or postal system it doesn’t list, or more values than a
per-package limit allows is refused, and nothing reaches you. The buyer sees
the refusal straight away, naming the package, the product and the targeting.
Buys already running are not re-checked; a later targeting change to one is.
A product on your managed sales agent that you haven’t narrowed publishes the
targeting your ad server can apply, and buyers are held to it as they are to a
declaration you made yourself. It follows your ad server as its support changes.
A product on any other source that declares no targeting of its own isn’t
checked this way. Your seller-wide targeting applies to it, and your sales agent
still refuses anything your ad server can’t apply.
What buyers see, and the errors they get, is in
Targeting each product offers.
Limits
- The tool needs a Seller Account.
- V3 has no tool for bulk product creation, for the wholesale avails
percentile-CPM feed, or for searching ad-server selectors. Create products one
at a time with
save_wholesale_product.