# List sub-accounts

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.

Endpoint: GET /api/v2/account
Version: 2.0.0
Security: default

## Query parameters:

  - `show_descendant` (boolean)
    Return the whole subtree rather than only the
accounts one level down. Available when the account allows it.

  - `subaccount_selection` (boolean)
    Narrow the results to the sub-accounts
offered in the account-switching menu. Available when the account allows it.

  - `per_page` (integer)
    The number of results to return per page. The higher the number the longer the request may take.
It is highly recommended to use this to avoid timeouts as your data grows.
Used in conjunction with the `page` parameter to paginate results.

  - `page` (integer)
    The page of results to return. Used in conjunction with the `per_page` parameter to paginate
results. If not specified, defaults to 1.
The response's next_page_url will be null if there are no
more pages.

  - `filter` (array)
    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.

  - `sort_by` (string)
    The field to sort the results by. No ordering is applied unless you specify one, so
row order is not guaranteed. Always send it when paging through a list, otherwise
records can repeat or be missed between pages.
Example: id

  - `sort_order` (string)
    The direction to sort the results by. Can be 'asc' or 'desc', default is 'asc'.

  - `_locale` (string)
    The locale to use for the response. This primarily affects the results of the `nice` field, which
contain human-readable labels and terms, as well as locale-specific date formats.,

  - `extras` (array)
    A list of extras to include in the response. These are objects or arrays that are not part of
the model's primary attributes, such as stats and counts.
For fast responses, avoid requesting them if you don't need them.

  - `with` (array)
    A list of relations to include in the response. May be single records or collections.
