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.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Numeric Google platform campaign id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
{ "campaignId": "string", "schedule": [ { "criterionId": "string", "resourceName": "string", "dayOfWeek": "MONDAY", "startHour": 0, "startMinute": 0, "endHour": 0, "endMinute": 0, "bidModifier": 0 } ], "servesAroundTheClock": true}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.
List a catalog's product sets
Lists a Meta product catalog's product sets, the unit a catalog ad promotes. Pass the chosen set id, not the parent catalog id, as `promotedObject.productSetId` on POST /v1/ads/create with `goal: catalog_sales`. Creation verifies set visibility and returns 400 for a catalog id or an inaccessible set.