Skip to main content
Best Answer

Obtain Branch IDs via API

  • August 5, 2024
  • 1 reply
  • 266 views

codywinchester
Contributor III

Silly question: How can I return a list of branches and their IDs using API? I see a bunch of calls requiring the branch ID, but no way to obtain said ID. Thanks.

Best answer by Ian

List of branches of given or root level

GET /manage/v1/orgchart

By default this only gets the branches at root level, but if needed you can get the whole tree using

GET /manage/v1/orgchart?flattened=true

There are some other parameters in the API docs as well, which should be easy enough to find now that you know to look under “Orgchart” in the Manage service. Why is not “Branch”? I really don’t know.

1 reply

Ian
Guide I
  • Guide I
  • Answer
  • August 6, 2024

List of branches of given or root level

GET /manage/v1/orgchart

By default this only gets the branches at root level, but if needed you can get the whole tree using

GET /manage/v1/orgchart?flattened=true

There are some other parameters in the API docs as well, which should be easy enough to find now that you know to look under “Orgchart” in the Manage service. Why is not “Branch”? I really don’t know.