It is often more efficient to retrieve this way, to avoid follow-up API calls.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Response 200 fields (application/json):

  - `current_page` (integer)

  - `data` (array)

  - `data.object` (object)

  - `data.object.id` (integer)

  - `data.object.parent_id` (integer)

  - `data.object.account_type_id` (integer)

  - `data.object.path` (string)

  - `data.object.name` (string)

  - `data.object.config` (object)

  - `data.object.config.active_settings` (array)

  - `data.object.meta` (array)

  - `data.object.visibility_rules` (array)

  - `data.object.status` (string)

  - `data.object.status_reason` (string | null)

  - `data.object.sort_order` (integer)

  - `data.object.start_timestamp` (string | null)

  - `data.object.end_timestamp` (string | null)

  - `data.object.notes` (string | null)

  - `data.object.contact_firstname` (string | null)

  - `data.object.contact_lastname` (string | null)

  - `data.object.contact_email` (string | null)

  - `data.object.contact_phone` (string | null)

  - `data.object.support_manager_email` (string)

  - `data.object.allow_deletion_request` (integer)

  - `data.object.organization_type` (string | null)

  - `data.object.contract_start_date` (string)

  - `data.object.contract_end_date` (string)

  - `data.object.billing_contact_email` (string)

  - `data.object.billing_support_email` (string)

  - `data.object.is_enabled` (integer)

  - `data.object.additional_billing_support_email` (string)

  - `data.object.delete_requested_at` (string | null)

  - `data.object.is_archived` (integer)

  - `data.object.trial_ends_at` (string | null)

  - `data.object.can_erase` (integer)

  - `data.object.deleted_at` (string | null)

  - `data.object.is_erased` (integer)

  - `data.object.created_at` (string)

  - `data.object.updated_at` (string)

  - `data.object.domain` (array)

  - `data.nice` (object)

  - `data.nice.rrn` (string)

  - `data.nice.address` (string)

  - `data.nice.address_oneline` (string)

  - `data.nice.account_type_id` (integer)

  - `data.nice.account_type_id:value` (integer)

  - `data.nice.account_type_id:array` (integer)

  - `data.nice.allow_deletion_request` (string)

  - `data.nice.contact_firstname` (string)

  - `data.nice.contact_lastname` (string)

  - `data.nice.contact_phone:qr_code_value` (string)

  - `data.nice.contact_phone` (string)

  - `data.nice.contact_phone:raw` (string)

  - `data.nice.contract_end_date` (string)

  - `data.nice.contract_end_date__dayofweek` (string)

  - `data.nice.contract_start_date` (string)

  - `data.nice.contract_start_date__dayofweek` (string)

  - `data.nice.name` (string)

  - `data.nice.notes` (string)

  - `data.nice.organization_type` (string | null)

  - `data.nice.organization_type:value` (string | null)

  - `data.nice.organization_type:array` (string | null)

  - `data.nice.status` (string)

  - `data.nice.status:value` (string)

  - `data.nice.status:array` (string)

  - `data.nice.status_reason` (string)

  - `data.nice.created_at` (string)

  - `data.nice.url` (string)

  - `data.nice.branding_name` (string)

  - `data.nice.branding_subtitle` (string | null)

  - `data.nice.branding_logo` (string | null)

  - `data.nice.branding_logo_mono` (string | null)

  - `data.nice.branding_logo_stacked` (string | null)

  - `data.nice.branding_banner` (string | null)

  - `data.nice.branding_favicon` (string | null)

  - `data.nice.branding_description` (string | null)

  - `data.nice.branding_primary_color` (string)

  - `data.nice.branding_complimentary_color` (string | null)

  - `data.nice.branding_secondary_color` (string)

  - `data.nice.register` (boolean)

  - `data.nice.organisation_contact` (string)

  - `data.nice.has_subaccount_approved_email_template` (boolean)

  - `data.nice.has_subaccount_rejected_email_template` (boolean)

  - `data.nice.parent_account_name` (string)

  - `data.relations` (object)

  - `data.relations.current_user_checkpoint` (object)

  - `data.relations.current_user_checkpoint.object` (object)

  - `data.relations.current_user_checkpoint.object.id` (integer)

  - `data.relations.current_user_checkpoint.object.user_checkpoint_type_id` (string | null)

  - `data.relations.current_user_checkpoint.object.name` (string)

  - `data.relations.current_user_checkpoint.object.label` (string)

  - `data.relations.current_user_checkpoint.object.permissions` (object)

  - `data.relations.current_user_checkpoint.object.permissions.all` (string)

  - `data.relations.current_user_checkpoint.object.actions` (array)

  - `data.relations.current_user_checkpoint.object.is_inheritable` (integer)

  - `data.relations.current_user_checkpoint.object.sort_order` (integer)

  - `data.relations.current_user_checkpoint.object.deleted_at` (string | null)

  - `data.relations.current_user_checkpoint.object.created_at` (string)

  - `data.relations.current_user_checkpoint.object.updated_at` (string)

  - `data.relations.current_user_checkpoint.nice` (object)

  - `data.relations.current_user_checkpoint.nice.rrn` (string)

  - `data.relations.current_user_checkpoint.nice.content_id` (integer)

  - `data.relations.current_user_checkpoint.nice.account_name_path` (string)

  - `data.relations.current_user_checkpoint.nice.is_foreign_account` (boolean)

  - `data.relations.current_user_checkpoint.permissions` (object)

  - `data.relations.current_user_checkpoint.permissions.read` (boolean)

  - `data.relations.current_user_checkpoint.permissions.update` (boolean)

  - `data.relations.current_user_checkpoint.permissions.delete` (boolean)

  - `data.relations.parent` (array)

  - `data.relations.account` (array)

  - `data.permissions` (object)

  - `data.permissions.read` (boolean)

  - `data.permissions.update` (boolean)

  - `data.permissions.delete` (boolean)

  - `data.permissions.apply` (boolean)

  - `data.permissions.apply_error` (string)

  - `data.permissions.view_subaccount_selection_menu` (boolean)

  - `data.attributes` (array)

  - `first_page_url` (string)

  - `from` (integer)

  - `next_page_url` (string)

  - `path` (string)

  - `per_page` (integer)

  - `prev_page_url` (string | null)

  - `to` (integer)

