> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Declare the Scope3 Prebid module on a product

> Tell Apostra which wholesale products run the Scope3 Prebid module, with the prebidIntegrationActive field on save_wholesale_product.

The Prebid toggle is one field on `save_wholesale_product`:
`prebidIntegrationActive`. It declares that the Scope3 Prebid module runs on the
inventory a product sells. It does not install the module. Install it first,
using [Set up TMP with Prebid](/v2/storefront/tmp/prebid-setup), then declare
the products that serve through it.

<Warning>
  Apostra trusts this declaration and does not verify it. Set it to `true` only
  for a product whose inventory actually runs the module. If it is `true` where
  the module is not installed, the line items created for that product carry a
  targeting key that nothing populates, and they will not serve.
</Warning>

## Turn it on or off

Send the field with the product's `sourceId` and `id`. Nothing else is
required, so a call can change only the toggle.

```json theme={null}
{
  "sourceId": "SOURCE_ID",
  "id": "PRODUCT_ID",
  "prebidIntegrationActive": true
}
```

Send `false` to remove the declaration. Omit the field to leave the current
state unchanged. You can also send the field on a create or alongside other
changes, and the product write and the declaration go out in the same call. A
`delete` cannot carry it.

## Read the result

The declaration is applied after the product write succeeds. The result tells
you what happened to each half:

| Result | Meaning |
| - | - |
| `prebidIntegrationActive` and `prebidIntegrationChanged: true` | The declaration now holds this value, and this call changed it. |
| `prebidIntegrationActive` and `prebidIntegrationChanged: false` | The product already held this value. Nothing changed. |
| `prebidIntegrationError` | The product write succeeded, but the declaration was **not** applied. The string says why. Retry the toggle on its own. You do not need to repeat the product change. |

When you send the field, the result carries either the two success fields or
`prebidIntegrationError`, never both. When you do not send it, none of the three
appears.

## Read the current state

Read the product with `get` and look at `prebidIntegrationActive`. It is `true`
or `false`.

```json theme={null}
{ "kind": "wholesale_product", "id": "PRODUCT_ID", "sourceId": "SOURCE_ID" }
```

## What the declaration changes

When a product is declared active, the line item that a buyer's media buy
creates on that product is gated on a package-ID targeting key. Only traffic
that the module has enriched carries that key. When the product is not
declared, the key is skipped and the line item serves without that gate.

A change applies to media buys forwarded after you make it. Active buys that
already exist on the product are not gated retroactively.

## Limits

* The tool needs a Seller Account.
* It works on products you author on an ad-server source that Apostra manages.
  It refuses a modular source, a linked storefront and a third-party sales
  agent as described in
  [Create and manage seller products](/v3/seller-product-creation#which-sources-hold-products-you-can-author).
  For a third-party sales agent, declare the same flag in your own agent's
  `get_products` response, because Apostra does not manage those products.
* There is no V3 tool for the rest of the TMP setup, such as the Google Ad
  Manager targeting keys. Follow the setup page for those.

## Related

* [Set up TMP with Prebid](/v2/storefront/tmp/prebid-setup)
* [Real-time targeting (TMP)](/v2/storefront/tmp/overview)
* [Create and manage seller products](/v3/seller-product-creation)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.