Returns the sub-accounts sitting directly beneath the one you are signed in to. Neither the account you are calling as nor anything above it is included, and accounts in a different part of the hierarchy are never returned.
Each row carries object.parent_id and object.path - a slash-separated chain of account ids from the top of the tree down - so the hierarchy can be rebuilt from the listing without further calls.
Results are limited to the sub-accounts you are allowed to see, so two callers in the same account can get different rows.
A filter to apply to the results. Declared as an array of objects, where each object contains an attr (attribute code), operator and value key. Examples:
?filter[0]['attr']=name&filter[0][operator]=like&filter[0][value]=luke
?filter[0]['attr']=id&filter[0][operator]=>&filter[0][value]=265
See the filters documentation for more details on how to use this.
- Mock serverhttps://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/account
- Your Rosterfy accounthttps://example.rosterfy.com/api/v2/account
curl -i -X GET \
'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/account?show_descendant=true&subaccount_selection=true&per_page=5&page=1&filter=%7Bfilter%7D&sort_by=%7Bsort_by%7D&sort_order=%7Bsort_order%7D&_locale=en-US&extras=stats&with=users' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Rosterfy-Platform: admin'[ { "current_page": 1, "data": [ … ], "first_page_url": "https://example.rosterfy.com/api/v2/account?per_page=5&_locale=en-US&page=1", "from": 1, "next_page_url": "https://example.rosterfy.com/api/v2/account?per_page=5&_locale=en-US&page=2", "path": "https://example.rosterfy.com/api/v2/account", "per_page": 5, "prev_page_url": null, "to": 5 } ]