Hi Charles,
I've built this functionality as wel. There's no way to retrieve all information in one request.
You'll need to loop through each customer and check if there are customers below that one etc.
1) Query all customers
2) Loop through each customer (here you can also store if the customer is a manager or a test account)
3) Query all customer-client-links for the customer (check for the active status)
4) Loop through all the links (here you can also store if the link represents a hidden customer)
5) Query the customer resource using the id in the link (here you can also store if the customer is a manager or a test account)
6) Back to step 3 for the current customer
So the part from step 3 will be a recursive function.
I hope this helps.
Best regards,
Marc Selman
Op maandag 1 april 2019 12:53:11 UTC+2 schreef Charles Bannister: