younifyd
Menu

List Hierarchy Details

Get paginated account hierarchy for a customer

GET/customers/{customer-id}/hierarchy_detail

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the List Hierarchy Details action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{listHierarchyDetails.response.data}}.

Request

Path parameters

customer-idstringrequired

Query parameters

limitinteger (int32)

The number of resources to be returned.

Default 10

offsetstring

<p class="mb-2">Used for pagination. Set this to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">next_offset</code> value from the previous API response to fetch the next page.</p>

hierarchy_operation_typestringrequired

Specifies which part of the hierarchy to fetch. Choose from the available operation types. \* complete_hierarchy - Fetches all nodes in the full hierarchy that the customer belongs to. \* subordinates - Fetches all nodes in the sub-hierarchy rooted at the customer, including the customer and its subordinates. \* path_to_root - Fetches a list of nodes along the path from the customer to the root of the hierarchy.

One ofcomplete_hierarchysubordinatespath_to_root

Headers

chargebee-request-origin-devicestring

The device from which the customer has made the request

chargebee-request-origin-userstring (email)

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-user-encodedstring (email)

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-request-origin-ipstring

The IP address of the customer where the request originated

chargebee-business-entity-idstring

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

Response

Returns 200 with an object. Read it in later steps with {{listHierarchyDetails.response.data.<field>}}.

listarray<object>
hierarchyobjectrequired6 fields

<div class="api-description"><p class="mb-2">When a customer belongs to an <a href="https://www.chargebee.com/docs/2.0/account-hierarchy.html" target="_blank">account hierarchy</a>, the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">hierarchy</code> resource represents the customer&#x27;s position within that hierarchy. The hierarchy provides details about the customer&#x27;s parent, children, invoice owner, and payment owner.</p><div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">A customer can have a maximum of 250 direct children.</li> <li class="text-base leading-relaxed">The hierarchy allows a maximum of 5 levels from the root node to the lowest child node.</li> </ul></div><div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Related Endpoints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <a href="/docs/api/customers/get-hierarchy">Get hierarchy</a> </li> <li class="text-base leading-relaxed"> <a href="/docs/api/customers/update-hierarchy-access-settings-for-a-customer">Update hierarchy access settings</a> </li> <li class="text-base leading-relaxed"> <a href="/docs/api/customers/link-a-customer">Link a customer to a hierarchy</a> </li> <li class="text-base leading-relaxed"> <a href="/docs/api/customers/delink-a-customer">Delink a customer from a hierarchy</a> </li> </ul></div></div>

next_offsetstring

<p class="mb-2">This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">offset</code>.</p>

json
{
  "list": null,
  "next_offset": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.