# Organização

Por organização nos referimos ao ambiente, instância, conjunto de empresas, grupos e filiais. Organização é o maior nível que engloba todos os abaixo, seguido por grupo (group), empresa (account) e filial (unit).

## Get organization

<mark style="color:blue;">`GET`</mark> `https://api.acessorh.com.br/v1/accounts`

Lista todos os grupos e empresas da organização.

#### Headers

| Name          | Type   | Description                                                   |
| ------------- | ------ | ------------------------------------------------------------- |
| Authorization | string | Token de acesso adquirido pela plataforma Identity *(bearer)* |

{% tabs %}
{% tab title="200 " %}

```javascript
[
    {
        "name": "21st Century Fox",
        "description": "",        
        "customFields": {
            "name": null,
            "tradingName": null,
            "cnpj": null,
            "phone": null,
            "email": null,
            "zipCode": null,
            "address": null,
            "city": null,
            "state": null,
            "brand": null
        },
        "accounts": [
            {
                "uid": "2d9174c4-06b7-4956-a5dc-8824d8a2f49e",            
                "name": "Fox Entertainment Group",
                "description": "",
                "fields": [],
                "customFields": {
                    "name": null,
                    "tradingName": null,
                    "cnpj": null,
                    "phone": null,
                    "email": null,
                    "zipCode": null,
                    "address": null,
                    "city": null,
                    "state": null,
                    "brand": null
                },
            }
        ],
    }
]
```

{% endtab %}
{% endtabs %}

## Get units

<mark style="color:blue;">`GET`</mark> `https://api.acessorh.com.br/v1/accounts/:account`

Lista todas as filiais de uma empresa.

#### Path Parameters

| Name    | Type   | Description             |
| ------- | ------ | ----------------------- |
| account | string | UID da empresa desejada |

#### Headers

| Name          | Type   | Description                                                    |
| ------------- | ------ | -------------------------------------------------------------- |
| Authorization | string | Token de acesso adquirido pela plataforma Identity *(bearer)*. |

{% tabs %}
{% tab title="200 " %}

```javascript
[
    {
        "customFields": {
            "name": null,
            "tradingName": null,
            "cnpj": null,
            "phone": null,
            "email": null,
            "zipCode": null,
            "address": null,
            "city": null,
            "state": null,
            "brand": null
        },
        "description": "Exemplo 1",
        "fields": [],
        "name": "Fox Searchlight Pictures",
        "uid": "8f41346e-ea5d-43c1-aeff-df44b24b15ce"
    },
    {
        "customFields": {
            "name": null,
            "tradingName": null,
            "cnpj": null,
            "phone": null,
            "email": null,
            "zipCode": null,
            "address": null,
            "city": null,
            "state": null,
            "brand": null
        },
        "description": "Exemplo 2",
        "fields": [],
        "name": "Blue Sky Studios",
        "uid": "8c461157-a348-4243-8f25-e85630e8df2f"
    }
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://acessorh.gitbook.io/project/api/organizacao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
