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.
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
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.
Related Articles