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, inventory and channels. 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.inventoryis the source’s own selector shape. V3 has no tool that searches selectors. Reuse theinventoryobject thatgetreturns for an existing product on the same source, or the values you already hold.statusisdraft,activeorarchived. Adraftis hidden from buyers. The result states the status the source gave the product. Savestatus: "active"when the product is ready.- 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.
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.
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, and modular_source for one a
modular source offers.
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.
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.