Zernio
Zernio
API Reference

Campaigns and Ads

Overview

Get campaign treeGETGet daily account metricsGET

Campaigns

List campaignsGETCreate a standalone campaignPOSTUpdate a campaignPUTDuplicate a campaignPOSTDelete a campaignDELETEPause or resume a campaignPUTPause or resume many campaignsPOSTList campaign assetsGETAttach campaign assetsPOSTUpdate campaign assetsPUTRemove campaign assetsDELETERead a Google campaign's device, location, and language targetingGETEdit a Google campaign's device, location, or language targetingPUTList Performance Max asset groupsGET

Ad Sets

List ad setsGETCreate a standalone ad groupPOSTGet live ad-set detailsGETUpdate an ad setPUTDuplicate an ad setPOSTDelete an ad setDELETEPause or resume a single ad setPUTList ad-group assetsGETAttach ad-group assetsPOSTUpdate ad-group assetsPUTRemove ad-group assetsDELETE

Ads

List adsGETGet ad detailsGETCreate standalone adPOSTBoost post as adPOSTUpdate adPUTDuplicate an adPOSTCancel an adDELETEPause or resume a single adPUT

Keywords

List Search keywordsGETAdd Search ad-group keywordsPOSTPause or enable a Search keywordPATCHRemove a Search keywordDELETEList campaign-level negative keywordsGETReplace campaign-level negative keywordsPUTList campaign negative listsGETReplace campaign negative listsPUT

Bidding

Read a campaign's current biddingGETList portfolio bid strategiesGETCreate portfolio bid strategyPOSTUpdate portfolio bid strategyPATCH

Other

Create a Performance Max asset groupPOSTLink or unlink asset group assetsPOSTGet live campaign detailsGETRead a campaign's ad schedule (dayparting)GETGet campaign conversion goalsGETGet a Performance Max asset groupGETRemove a Performance Max asset groupDELETEReplace an asset group's listing-group treePUTReplace a campaign's ad schedule (dayparting)PUTUpdate campaign conversion goalsPATCHUpdate a Performance Max asset groupPATCH
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Campaigns and Ads

Replace an asset group's listing-group tree

Replace the product (listing-group) tree of a Performance Max retail asset group. The current tree is removed and the new one created in one atomic request. Read the current tree with GET on the asset group. Requires a campaign linked to Merchant Center; other campaigns return 400 LISTING_SOURCE_NOT_ALLOWED from Google. validateOnly: true validates without writing.


PlatformsGoogle
PUT
/v1/ads/campaigns/{campaignId}/asset-groups/{assetGroupId}/listing-group-filters

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

campaignId*string

Google Ads campaign id.

Match^\d+$
assetGroupId*string

Google asset group id.

Match^\d+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.replaceGoogleListingGroupFilters({  path: {    campaignId: 'campaign_abc123',    assetGroupId: 'assetgroup_abc123',  },  body: {    tree: {      children: [        {          dimension: {            productBrand: {              value: 'Acme',            },          },        },        {          dimension: {            productBrand: {},          },          excluded: true,        },      ],    },  },});console.log(data);
{  "assetGroupId": "string",  "removed": 0,  "created": 0,  "validateOnly": true}
Was this page helpful?

Remove a Performance Max asset group

Removes the asset group on Google (status REMOVED, not reversible). Pass validateOnly=true to validate without removing.

Replace a campaign's ad schedule (dayparting)

Replaces the campaign's whole ad schedule with the windows you send. This is a REPLACE, not a merge: windows you leave out stop serving. Send `schedule: []` to clear dayparting, which returns the campaign to serving around the clock. Google rules enforced here, so you get a named field instead of a criterion error: at most 6 windows per day, a window must end after it starts, windows on the same day may not overlap, `endHour` 24 is midnight and cannot carry minutes, and minutes are quarter-hours only (0, 15, 30, 45). `bidModifier` is 0.1-10.0; Google's 0 means "off" for devices only, so a window is switched off by leaving it out. Windows are half-open (Google is exclusive of the end minute), so 09:00-12:00 and 12:00-17:00 on the same day are adjacent and both valid. Google cannot edit an ad schedule in place (every AdScheduleInfo field is prohibited on update), so this removes the live criteria and creates the new ones in a single atomic mutate. The response is read back from Google and carries the new criterion ids.

tree*

The root of a Performance Max retail listing-group tree (listing source SHOPPING). No children targets all products. Requires a campaign linked to Merchant Center.

validateOnly?boolean
Defaultfalse