cURL
curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selections": [
{
"apple_brand_id": "<string>",
"account_id": "<string>"
}
]
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect"
payload = { "selections": [
{
"apple_brand_id": "<string>",
"account_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({selections: [{apple_brand_id: '<string>', account_id: '<string>'}]})
};
fetch('https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect', 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/oauth/apple/companies/{apple_company_id}/brands/connect",
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([
'selections' => [
[
'apple_brand_id' => '<string>',
'account_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/oauth/apple/companies/{apple_company_id}/brands/connect"
payload := strings.NewReader("{\n \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\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/oauth/apple/companies/{apple_company_id}/brands/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect")
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 \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"apple_company_id": "COMPANY123",
"segments_created": 1,
"segments_updated": 0
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Apple Brands
Connect Apple Company Brands
Links existing Apple brands to accounts (location groups) by creating or updating a brand segment for each selection. Does not create a brand in Apple. Brands omitted from selections stay unlinked. An unknown apple_brand_id fails the whole request and writes nothing. On success the company’s abc_connection_state becomes CONNECTED.
POST
/
oauth
/
apple
/
companies
/
{apple_company_id}
/
brands
/
connect
cURL
curl --request POST \
--url https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selections": [
{
"apple_brand_id": "<string>",
"account_id": "<string>"
}
]
}
'import requests
url = "https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect"
payload = { "selections": [
{
"apple_brand_id": "<string>",
"account_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({selections: [{apple_brand_id: '<string>', account_id: '<string>'}]})
};
fetch('https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect', 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/oauth/apple/companies/{apple_company_id}/brands/connect",
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([
'selections' => [
[
'apple_brand_id' => '<string>',
'account_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/oauth/apple/companies/{apple_company_id}/brands/connect"
payload := strings.NewReader("{\n \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\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/oauth/apple/companies/{apple_company_id}/brands/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/oauth/apple/companies/{apple_company_id}/brands/connect")
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 \"selections\": [\n {\n \"apple_brand_id\": \"<string>\",\n \"account_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"apple_company_id": "COMPANY123",
"segments_created": 1,
"segments_updated": 0
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Restricted endpoint. Apple Business Connect endpoints are only available to billing accounts that have been explicitly granted access by the GMBapi team. Calling this endpoint without that permission returns
403 Forbidden with APPLE_API_DISABLED. Contact GMBapi support if you need access.Requires an Organization token. Calling this endpoint with an Account token returns
403 Forbidden (Authorization level not found).selections accepts 1 to 200 items. Brands you leave out stay unlinked and can be connected later with the same endpoint. If any apple_brand_id is not on Apple’s current list, the request fails and nothing is written — refresh the list and retry.
A new segment is counted in segments_created. Selecting a brand that already has a segment updates it (including moving it to the account_id you send) and counts it in segments_updated.
On success the company’s abc_connection_state becomes CONNECTED, including when some of its brands were left out. The response does not include segment ids. Call the list endpoint again: linked brands come back with connected: true and a segment_id you can use on the other Apple Brands endpoints.
Categories on the new segment
A newly linked segment stores Apple’s category ids (categories from the list) as primary_category, additional_categories, and apple_categories. A brand that already has a segment keeps its existing primary_category and additional_categories. apple_categories is refreshed from Apple either way.
New segments are tagged provision_source: external_api. Re-linking a segment does not change the source that created it.
Responses
| Status | Meaning |
|---|---|
200 | Segments created and/or updated. payload includes apple_company_id, segments_created, and segments_updated. |
400 | selections is missing, empty, or longer than 200; a selection is missing apple_brand_id or account_id; or an apple_brand_id is not on the company’s live brand list. |
404 | The company is not connected to this organization, or an account_id does not belong to it (Account(s) not found: ...). |
| Apple’s status | Apple rejected the brand list. The response status and body are Apple’s, not a generic 500. Nothing is written. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Apple Business Connect company id already linked to the organization.
Body
application/json
Brands to link. Brands omitted from this list stay unlinked.
Required array length:
1 - 200 elementsShow child attributes
Show child attributes