curl --request PATCH \
--url https://api.gmbapi.com/external-api/gmb/location/validate/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "GMBapi Coffee Shop",
"address": "Bakkerstraat 38A",
"postal": "5612EP",
"city": "Eindhoven",
"country_code": "NL",
"administrative_area": "North Brabant",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries",
"phone_number": "+31627511129",
"additional_phone_numbers": [
"+31627511130"
],
"website_uri": "https://gmbapi.com",
"regular_hours": [
{
"open_day": "MONDAY",
"close_day": "MONDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "TUESDAY",
"close_day": "TUESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "00",
"minutes": "00"
}
},
{
"open_day": "WEDNESDAY",
"close_day": "WEDNESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "03",
"minutes": "00"
}
},
{
"open_day": "THURSDAY",
"close_day": "THURSDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "05",
"minutes": "00"
}
}
],
"categories": {
"primaryCategory": {
"name": "gcid:coffee_shop",
"displayName": "Coffee shop"
},
"additionalCategories": [
{
"name": "gcid:cafe",
"displayName": "Cafe"
}
]
}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/location/validate/update"
payload = {
"name": "GMBapi Coffee Shop",
"address": "Bakkerstraat 38A",
"postal": "5612EP",
"city": "Eindhoven",
"country_code": "NL",
"administrative_area": "North Brabant",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries",
"phone_number": "+31627511129",
"additional_phone_numbers": ["+31627511130"],
"website_uri": "https://gmbapi.com",
"regular_hours": [
{
"open_day": "MONDAY",
"close_day": "MONDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "TUESDAY",
"close_day": "TUESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "00",
"minutes": "00"
}
},
{
"open_day": "WEDNESDAY",
"close_day": "WEDNESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "03",
"minutes": "00"
}
},
{
"open_day": "THURSDAY",
"close_day": "THURSDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "05",
"minutes": "00"
}
}
],
"categories": {
"primaryCategory": {
"name": "gcid:coffee_shop",
"displayName": "Coffee shop"
},
"additionalCategories": [
{
"name": "gcid:cafe",
"displayName": "Cafe"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'GMBapi Coffee Shop',
address: 'Bakkerstraat 38A',
postal: '5612EP',
city: 'Eindhoven',
country_code: 'NL',
administrative_area: 'North Brabant',
description: 'A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries',
phone_number: '+31627511129',
additional_phone_numbers: ['+31627511130'],
website_uri: 'https://gmbapi.com',
regular_hours: [
{
open_day: 'MONDAY',
close_day: 'MONDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '17', minutes: '00'}
},
{
open_day: 'TUESDAY',
close_day: 'TUESDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '00', minutes: '00'}
},
{
open_day: 'WEDNESDAY',
close_day: 'WEDNESDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '03', minutes: '00'}
},
{
open_day: 'THURSDAY',
close_day: 'THURSDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '17', minutes: '00'}
},
{
open_day: 'FRIDAY',
close_day: 'FRIDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '05', minutes: '00'}
}
],
categories: {
primaryCategory: {name: 'gcid:coffee_shop', displayName: 'Coffee shop'},
additionalCategories: [{name: 'gcid:cafe', displayName: 'Cafe'}]
}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/location/validate/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gmbapi.com/external-api/gmb/location/validate/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'GMBapi Coffee Shop',
'address' => 'Bakkerstraat 38A',
'postal' => '5612EP',
'city' => 'Eindhoven',
'country_code' => 'NL',
'administrative_area' => 'North Brabant',
'description' => 'A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries',
'phone_number' => '+31627511129',
'additional_phone_numbers' => [
'+31627511130'
],
'website_uri' => 'https://gmbapi.com',
'regular_hours' => [
[
'open_day' => 'MONDAY',
'close_day' => 'MONDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '17',
'minutes' => '00'
]
],
[
'open_day' => 'TUESDAY',
'close_day' => 'TUESDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '00',
'minutes' => '00'
]
],
[
'open_day' => 'WEDNESDAY',
'close_day' => 'WEDNESDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '03',
'minutes' => '00'
]
],
[
'open_day' => 'THURSDAY',
'close_day' => 'THURSDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '17',
'minutes' => '00'
]
],
[
'open_day' => 'FRIDAY',
'close_day' => 'FRIDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '05',
'minutes' => '00'
]
]
],
'categories' => [
'primaryCategory' => [
'name' => 'gcid:coffee_shop',
'displayName' => 'Coffee shop'
],
'additionalCategories' => [
[
'name' => 'gcid:cafe',
'displayName' => 'Cafe'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/location/validate/update"
payload := strings.NewReader("{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gmbapi.com/external-api/gmb/location/validate/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/location/validate/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"validationIssues": []
}Validate Google Update
Validates location update data against Google Business Profile API requirements without making actual changes. Use this endpoint to check if your updates will be accepted before calling the update endpoint. Handles phone number combinations, regular hours, and service items validation.
curl --request PATCH \
--url https://api.gmbapi.com/external-api/gmb/location/validate/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "GMBapi Coffee Shop",
"address": "Bakkerstraat 38A",
"postal": "5612EP",
"city": "Eindhoven",
"country_code": "NL",
"administrative_area": "North Brabant",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries",
"phone_number": "+31627511129",
"additional_phone_numbers": [
"+31627511130"
],
"website_uri": "https://gmbapi.com",
"regular_hours": [
{
"open_day": "MONDAY",
"close_day": "MONDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "TUESDAY",
"close_day": "TUESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "00",
"minutes": "00"
}
},
{
"open_day": "WEDNESDAY",
"close_day": "WEDNESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "03",
"minutes": "00"
}
},
{
"open_day": "THURSDAY",
"close_day": "THURSDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "05",
"minutes": "00"
}
}
],
"categories": {
"primaryCategory": {
"name": "gcid:coffee_shop",
"displayName": "Coffee shop"
},
"additionalCategories": [
{
"name": "gcid:cafe",
"displayName": "Cafe"
}
]
}
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/location/validate/update"
payload = {
"name": "GMBapi Coffee Shop",
"address": "Bakkerstraat 38A",
"postal": "5612EP",
"city": "Eindhoven",
"country_code": "NL",
"administrative_area": "North Brabant",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries",
"phone_number": "+31627511129",
"additional_phone_numbers": ["+31627511130"],
"website_uri": "https://gmbapi.com",
"regular_hours": [
{
"open_day": "MONDAY",
"close_day": "MONDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "TUESDAY",
"close_day": "TUESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "00",
"minutes": "00"
}
},
{
"open_day": "WEDNESDAY",
"close_day": "WEDNESDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "03",
"minutes": "00"
}
},
{
"open_day": "THURSDAY",
"close_day": "THURSDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "17",
"minutes": "00"
}
},
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": {
"hours": "09",
"minutes": "00"
},
"close_time": {
"hours": "05",
"minutes": "00"
}
}
],
"categories": {
"primaryCategory": {
"name": "gcid:coffee_shop",
"displayName": "Coffee shop"
},
"additionalCategories": [
{
"name": "gcid:cafe",
"displayName": "Cafe"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'GMBapi Coffee Shop',
address: 'Bakkerstraat 38A',
postal: '5612EP',
city: 'Eindhoven',
country_code: 'NL',
administrative_area: 'North Brabant',
description: 'A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries',
phone_number: '+31627511129',
additional_phone_numbers: ['+31627511130'],
website_uri: 'https://gmbapi.com',
regular_hours: [
{
open_day: 'MONDAY',
close_day: 'MONDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '17', minutes: '00'}
},
{
open_day: 'TUESDAY',
close_day: 'TUESDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '00', minutes: '00'}
},
{
open_day: 'WEDNESDAY',
close_day: 'WEDNESDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '03', minutes: '00'}
},
{
open_day: 'THURSDAY',
close_day: 'THURSDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '17', minutes: '00'}
},
{
open_day: 'FRIDAY',
close_day: 'FRIDAY',
open_time: {hours: '09', minutes: '00'},
close_time: {hours: '05', minutes: '00'}
}
],
categories: {
primaryCategory: {name: 'gcid:coffee_shop', displayName: 'Coffee shop'},
additionalCategories: [{name: 'gcid:cafe', displayName: 'Cafe'}]
}
})
};
fetch('https://api.gmbapi.com/external-api/gmb/location/validate/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gmbapi.com/external-api/gmb/location/validate/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'GMBapi Coffee Shop',
'address' => 'Bakkerstraat 38A',
'postal' => '5612EP',
'city' => 'Eindhoven',
'country_code' => 'NL',
'administrative_area' => 'North Brabant',
'description' => 'A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries',
'phone_number' => '+31627511129',
'additional_phone_numbers' => [
'+31627511130'
],
'website_uri' => 'https://gmbapi.com',
'regular_hours' => [
[
'open_day' => 'MONDAY',
'close_day' => 'MONDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '17',
'minutes' => '00'
]
],
[
'open_day' => 'TUESDAY',
'close_day' => 'TUESDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '00',
'minutes' => '00'
]
],
[
'open_day' => 'WEDNESDAY',
'close_day' => 'WEDNESDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '03',
'minutes' => '00'
]
],
[
'open_day' => 'THURSDAY',
'close_day' => 'THURSDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '17',
'minutes' => '00'
]
],
[
'open_day' => 'FRIDAY',
'close_day' => 'FRIDAY',
'open_time' => [
'hours' => '09',
'minutes' => '00'
],
'close_time' => [
'hours' => '05',
'minutes' => '00'
]
]
],
'categories' => [
'primaryCategory' => [
'name' => 'gcid:coffee_shop',
'displayName' => 'Coffee shop'
],
'additionalCategories' => [
[
'name' => 'gcid:cafe',
'displayName' => 'Cafe'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/location/validate/update"
payload := strings.NewReader("{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gmbapi.com/external-api/gmb/location/validate/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/location/validate/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"GMBapi Coffee Shop\",\n \"address\": \"Bakkerstraat 38A\",\n \"postal\": \"5612EP\",\n \"city\": \"Eindhoven\",\n \"country_code\": \"NL\",\n \"administrative_area\": \"North Brabant\",\n \"description\": \"A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries\",\n \"phone_number\": \"+31627511129\",\n \"additional_phone_numbers\": [\n \"+31627511130\"\n ],\n \"website_uri\": \"https://gmbapi.com\",\n \"regular_hours\": [\n {\n \"open_day\": \"MONDAY\",\n \"close_day\": \"MONDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"TUESDAY\",\n \"close_day\": \"TUESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"00\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"WEDNESDAY\",\n \"close_day\": \"WEDNESDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"03\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"THURSDAY\",\n \"close_day\": \"THURSDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"17\",\n \"minutes\": \"00\"\n }\n },\n {\n \"open_day\": \"FRIDAY\",\n \"close_day\": \"FRIDAY\",\n \"open_time\": {\n \"hours\": \"09\",\n \"minutes\": \"00\"\n },\n \"close_time\": {\n \"hours\": \"05\",\n \"minutes\": \"00\"\n }\n }\n ],\n \"categories\": {\n \"primaryCategory\": {\n \"name\": \"gcid:coffee_shop\",\n \"displayName\": \"Coffee shop\"\n },\n \"additionalCategories\": [\n {\n \"name\": \"gcid:cafe\",\n \"displayName\": \"Cafe\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"validationIssues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Account ID. Required when using an organization token.
Location ID to validate updates for
If set to 'true', combines new service items with existing ones. If 'false', replaces all service items.
true, false Body
Location fields to validate. Only include fields you want to validate for updates. Phone numbers (primary and additional) must be validated together per Google API requirements.
The name of the location
The street address of the location
The postal code of the location
City of the location
The ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'NL')
The administrative area, state, or province
The description of the location (max 750 characters)
Primary phone number of the location. Must be updated together with additional_phone_numbers per Google API requirements.
Array of additional phone numbers (max 2). Must be updated together with phone_number per Google API requirements.
2Website URL of the location
Regular business hours
Show child attributes
Show child attributes
Special hours for holidays or events
Show child attributes
Show child attributes
Additional hours types (e.g., ACCESS, BREAKFAST, DELIVERY, TAKEOUT, DRIVE_THROUGH)
Show child attributes
Show child attributes
[
{
"hoursTypeId": "ACCESS",
"periods": [
{
"open_day": "MONDAY",
"close_day": "MONDAY",
"open_time": { "hours": "9", "minutes": null },
"close_time": { "hours": "17", "minutes": null }
},
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": { "hours": "9", "minutes": null },
"close_time": { "hours": "17", "minutes": null }
}
]
},
{
"hoursTypeId": "BREAKFAST",
"periods": [
{
"open_day": "FRIDAY",
"close_day": "FRIDAY",
"open_time": { "hours": "9", "minutes": null },
"close_time": { "hours": "17", "minutes": null }
}
]
}
]
Business categories
Show child attributes
Show child attributes
Services offered by the business
Show child attributes
Show child attributes
Service area for businesses that serve customers at their locations
Show child attributes
Show child attributes