How to retrieve hierarchy for a customer via API?

Modified on: Tue, 21 Feb, 2023 at 6:27 PM

Scope

How to get a full hierarchy for a customer via API?

How to retrieve a subordinate hierarchy for a customer via API?

How to get the hierarchy path to the root via API?


Summary

If you are looking to retrieve the hierarchy tree for a particular customer via API, follow the steps below.

Step 1: Use Get hierarchy API

Step 2: Use the input parameter hierarchy_operation_type and select the possible values

  • complete_hierarch
  • subordinate
  • path_to_root

Solution
Step 1: Choose the Get hierarchy API respective to the product catalog versions provided below.

  1. PC 1.0
  2. PC 2.0


Note: That the above API call is a GET request. If you are making use of tools such as Postman to run API calls, make sure that you pass the API call type as GET request.



Step 2: Pass this parameter: 

             You can Input the parameter hierarchy_operation_type and select the possible values that are


Possible values are

complete_hierarchyList the nodes of the full hierarchy to which the customer belongs.subordinatesList all the nodes of the hierarchy formed by the customer and its subordinates. In other words, fetch the nodes of the tree whose root node is the customer.path_to_rootList the nodes along the path from the customer to the root of the full hierarchy.







Here is an example of running the Get hierarchy API Call on Postman


Related Articles

How to list more than 10 items when listing information via API?

What is API Changelog?

Chargebee API's Documentation

What are the Chargebee API limits?

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×