--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads API and AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/YdX-TvizShs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adwords-api/b56288cb-0ff7-4ddd-91f4-12e7e9669a59n%40googlegroups.com.
Hi,
Thank you for reaching out to the Google Ads API support team.
Based on the information provided, it appears that you've passed 0 as the end hour and 23 as the start hour. Please note that startHour refers to the beginning of the day, while endHour represents the end of the day. Since these values were reversed 0 for end and 23 for start, the system triggered an error. As a correction, I recommend setting startHour to 0 and endHour to 23.
If you still persist with the issue even after following the above suggestion, please share the complete API logs (request and response with request-id and request header) generated at your end.
If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
You can send the details via Reply privately to the author option, or direct private reply to this email.
Hi,
When scheduling ads using the `AdScheduleInfo` criteria via the API, please note the following:
The `start_hour` can range from 0 to 23, inclusive. The `end_hour` can range from 0 to 24, where 24 signifies the end of the day. To schedule an ad from 23:00 to 24:00, set the `start_hour` to 23 and the `end_hour` to 24. I have successfully scheduled the ad campaign as per your requirements. A sample code snippet is provided below for your reference.
POST https://googleads.googleapis.com/v20/customers/5295995858/campaignCriteria:mutate?key=[YOUR_API_KEY] HTTP/1.1 developer-token: ********************** login-customer-id: 8878545793 Authorization: Bearer [YOUR_ACCESS_TOKEN] Accept: application/json Content-Type: application/json { "operations": [ { "create": { "campaign": "customers/5295995858/campaigns/20621915732", "adSchedule": { "startHour": 23, "startMinute": "ZERO", "endHour": 24, "endMinute": "ZERO", "dayOfWeek": "MONDAY" } } } ] } { "results": [ { "resourceName": "customers/5295995858/campaignCriteria/20621915732~309296" } ] }
I hope it helps.
![]() |
Google Ads API Team |
[2025-06-27 18:08:09Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01rgVEx:ref" (ADR-00316015)