Demander API - Cities
This article is part of the REST Integration API documentation.
Documentation for querying, inserting, updating and deleting cities.
Consultation
Section titled “Consultation”List the company’s cities. Without filter, considers dataAlteracao from the last 6 months.
Rota: {host}/public/v1/cidades?pagina={pagina}&limite={limite}&filtroDataAlteracao={data}&operadorFiltro={operador}Método: GETReturn:
{ "cidades": [ { "codigo": 54, "descricao": "LAJEADO", "uf": "RS", "codigoPais": "BR", "ativo": 1, "dataAlteracao": "2026-07-24 10:00:00" } ]}Insert or update
Section titled “Insert or update”POST upsert by key codigo.
Rota: {host}/public/v1/cidadesMétodo: POSTBody: json| Property | Type | Size | Mandatory | Description |
|---|---|---|---|---|
| code | int | ✓ | City code. Unique identifier used to insert or update (upsert). | |
| description | string | 100 | ✓ | City name. |
| uf | string | 2 | ✓ | UF of the state (e.g.: RS). |
| codigoPais | string | 2 | ISO-2 country code. Default on inclusion: BR. |
|
| active | int | Values: 0 or 1. Default on inclusion: 1. |
Body:
{ "codigo": 54, "descricao": "LAJEADO", "uf": "RS", "codigoPais": "BR", "ativo": 1}Return:
{ "codigo": 54, "descricao": "LAJEADO", "uf": "RS", "codigoPais": "BR", "ativo": 1, "dataAlteracao": "2026-07-24 10:00:00"}Delete
Section titled “Delete”Remove the city.
Rota: {host}/public/v1/cidades?codigo={codigo}Método: DELETEReturn:
{ "mensagem": "Registro excluído com sucesso."}Create all IBGE cities
Section titled “Create all IBGE cities”Copies the cities from IBGE to the company, with codigoPais = BR.
Rota: {host}/public/v1/cidades/criar-todas-cidades-do-ibgeMétodo: POSTReturn:
{ "mensagem": "Cidades do IBGE criadas com sucesso.", "quantidadeInserida": 5570}