Skip to content

Can't use PATCH for Business Information #6605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
richardczeiger opened this issue May 1, 2025 · 0 comments
Open

Can't use PATCH for Business Information #6605

richardczeiger opened this issue May 1, 2025 · 0 comments

Comments

@richardczeiger
Copy link

richardczeiger commented May 1, 2025

Hi there,
I've gotten pretty much everything working nicely except for any function requiring HTTP: PATCH.
For example, updating Location data for a Google Business Profile.
Here's my code:

$locationData = (object) [
	'title' => "MY_NEW_LOCATION_PROFILE_TITLE"
];
$locationData = json_encode($locationData);

$locationName 		= 'locations/###################'; // Checked and confirmed using get()!
$params['updateMask'] 	= 'title'; // Field updated 
$serviceBusiness 	= new Google_Service_MyBusinessBusinessInformation($client);
$updateLocation 	= $serviceBusiness->locations->patch($locationName, $locationData, $params);
vard_dump($updateLocation);

The $client is good because I can run locations->get() and accounts_locations->listAccountsLocations() and even categories->listCategories() without issue. I confirmed the $locationName using locations->get().

But for some reason locations->patch() always dies. I believe it is because of the PATCH http type (as opposed to GET or POST).

Any ideas??

Cheers,
Richard :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant