> ## Documentation Index
> Fetch the complete documentation index at: https://docs.birdeye.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Hierarchy v2

> Get Hierarchy v2 API returns the business hierarchy of an enterprise or a location as a lightweight tree. Pass the business number of an enterprise or of a location in the `x-business-number` header. Each node represents a value of a hierarchy level (for example a region or a city), and the nodes below it are returned under `children`.

The businesses mapped to a node are returned as identifiers only (`businessIds` and `businessNumbers`). Details such as the business name and address are not included, which keeps the response small even for large enterprises. Use the Get Child Businesses API to fetch business details. Compared to Get Hierarchy, which also returns business details, this API is faster and returns a much smaller response.

Level names and values come from the hierarchy configured for the account. They carry no built-in meaning: for example, a value named `Inactive` is a regular hierarchy value that lists the businesses mapped to it.



## OpenAPI

````yaml api/openapi.yaml GET /v2/business/hierarchy/info
openapi: 3.0.0
info:
  title: Birdeye
  version: 0.0.1
  description: >-
    Birdeye helps businesses grow through happy customers. Over 80,000
    businesses use Birdeye everyday to attract new leads with Listings, Reviews
    and Referrals, convert them into customers with Webchat, Appointments, and
    Payments, and delight those customers with Surveys, Ticketing, and Insights
    - all in one place.


    The Birdeye APIs are built on HTTP and are RESTful APIs.


    * Uses resource-oriented URLs.


    * Uses built-in HTTP capabilities for passing parameters and authentication.


    * Responds with standard HTTP response codes to indicate errors.


    * Requests and responses payload attached with all the mentioned APIs, you
    may choose your preferred language per the integration requirement.


    ### Authentication and Rate limiting


    > __NOTE:__

    > - __All API requests targeting business accounts must include the
    x-api-key header. This header is required and mandatory for successful
    authentication and access to the API endpoints.__

    >

    > - __To protect your API key and prevent unauthorized access, please ensure
    all API requests are made from your backend server. Do not call the APIs
    directly from the browser or expose your API key in any client-side code.__


    To call a Birdeye API, you need a valid API key. It can be fetched via the
    Birdeye dashboard and is a confidential key.


    There is a limit to calling APIs with each API key [connect with the support
    team to get the current limit]. If too many requests are made within the
    threshold timeframe, an error will be returned in the response.


    ### Pagination


    Multiple API supporting pagination. These APIs have two parameters sindex
    and count.


    * <b>sindex:</b> is the start index


    * <b>count:</b> No. of records, you want to fetch.


    > __Note__

    > - _Deep Pagination with record window greater than 100k is not supported.
    Either reduce the sindex + count to be less than equal to 100k or use
    appropriate filters to narrow down your result set._


    <b>For example :</b>


    * Suppose you have to fetch 20 records:

    <pre><code>

    API call 1 -> sindex=0, count 10

    API call 2 -> sindex -> 10, count 10.

    </pre></code>


    * To fetch 100kth record:

    <pre><code>

    sindex = 99000 and count = 1000

    will just work fine as sindex + count = 100000 which is less than 100,000.

    </pre></code>


    * If you fetch more than 100kth records:

    <pre><code>

    sindex = 99000 and count = 1001, sindex + count = 100001

    which is greater than 100,000. Thus, you'll receive an error in response.

    </pre></code>


    ### HTTP Status Codes


    Every API response will have an HTTP status code.


    * <b>200 - OK:</b> API request is successful


    * <b>202 - Accepted:</b> The API request has been accepted for processing.


    * <b>400 - Bad Request:</b> The API request was unacceptable, often due to a
    missing or invalid parameter.


    * <b>404 - Not Found:</b> The requested resource does not exist.


    * <b>429 - Rate Limited:</b> You have made too many requests within the
    threshold timeframe.


    * <b>500 - Internal Server Error:</b> Something went wrong on our end.
    Please get in touch with support.


    ### Error Response


    Birdeye API will return a validation error in case of missing/invalid input
    in the request. The response will return the errorCode and errorMessage.


    For example :

    <pre><code>

    {
        "code": 1161,
        "message": "Invalid API key"
    }

    </pre></code>
