My Business
2.9K members online now
2.9K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

regularHours Closed for the day

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am using the GMB API in php to update locations. I have a location that is closed on sundays but If i send closed as the open and closed time it gives a 400 error for bad parameter.

 

My question is how do I mark a store closed for 1 specific day?

Below is how I am setting the open and closed times and days

 

$timePeriod->setOpenDay("MONDAY");
$timePeriod->setOpenTime("09:00");
$timePeriod->setCloseTime("21:00");
$timePeriod->setCloseDay("MONDAY");

 

this is how I am currently trying to send a closed day

$timePeriod->setOpenDay("SUNDAY");
$timePeriod->setOpenTime("CLOSED");
$timePeriod->setCloseTime("CLOSED");
$timePeriod->setCloseDay("SUNDAY");

1 Expert replyverified_user

Re: regularHours Closed for the day

Google Employee
# 2
Google Employee

Hi @Ryan P

 

In Google My Business API, the BusinessHours represents the time periods that this location is open for business. If your business is closed on Sundays then you don’t need to include the operating hours for this particular day in your code while creating/updating location.

 

Since the PHP client library doesn’t currently support the display of detailed error messages, you should follow the Make a simple HTTP request step-by-step guide on the Google Developers site to learn how to use the OAuth 2.0 Playground for troubleshooting errors with detailed error messages when sending requests with data via the Google My Business API.

 

Thanks,

Shalini