> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dados.rio/llms.txt
> Use this file to discover all available pages before exploring further.

# Obter dados do cidadão

> Recupera os dados do cidadão por CPF, incluindo informações básicas e dados autodeclarados.



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-rmi/refs/heads/main/docs/openapi-v3.json get /citizen/{cpf}
openapi: 3.0.0
info:
  description: >-
    API para gerenciamento de dados de cidadãos do Rio de Janeiro, incluindo
    autodeclaração de informações e verificação de contato.
  title: API RMI
  termsOfService: http://swagger.io/terms/
  contact:
    name: Suporte RMI
    url: http://www.rio.rj.gov.br
    email: suporte@rio.rj.gov.br
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://services.pref.rio/rmi/v1
    description: Production
  - url: https://services.staging.app.dados.rio/rmi/v1
    description: Staging
security: []
tags:
  - description: >-
      Operações relacionadas a cidadãos, incluindo consulta e atualização de
      dados autodeclarados
    name: citizen
  - description: Operações relacionadas a departamentos/unidades administrativas (UA)
    name: departments
  - description: Gerenciamento de categorias de notificação (admin) e listagem pública
    name: notification-categories
  - description: Gerenciamento de preferências de notificação por CPF e telefone
    name: notification-preferences
  - description: Operações de verificação de saúde da API
    name: health