servers:
  - url: https://api.birdeye.com/resources
security: []
tags:
  - name: Business
    description: Create and maintain your business on Birdeye.
  - name: Custom Fields
    description: Create, delete , update , associate and get custom fields easily.
  - name: User
    description: Delete and manage user profiles and permissions easily.
  - name: Reviews
    description: Consistently generate more reviews and higher ratings.
  - name: Contact
    description: >-
      Manage contacts across locations effortlessly with a robust Contact
      Management System.
  - name: Contact V2
    description: >-
      Easily manage contacts across multiple locations using enhanced Contact
      APIs, featuring built-in support for communication preference flags.
  - name: Campaign
    description: >-
      Create a short link for review requests and set review sources in the
      template.
  - name: Aggregation
    description: Access your public data from 150+ review sites.
  - name: Report
    description: >-
      Various reporting data points across Birdeye modules like reviews,
      insights and competitors etc for all your data visualisation
  - name: Survey
    description: >-
      Engage each customer at the right time with NPS or CSAT surveys to improve
      your service.
  - name: Business Media
    description: >-
      Add, delete and manage business media.


      > __Supported Media Size__

      > - _Photo: JPG or PNG. 720 x 720px. 10KB min._

      > - _Video: 30 sec long. 720p or more upto 75MB._


      > __Note__

      > - _Uploaded media will be pushed to your google business profile (if
      connected) and other long tail directories only._
  - name: Social
    description: Create and track Social posting for all channels.
  - name: Employee
  - name: Conversation
    description: >-
      Connect with customers across a range of digital channels from one unified
      inbox.
  - name: Subscription
    description: >-
      Subscribe or Unsubscribe multiple webhooks with different URLs or Events
      for a subscription and deliver real-time notifications.
  - name: Webhook
    description: >-
      Configure multiple webhooks with different URLs for a subscription and
      deliver real-time notifications.
  - name: Competitor
    description: Make competitive insights your unfair advantage.
  - name: Competitor AI
    description: Competitive intelligence, simplified by AI.
  - name: Insight AI
    description: Insight intelligence, simplified by AI.
  - name: Google Q&A
    description: >-
      > __Note__

      > - _Applicable to be used only by paid listings clients, for their active
      locations, for the Google Q&A section, in the Google listing_
  - name: Google Services
    description: >-
      > __Note__

      > - _Applicable to be used only by paid listings clients, for their active
      locations, for the Google Services section, in the Google listing._

      > - _No two services should have the same service name. It is recommended
      that all services created should  HAVE UNIQUE service names._

      > - _You CAN have the same service across two diff categories e.g.:
      Emergency counselling as a $100 paid service can be a service created &
      mapped to category A - Mental health and category B - Psychotherapy - both
      categories being present for the same location._
  - name: FAQ
    description: >-
      To retrieve all Question and Answer (QnA) entries across locations using
      FAQ APIs, enabling smart support and knowledge features for businesses.
  - name: Listing
    description: >-
      Keep your business information accurate and consistent across 50+
      websites.
  - name: GMB Products
    description: >-
      To manage products, locations, and business details through Listing GMB
      platform
  - name: AI Search
    description: >-
      AI Search provides a comprehensive view of your business performance
      across AI-powered search platforms, including data accuracy, sentiment
      analysis, citations, brand ranking, and overall visibility.
  - name: Ticketing
    description: >-
      Create standout customer support with ticketing across reviews, untagged,
      and survey responses.
  - name: Integration
    description: Birdeye integrates with various software or tools you use.
  - name: Change Logs
    description: >-
      * <b>07/03/2026</b> - Updated `mainBusinessDescription` and microsite
      `internalListing.description` fields in Create, Update and Get Listing
      APIs to be optional instead of required, with support for clearing the
      existing value by sending an empty string.


      * <b>06/10/2026</b> - Updated Get Contact API to support an optional
      `experienceScore` boolean field in the request body (default: false). When
      set to true, the response includes the customer's experience score and
      source.


      * <b>05/25/2026</b> - Added Update Custom card (PUT) and Delete Custom
      card (DELETE) API documentation under the Business profile custom card
      section.


      * <b>05/11/2026</b> - Added support for backdated survey responses in the
      POST Survey Response API. The `created` field (UTC Epoch milliseconds) is
      optional; if omitted, the server defaults to the current UTC timestamp.


      * <b>04/22/2026</b> - Provide subLocality field support in Get, Create and
      Update Listings APIs for NZ Locations.


      * <b>04/16/2026</b> - Added Archived Get Reviews API  under Reviews group.


      * <b>04/06/2026</b> - Updated Get Reviews API documentation to improve
      clarity on review statuses and how to retrieve all review types.


      * <b>03/24/2026</b> - Added Social Open URL Performance Report API and
      Insight AI APIs to retrieve location-wise metrics and benchmark score.


      * <b>03/18/2026</b> - Added Create Custom Card Time API under custom
      fields section.


      * <b>03/03/2026</b> - Added Response Time (overtime & by-location) and
      Response Rate(overtime & by-location) APIs under reports section and
      created group for Competitor AI.


      * <b>03/02/2026</b> - Added sendInvite (boolean, default - true) field in
      Create User Signup v2 API request body and attributes.


      * <b>02/11/2026</b> - Updated the API key identifier for applicable APIs
      by moving it from a query parameter to the x-api-key request header.


      * <b>02/03/2026</b> - Added the "Get All QnA" API under FAQ group to
      enable retrieval of QnA entries across business locations, with full
      request and response documentation


      * <b>01/19/2026</b> - Added a note under the Authentication and Rate
      limiting section specifying that the x-api-key header is mandatory for all
      API requests targeting EU region business accounts.


      * <b>01/13/2026</b> - Added Create User (Signup) API under User module to
      create and invite users for a business.


      * <b>09/22/2025</b> - Added GMB Products APIs to onboard/connect Google
      Merchant accounts and manage product listing actions.


      * <b>08/21/2025</b> - Added Single main business description Support.


      * <b>08/19/2025</b> - Added competitor /raptor public APIs for reviews
      aggregates.


      * <b>06/26/2025</b> - Added Contact V2 APIs with communication preference
      flag support.


      * <b>12/13/2024</b> - Added inline reply support for GetReviews APIs.


      * <b>09/27/2024</b> - Added update for Google Opening Soon


      * <b>06/25/2024</b> - Updated Listings Insights API


      * <b>05/29/2024</b> - Added Google Q&A Developers API Section


      * <b>05/13/2024</b> - Added epoc date support for GetReviews APIs.


      * <b>03/22/2024</b> - Add Update Hierarchy API


      * <b>03/19/2024</b> - Added Ticket APIs Create, Get, Update APIs under
      Ticket module


      * <b>02/26/2024</b> - Updated logoUrl description in Get, Update APIs
      under Business module and Create, Get, Update APIs under Listing module


      * <b>12/21/2023</b> - Add listing phase 2 api changes


      * <b>11/08/2023</b> - Add survey changes and listing changes


      * <b>11/08/2023</b> - Added CRUD APIs for Apple chat


      * <b>10/15/2023</b> - Added CRUD APIs for Business Media.


      * <b>10/11/2023</b> - Added new APIs under Listing module, Create, Update,
      Get, Deactive Listings


      * <b>09/18/2023</b> - Added new API under Contact module i.e, Get opt-out
      contact data


      * <b>08/25/2023</b> - Added new APIs under Business and Listing modules,
      Get Category List API, Get GMB Attributes API & Get Timezone List


      * <b>07/21/2023</b> - Added new API under Business module i.e, Business
      Search API.


      * <b>06/30/2023</b> - Added support for service area based information in
      Get Business API and Update Business API.


      * <b>10/04/2024</b> - Added support to fetch ticketId associated with the
      survey responses in List Response API.
