cURL
curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"location_id": "<string>"
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations"
payload = {
"account_id": "<string>",
"location_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', location_id: '<string>'})
};
fetch('https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations', 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/apple/brands/{segment_id}/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => '<string>',
'location_id' => '<string>'
]),
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/apple/brands/{segment_id}/locations"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"segment_id": "brand-550e8400-e29b-41d4-a716-446655440000",
"id": "accounts/123-locations/456",
"account_id": "123",
"location_id": "456",
"status": "SYNCED",
"apple_location_id": "LOC789",
"abc_state": "SUBMITTED",
"abc_link": null,
"abc_error_submitting": 0,
"abc_error_fields": [],
"is_state_final": false
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Apple Brands
Add Location To Apple Brand
Adds an existing location to the brand. The location’s Google primary category must map to the same Apple category as the brand. Returns SYNCED or ALREADY_SYNCED. Returns 409 if the location belongs to another brand or a sync is already in progress.
POST
/
apple
/
brands
/
{segment_id}
/
locations
cURL
curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"location_id": "<string>"
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations"
payload = {
"account_id": "<string>",
"location_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '<string>', location_id: '<string>'})
};
fetch('https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations', 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/apple/brands/{segment_id}/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => '<string>',
'location_id' => '<string>'
]),
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/apple/brands/{segment_id}/locations"
payload := strings.NewReader("{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/apple/brands/{segment_id}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"<string>\",\n \"location_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"segment_id": "brand-550e8400-e29b-41d4-a716-446655440000",
"id": "accounts/123-locations/456",
"account_id": "123",
"location_id": "456",
"status": "SYNCED",
"apple_location_id": "LOC789",
"abc_state": "SUBMITTED",
"abc_link": null,
"abc_error_submitting": 0,
"abc_error_fields": [],
"is_state_final": false
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Restricted. Requires Apple API access. Returns
403 with APPLE_API_DISABLED otherwise.Requires an Organization token.
SYNCED on a successful push, or ALREADY_SYNCED if the location is already on this brand. Returns 409 if the location belongs to another brand, or if a sync is already in progress.
Poll Get Apple Brand Location Sync Status until is_state_final is true if you need Apple’s published state.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Brand segment id (brand-<uuid>)
Body
application/json