Card hierarchy defines a tree-structure that separates card space in non-intersecting groups. Such groups can be further used for ruleset attachments via Spend Control API.
Key Points:
Only one card-hierarchy can be active at the same time. Only active hierarchy is taken into account when evaluating Spend Control rules.
Whenever you create a card-hierarchy, a root group (type: ROOT) is created with the same name and id.
You cannot create a detached group, so whenever you create a group, you should specify a parentId.
Cards (and only cards, not other subgroups) can be attached only to a group with type: CARD. If you want to create a group that will be split further into subgroups, use type: INTERMEDIATE
You can move a card or a group from one group to another
You can delete a group, but only if it does not contain any cards or subgroups. If you want to delete a group with cards or subgroups, you should specify a query parameter recursive=true
If you want to migrate to a completely different hierarchy, you should create a new inactive hierarchy, add all cards to it, and then activate it.