Retrieve org hierarchy details

API to retrieve hierarchy details of an org.

This API retrieves the hierarchy details of an organization based on the API credentials (till credentials/OAuth token). The organisation hierarchy fall into one of three types:

  1. Standard Org: An independent organization (org) with no parent or child. It is identified by a parentId of -1.

  2. Super Org: An organization with child orgs and no parent org. It also has a parentId of -1.

  3. Parent/Child Org: An organization with one or more subordinate organizations under it. This primary organization is designated as the parent org, and the subordinate organizations are termed child orgs.

👍

Note

For an overview on our APIs and for hands-on testing, refer to API overview and Make your first API call documentation.

Prerequisites

Resource information

URIv2/organization/hierarchy
HTTP methodGET
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

curl --location 'https://eu.api.capillarytech.com/v2/organization/hierarchy'

Request query parameters

ParameterTypeDescription
fetchSiblingsbooleanSet fetchSiblings=true to retrieve details of the organizations that share the same parent as the organization associated with the till. For example, if Org 1 is the parent of Org 2, Org 3, and Org 4, and you retrieve the hierarchy details of Org 2 with fetchSiblings=true, the API will return details for Org 2 as well as Org 3 and Org 4, since they all share the same parent as Org 2. The details of the sibling orgs are listed under the object siblingOrganizations.

Response parameters

ParameterTypeDescription
idIntegerUnique identifier for the organization.
nameStringName of the organization.
phoneStringContact phone number for the organization.
addressStringAddress of the organization.
languageStringLanguage used by the organization.
languageCodeStringCode representing the language (e.g., "en" for English).
languageLocaleStringLocale representing the language (e.g., "en-US).
parentIdIntegerID of the parent organization. A value of -1 indicates no parent organization. For Standard and Super org, the id is -1.
localityStringLocality of the organization.
pinCodeStringPostal code for the organization’s address.
currencyStringCurrency used by the organization (e.g., "United States dollar").
timezoneLabelStringLabel of the time zone in which the organization operates (e.g., "Asia/Kolkata").
timezoneOffsetStringOffset from UTC for the organization's time zone (e.g., "+05:30").
minSmsHourIntegerMinimum hour of the day during which SMS can be sent (24-hour format).
maxSmsHourIntegerMaximum hour of the day during which SMS can be sent (24-hour format).
logoStringThis parameter is not in use.
webSiteStringWebsite URL for the organization.
countryStringCountry in which the organization is located.
countryCodeStringISO country code (e.g., "US" for the United States).
activeBooleanIndicates whether the organization is active (true) or inactive (false).
orgTypeStringType of the organization (e.g., Standard org, Super org, Parent org, Child org.).
parentOrganizationsArrayList of parent organizations. Empty if none.
childOrganizationsArrayList of child organizations. Empty if none.
siblingOrganizationsArrayList of sibling organizations (organizations that share the same parent). Empty if none. Applicable when fetchSiblings=true.
warningsArrayList of warnings related to the organization. Empty if none.

{
    "organization": {
        "id": 100458,
        "name": "Bukl Enterprises",
        "phone": "",
        "address": "BUKL Demo",
        "language": "English",
        "languageCode": "en",
        "languageLocale": "AI",
        "parentId": -1,
        "locality": "",
        "pinCode": "",
        "currency": "United States dollar",
        "timezoneLabel": "Asia/Kolkata",
        "timezoneOffset": "+05:30",
        "minSmsHour": 8,
        "maxSmsHour": 23,
        "logo": "https://s3-eu-west-1.amazonaws.com/fs.capillary.eu/intouch_creative_assets/4105a746-712e-4207-a082-353776ca.png",
        "webSite": "",
        "country": "United States",
        "countryCode": "US",
        "active": true,
        "orgType": "STANDARD_ORG"
    },
    "parentOrganizations": [],
    "childOrganizations": [],
    "siblingOrganizations": [],
    "warnings": []
}
Language
Authorization
OAuth2
URL
Click Try It! to start a request and see the response here!