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
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
esaId | integer | Yes | Path. Embedded sales-agent connection id |
name | string | Yes | Advertiser name to create or match, 1–255 chars |
dryRun | boolean | No | When true, report what would happen without creating. Defaults to false |
Response
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_ERROR—nameis empty or over 255 chars,esaIdis not a positive integer, or the ESA is not Google Ad Manager-backed.
Related
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