Update campaign conversion goals
Sets biddable on campaign goals, switches goalConfigLevel, and/or points the
campaign at a custom conversion goal, in one mutate. customConversionGoalId: null
clears it; Google refuses that (400) while the campaign stays at CAMPAIGN level with
no biddable goals, so send goalConfigLevel: CUSTOMER with it to fall back to the
account goals. Returns the re-read campaign goals.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Google campaign id
^\d+$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= propertiesResponse 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.updateCampaignConversionGoals({ path: { campaignId: 'campaign_abc123', }, body: { goals: [ { category: 'string', origin: 'string', biddable: false, }, ], goalConfigLevel: 'CUSTOMER', customConversionGoalId: {}, },});console.log(data);{ "campaignId": "string", "goalConfigLevel": "CUSTOMER", "customConversionGoalId": "string", "goals": [ { "category": "string", "origin": "string", "biddable": true, "resourceName": "string" } ], "customerId": "string"}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.
Update a Performance Max asset group
Change the name, status (ENABLED or PAUSED), final URLs or display paths. Only the fields sent are written; null on path1 or path2 clears it. Change assets with the /assets endpoint and product targeting with /listing-group-filters. validateOnly: true validates without writing.