get https://{host}.api.capillarytech.com/v2/organization/hierarchy
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:
-
Standard Org: An independent organization (org) with no parent or child. It is identified by a
parentId
of -1. -
Super Org: An organization with child orgs and no parent org. It also has a
parentId
of -1. -
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
- Basic or OAuth credentials
- Access to Organization resource
Resource information
URI | v2/organization/hierarchy |
HTTP method | GET |
Pagination | NA |
Rate limit | NA |
Batch support | NA |
API endpoint example
curl --location 'https://eu.api.capillarytech.com/v2/organization/hierarchy'
Request query parameters
Parameter | Type | Description |
---|---|---|
fetchSiblings | boolean | Set 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
Parameter | Type | Description |
---|---|---|
id | Integer | Unique identifier for the organization. |
name | String | Name of the organization. |
phone | String | Contact phone number for the organization. |
address | String | Address of the organization. |
language | String | Language used by the organization. |
languageCode | String | Code representing the language (e.g., "en" for English). |
languageLocale | String | Locale representing the language (e.g., "en-US). |
parentId | Integer | ID of the parent organization. A value of -1 indicates no parent organization. For Standard and Super org, the id is -1. |
locality | String | Locality of the organization. |
pinCode | String | Postal code for the organization’s address. |
currency | String | Currency used by the organization (e.g., "United States dollar"). |
timezoneLabel | String | Label of the time zone in which the organization operates (e.g., "Asia/Kolkata"). |
timezoneOffset | String | Offset from UTC for the organization's time zone (e.g., "+05:30"). |
minSmsHour | Integer | Minimum hour of the day during which SMS can be sent (24-hour format). |
maxSmsHour | Integer | Maximum hour of the day during which SMS can be sent (24-hour format). |
logo | String | This parameter is not in use. |
webSite | String | Website URL for the organization. |
country | String | Country in which the organization is located. |
countryCode | String | ISO country code (e.g., "US" for the United States). |
active | Boolean | Indicates whether the organization is active (true ) or inactive (false ). |
orgType | String | Type of the organization (e.g., Standard org, Super org, Parent org, Child org.). |
parentOrganizations | Array | List of parent organizations. Empty if none. |
childOrganizations | Array | List of child organizations. Empty if none. |
siblingOrganizations | Array | List of sibling organizations (organizations that share the same parent). Empty if none. Applicable when fetchSiblings=true. |
warnings | Array | List 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": []
}