paths:
  /v2/business/hierarchy/info:
    get:
      tags:
        - Business
      summary: Get hierarchy (v2)
      description: >-
        Get Hierarchy v2 API returns the business hierarchy of an enterprise or
        a location as a lightweight tree. Pass the business number of an
        enterprise or of a location in the `x-business-number` header. Each node
        represents a value of a hierarchy level (for example a region or a
        city), and the nodes below it are returned under `children`.


        The businesses mapped to a node are returned as identifiers only
        (`businessIds` and `businessNumbers`). Details such as the business name
        and address are not included, which keeps the response small even for
        large enterprises. Use the Get Child Businesses API to fetch business
        details. Compared to Get Hierarchy, which also returns business details,
        this API is faster and returns a much smaller response.


        Level names and values come from the hierarchy configured for the
        account. They carry no built-in meaning: for example, a value named
        `Inactive` is a regular hierarchy value that lists the businesses mapped
        to it.
      operationId: getBusinessHierarchyV2
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          example: application/json
          schema:
            type: string
            default: application/json
        - name: x-api-key
          in: header
          description: Partner specific API key provided by Birdeye for data exchange.
          required: true
          schema:
            type: string
        - name: x-business-number
          in: header
          description: >-
            Long business number of the business whose hierarchy you want to
            fetch, e.g. the business number of an enterprise or of a location.
          required: true
          example: '123456789012345'
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  businessId:
                    type: number
                    description: Id of the business whose hierarchy is returned.
                  businessNumber:
                    type: number
                    description: >-
                      Business number of the business whose hierarchy is
                      returned.
                  name:
                    type: string
                    description: Name of the business.
                  type:
                    type: string
                    description: Type of the business, e.g. `Enterprise-Location`.
                  hierarchy:
                    type: array
                    description: Top level nodes of the hierarchy tree.
                    items:
                      type: object
                      properties:
                        levelId:
                          type: number
                          description: Id of the hierarchy level, e.g. the Region level.
                        levelName:
                          type: string
                          description: Name of the hierarchy level.
                        depth:
                          type: number
                          description: >-
                            Position of the level in the hierarchy. A child node
                            always has a greater depth than its parent, but the
                            depths are not necessarily consecutive.
                        levelValueId:
                          type: number
                          description: >-
                            Id of the value at this level, e.g. the id of the
                            West region.
                        levelValueName:
                          type: string
                          description: Name of the value at this level.
                        children:
                          type: array
                          description: >-
                            Nodes of the levels below this node. Each child has
                            the same structure as its parent node. Not returned
                            when there are no nodes below this node.
                          items:
                            type: object
                        businessIds:
                          type: array
                          description: >-
                            Ids of the businesses mapped to this node. Not
                            returned when no business is mapped to this node.
                          items:
                            type: number
                        businessNumbers:
                          type: array
                          description: >-
                            Business numbers of the businesses mapped to this
                            node. Not returned when no business is mapped to
                            this node.
                          items:
                            type: number
              examples:
                response:
                  value:
                    businessId: 1234567
                    businessNumber: 123456789012345
                    name: Acme Retail
                    type: Enterprise-Location
                    hierarchy:
                      - levelId: 101
                        levelName: Region
                        depth: 1
                        levelValueId: 5001
                        levelValueName: West
                        children:
                          - levelId: 102
                            levelName: City
                            depth: 3
                            levelValueId: 6001
                            levelValueName: Seattle
                            businessIds:
                              - 2001
                              - 2002
                            businessNumbers:
                              - 223456789012301
                              - 223456789012302
                          - levelId: 102
                            levelName: City
                            depth: 3
                            levelValueId: 6002
                            levelValueName: Portland
                            businessIds:
                              - 2003
                            businessNumbers:
                              - 223456789012303
                        businessIds:
                          - 2004
                        businessNumbers:
                          - 223456789012304
                      - levelId: 101
                        levelName: Region
                        depth: 1
                        levelValueId: 5002
                        levelValueName: East
                        children:
                          - levelId: 103
                            levelName: Area Manager
                            depth: 6
                            levelValueId: 7001
                            levelValueName: Area 12
                            businessIds:
                              - 2005
                            businessNumbers:
                              - 223456789012305
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/1161Model'
              examples:
                response:
                  value:
                    code: 1161
                    message: Invalid API key
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/89Model'
              examples:
                response:
                  value:
                    code: 89
                    message: Rate limit exceeded
components:
  schemas:
    1161Model:
      type: object
      properties:
        code:
          type: number
        message:
          type: string
      example:
        code: 1161
        message: Invalid API key
    89Model:
      type: object
      properties:
        code:
          type: number
        message:
          type: string
      example:
        code: 89
        message: Rate limit exceeded

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.