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

Get campaign conversion goals

A Google campaign's conversion goals (CampaignConversionGoal, biddable per category and origin) and its goal config (ConversionGoalCampaignConfig): goalConfigLevel CUSTOMER means the campaign follows the account-default goals, CAMPAIGN means it uses its own goals or customConversionGoalId.


PlatformsGoogle
GET
/v1/ads/campaigns/{campaignId}/conversion-goals

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 campaign id

Match^\d+$

Response Body

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.getCampaignConversionGoals({  path: {    campaignId: 'campaign_abc123',  },});console.log(data);
{  "campaignId": "string",  "goalConfigLevel": "CUSTOMER",  "customConversionGoalId": "string",  "goals": [    {      "category": "string",      "origin": "string",      "biddable": true,      "resourceName": "string"    }  ],  "customerId": "string",  "cachedAt": "2019-08-24T14:15:22Z",  "stale": true}
Was this page helpful?

Read a campaign's ad schedule (dayparting)

The windows a Google campaign serves in, with the bid modifier on each, plus the criterion ids Google minted for them. An EMPTY `schedule` is meaningful and is not a failed lookup: Google has no "all day" criterion, so a campaign with no ad schedule serves around the clock. `servesAroundTheClock` states that explicitly. Set `includePerformance=true` to also get delivery split by day of week and by hour, which is the evidence for deciding what the schedule should be. It is one extra Google call segmented by both dimensions at once, so the two views always agree. Google Ads only. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.

Get a Performance Max asset group

One asset group with its linked assets, ad strength, primary status and listing-group tree. Uses a 10-minute cache, served stale when Google quota is exhausted; any write below clears it.