Skip to main content
POST /api/v2/storefront/esa/{esaId}/gam/advertisers/ensure Creates or finds a Google Ad Manager advertiser by name on a GAM-backed embedded sales agent. Use it to provision a catch-all advertiser before setting the default, or to mint a per-buyer advertiser. The returned advertiser.id can be passed straight to the default-advertiser or buyer-mapping endpoints. Set dryRun to preview without creating.

Request

curl -X POST https://api.interchange.io/api/v2/storefront/esa/123/gam/advertisers/ensure \
  -H "Authorization: Bearer $SCOPE3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Interchange Catch-All" }'

Parameters

FieldTypeRequiredNotes
esaIdintegerYesPath. Embedded sales-agent connection id
namestringYesAdvertiser name to create or match, 1–255 chars
dryRunbooleanNoWhen true, report what would happen without creating. Defaults to false

Response

{
  "advertiser": {
    "id": "4567890123",
    "name": "Interchange Catch-All",
    "status": "ACTIVE",
    "currencyCode": "USD"
  },
  "created": true,
  "dryRun": false
}
created is true when a new advertiser was created and false when an existing one was matched by name. dryRun echoes whether the call was a preview. Pass advertiser.id as gamAdvertiserId to the default-advertiser or buyer-mapping endpoints.

Errors

  • 400 VALIDATION_ERRORname is empty or over 255 chars, esaId is not a positive integer, or the ESA is not Google Ad Manager-backed.
See Errors for the full error contract.

Buyer routing tasks

All buyer-routing operations

List GAM advertisers

Browse cached advertiser records

Set default advertiser

Use this advertiser as the catch-all

Create buyer mapping

Route a buyer to this advertiser