paths:
  /citizen/{cpf}:
    get:
      tags:
        - citizen
      summary: Obter dados do cidadão
      description: >-
        Recupera os dados do cidadão por CPF, incluindo informações básicas e
        dados autodeclarados.
      parameters:
        - description: CPF do cidadão (11 dígitos)
          name: cpf
          in: path
          required: true
          schema:
            type: string
            minLength: 11
            maxLength: 11
      responses:
        '200':
          description: Dados do cidadão obtidos com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Citizen'
        '400':
          description: Formato de CPF inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '401':
          description: Token de autenticação não fornecido ou inválido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '403':
          description: Acesso negado - permissões insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '404':
          description: Cidadão não encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '429':
          description: Muitas requisições - limite de taxa excedido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
        '500':
          description: Erro interno do servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    models.Citizen:
      type: object
      properties:
        _id:
          type: string
        assistencia_social:
          $ref: '#/components/schemas/models.AssistenciaSocial'
        cpf:
          type: string
        deficiencia:
          description: Self-declared, not stored in base collection
          type: string
        documentos:
          description: Wallet and internal fields
          allOf:
            - $ref: '#/components/schemas/models.Documentos'
        educacao:
          $ref: '#/components/schemas/models.Educacao'
        email:
          $ref: '#/components/schemas/models.Email'
        endereco:
          $ref: '#/components/schemas/models.Endereco'
        escolaridade:
          description: Self-declared, not stored in base collection
          type: string
        genero:
          description: Self-declared, not stored in base collection
          type: string
        mae:
          $ref: '#/components/schemas/models.Mae'
        menor_idade:
          type: boolean
        nascimento:
          $ref: '#/components/schemas/models.Nascimento'
        nome:
          type: string
        nome_exibicao:
          description: Self-declared, not stored in base collection
          type: string
        nome_social:
          type: string
        obito:
          $ref: '#/components/schemas/models.Obito'
        raca:
          type: string
        renda_familiar:
          description: Self-declared, not stored in base collection
          type: string
        saude:
          $ref: '#/components/schemas/models.Saude'
        sexo:
          type: string
        telefone:
          $ref: '#/components/schemas/models.Telefone'
    handlers.ErrorResponse:
      type: object
      properties:
        error:
          type: string
    models.AssistenciaSocial:
      type: object
      properties:
        cadunico:
          $ref: '#/components/schemas/models.CadUnico'
        cras:
          $ref: '#/components/schemas/models.CRAS'
    models.Documentos:
      type: object
      properties:
        cns:
          type: array
          items:
            type: string
    models.Educacao:
      type: object
      properties:
        aluno:
          $ref: '#/components/schemas/models.Aluno'
        escola:
          $ref: '#/components/schemas/models.Escola'
    models.Email:
      type: object
      properties:
        alternativo:
          type: array
          items:
            $ref: '#/components/schemas/models.EmailAlternativo'
        indicador:
          type: boolean
        principal:
          $ref: '#/components/schemas/models.EmailPrincipal'
    models.Endereco:
      type: object
      properties:
        alternativo:
          type: array
          items:
            $ref: '#/components/schemas/models.EnderecoAlternativo'
        indicador:
          type: boolean
        principal:
          $ref: '#/components/schemas/models.EnderecoPrincipal'
    models.Mae:
      type: object
      properties:
        cpf:
          type: string
        nome:
          type: string
    models.Nascimento:
      type: object
      properties:
        data:
          type: string
        municipio:
          type: string
        municipio_id:
          type: string
        pais:
          type: string
        pais_id:
          type: string
        uf:
          type: string
    models.Obito:
      type: object
      properties:
        ano:
          type: integer
        indicador:
          type: boolean
    models.Saude:
      type: object
      properties:
        clinica_familia:
          $ref: '#/components/schemas/models.ClinicaFamilia'
        equipe_saude_familia:
          $ref: '#/components/schemas/models.EquipeSaudeFamilia'
    models.Telefone:
      type: object
      properties:
        alternativo:
          type: array
          items:
            $ref: '#/components/schemas/models.TelefoneAlternativo'
        indicador:
          type: boolean
        principal:
          $ref: '#/components/schemas/models.TelefonePrincipal'
    models.CadUnico:
      type: object
      properties:
        data_cadastro:
          type: string
        data_limite_cadastro_atual:
          type: string
        data_ultima_atualizacao:
          type: string
        indicador:
          type: boolean
        status_cadastral:
          type: string
    models.CRAS:
      type: object
      properties:
        endereco:
          type: string
        nome:
          type: string
        telefone:
          type: string
    models.Aluno:
      type: object
      properties:
        conceito:
          type: string
        frequencia:
          type: number
        indicador:
          type: boolean
    models.Escola:
      type: object
      properties:
        email:
          type: string
        endereco:
          type: string
        horario_funcionamento:
          type: string
        nome:
          type: string
        telefone:
          type: string
        whatsapp:
          type: string
    models.EmailAlternativo:
      type: object
      properties:
        origem:
          type: string
        sistema:
          type: string
        valor:
          type: string
    models.EmailPrincipal:
      type: object
      properties:
        origem:
          type: string
        sistema:
          type: string
        updated_at:
          type: string
        valor:
          type: string
    models.EnderecoAlternativo:
      type: object
      properties:
        bairro:
          type: string
        cep:
          type: string
        complemento:
          type: string
        estado:
          type: string
        latitude:
          type: string
        logradouro:
          type: string
        longitude:
          type: string
        municipio:
          type: string
        numero:
          type: string
        origem:
          type: string
        pluscode:
          type: string
        sistema:
          type: string
        tipo_logradouro:
          type: string
    models.EnderecoPrincipal:
      type: object
      properties:
        bairro:
          type: string
        cep:
          type: string
        complemento:
          type: string
        estado:
          type: string
        logradouro:
          type: string
        municipio:
          type: string
        numero:
          type: string
        origem:
          type: string
        sistema:
          type: string
        tipo_logradouro:
          type: string
        updated_at:
          type: string
    models.ClinicaFamilia:
      type: object
      properties:
        email:
          type: string
        endereco:
          type: string
        fonte:
          description: '"bigquery" or "mcp" - not stored in DB, populated at response time'
          type: string
        horario_atendimento:
          type: string
        id_cnes:
          type: string
        indicador:
          type: boolean
        nome:
          type: string
        telefone:
          type: string
    models.EquipeSaudeFamilia:
      type: object
      properties:
        enfermeiros:
          type: array
          items:
            $ref: '#/components/schemas/models.ProfissionalSaude'
        id_ine:
          type: string
        indicador:
          type: boolean
        medicos:
          type: array
          items:
            $ref: '#/components/schemas/models.ProfissionalSaude'
        nome:
          type: string
        telefone:
          type: string
    models.TelefoneAlternativo:
      type: object
      properties:
        ddd:
          type: string
        ddi:
          type: string
        origem:
          type: string
        sistema:
          type: string
        valor:
          type: string
    models.TelefonePrincipal:
      type: object
      properties:
        ddd:
          type: string
        ddi:
          type: string
        origem:
          type: string
        sistema:
          type: string
        updated_at:
          type: string
        valor:
          type: string
    models.ProfissionalSaude:
      type: object
      properties:
        id_profissional_sus:
          type: string
        nome:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````