Get hierarchy for an enterprise
curl --request GET \
--url https://api.birdeye.com/resources/v1/business/{businessId}/hierarchyimport requests
url = "https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy', 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.birdeye.com/resources/v1/business/{businessId}/hierarchy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 143424324234234,
"name": "Psychiatry",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Department",
"websiteUrl": null,
"child": [
{
"id": 147293020095434,
"name": "Addiction Psychiatry",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Specialty",
"websiteUrl": null,
"child": [
{
"id": 147293022348715,
"name": "NYC Center for Treatment and Research",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Practice",
"websiteUrl": null,
"child": [
{
"id": 1467324432430144,
"name": "Anna B. B., M.D",
"alias": "Anna B. B., M.D",
"address": {
"address1": "NYC Center for Treatment and Research",
"address2": "561 West 35th Street, 11th Floor",
"subLocality": "Auckland CBD",
"city": "New York",
"state": "NY",
"zip": "10036",
"countryCode": "US",
"countryName": "United States of America"
},
"phone": "646-xxx-xxxx ",
"status": "active",
"createdOn": "Jun 30, 2016",
"type": "Physician",
"websiteUrl": "https://google.org/abbnyc",
"child": []
}
]
}
]
}
],
"parents": [
{
"id": 148189355091299,
"name": "Neurology",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Dec 16, 2016",
"type": "Specialty",
"websiteUrl": null,
"tags": null,
"child": [],
"parents": []
}
]
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 89,
"message": "Rate limit exceeded"
}Business
Get Hierarchy
Get Hierarchy API gets business hierarchy. Hierarchical information contains the parent-child relationship information between businesses.
GET
/
v1
/
business
/
{businessId}
/
hierarchy
Get hierarchy for an enterprise
curl --request GET \
--url https://api.birdeye.com/resources/v1/business/{businessId}/hierarchyimport requests
url = "https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy', 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.birdeye.com/resources/v1/business/{businessId}/hierarchy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/business/{businessId}/hierarchy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 143424324234234,
"name": "Psychiatry",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Department",
"websiteUrl": null,
"child": [
{
"id": 147293020095434,
"name": "Addiction Psychiatry",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Specialty",
"websiteUrl": null,
"child": [
{
"id": 147293022348715,
"name": "NYC Center for Treatment and Research",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Sep 03, 2016",
"type": "Practice",
"websiteUrl": null,
"child": [
{
"id": 1467324432430144,
"name": "Anna B. B., M.D",
"alias": "Anna B. B., M.D",
"address": {
"address1": "NYC Center for Treatment and Research",
"address2": "561 West 35th Street, 11th Floor",
"subLocality": "Auckland CBD",
"city": "New York",
"state": "NY",
"zip": "10036",
"countryCode": "US",
"countryName": "United States of America"
},
"phone": "646-xxx-xxxx ",
"status": "active",
"createdOn": "Jun 30, 2016",
"type": "Physician",
"websiteUrl": "https://google.org/abbnyc",
"child": []
}
]
}
]
}
],
"parents": [
{
"id": 148189355091299,
"name": "Neurology",
"alias": null,
"address": null,
"phone": null,
"status": "active",
"createdOn": "Dec 16, 2016",
"type": "Specialty",
"websiteUrl": null,
"tags": null,
"child": [],
"parents": []
}
]
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 89,
"message": "Rate limit exceeded"
}Headers
e.g. application/json
e.g. [Required] Partner specific API key provided by Birdeye for data exchange.
Path Parameters
Id of the Business.
⌘I