> For the complete documentation index, see [llms.txt](https://devcenter.unico.io/unico-people/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devcenter.unico.io/unico-people/unico-people-v1/apis/ibge.md).

# IBGE

Listagem de códigos IBGE

## Get Code <a href="#get-code" id="get-code"></a>

Lista o código IBGE do município.

<mark style="color:green;">`GET`</mark> \ <mark style="color:$primary;">**Url Produção:**</mark> `https://api.acessorh.com.br`\ <mark style="color:$primary;">**Url Homologação:**</mark> `https://api.rh.homolog.acesso.io`\ <mark style="color:$primary;">**Endpoint:**</mark> `/v1/ibge/code`

### **Headers**

| Key                                             | Type   | Description                                                 |
| ----------------------------------------------- | ------ | ----------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Token de acesso adquirido pela plataforma Identity (Bearer) |

### **Query Parameters**

| Key                                    | Type   | Description                       |
| -------------------------------------- | ------ | --------------------------------- |
| uf<mark style="color:red;">\*</mark>   | string | Sigla do estado a ser consultado. |
| city<mark style="color:red;">\*</mark> | string | Município a ser consultado.       |

### Exemplo de requisição

```json

curl --location 'https://api.acessorh.com.br/v1/ibge/code?uf=Sigla%20do%20estado&city=Munic%C3%ADpio' \
--header 'Authorization: Bearer token de auth'
```

### Exemplo de response

{% tabs %}
{% tab title="200 OK: Código recuperado com sucesso" %}

```json
{ 
    "code": "2338990"
}
```

{% endtab %}

{% tab title="404 Not Found: Código não encontrado" %}

```json
"not found"
```

{% endtab %}
{% endtabs %}
