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

# Listar assuntos



## OpenAPI

````yaml https://erp.olist.com/public-api/v3/swagger/swagger-mintlify.json get /crm/assuntos
openapi: 3.0.0
info:
  title: Olist ERP API v3
  description: >-
    Documentação completa: <a href="https://api-docs.erp.olist.com"
    target="_blank">https://api-docs.erp.olist.com</a>
  version: '3.1'
servers:
  - url: https://api.tiny.com.br/public-api/v3
security: []
paths:
  /crm/assuntos:
    get:
      tags:
        - CRM
      summary: Listar assuntos
      operationId: ListarCrmAssuntosAction
      parameters:
        - $ref: '#/components/parameters/situacaoCrmAssunto'
        - $ref: '#/components/parameters/estrelaCrmAssunto'
        - $ref: '#/components/parameters/arquivadoCrmAssunto'
        - $ref: '#/components/parameters/idContatoCrmAssunto'
        - $ref: '#/components/parameters/idPessoaContatoCrmAssunto'
        - $ref: '#/components/parameters/nomeClienteCrmAssunto'
        - $ref: '#/components/parameters/statusCrmContato'
        - $ref: '#/components/parameters/idEstagioCrmAssunto'
        - $ref: '#/components/parameters/assuntoCrmAssunto'
        - $ref: '#/components/parameters/filtrarPorCrmAssunto'
        - $ref: '#/components/parameters/dataInicialCrmAssunto'
        - $ref: '#/components/parameters/dataFinalCrmAssunto'
        - $ref: '#/components/parameters/marcadoresCrmAssunto'
        - $ref: '#/components/parameters/descricaoAcaoCrmAssunto'
        - $ref: '#/components/parameters/idUsuarioCrmAssunto'
        - $ref: '#/components/parameters/idUsuarioResponsavelCrmAssunto'
        - $ref: '#/components/parameters/get_crm_assuntos_limit'
        - $ref: '#/components/parameters/get_crm_assuntos_offset'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  itens:
                    type: array
                    items:
                      $ref: '#/components/schemas/CrmAssuntoResponseModel'
                  paginacao:
                    $ref: '#/components/schemas/PaginatedResultModel'
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDTO'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable
      security:
        - bearerAuth: []
components:
  parameters:
    situacaoCrmAssunto:
      name: situacao
      in: query
      description: |-
        Filtra pelo status das ações do assunto
        - pendente - Com ações pendentes
        - encerrado - Sem ações pendentes/todas concluídas
      required: false
      schema:
        type: string
        enum:
          - pendente
          - encerrado
    estrelaCrmAssunto:
      name: estrela
      in: query
      description: Filtra apenas assuntos marcados com estrela
      required: false
      schema:
        type: boolean
    arquivadoCrmAssunto:
      name: arquivado
      in: query
      description: Filtra apenas assuntos arquivados
      required: false
      schema:
        type: boolean
    idContatoCrmAssunto:
      name: idContato
      in: query
      description: Filtra pelo ID do contato vinculado ao assunto
      required: false
      schema:
        type: integer
    idPessoaContatoCrmAssunto:
      name: idPessoaContato
      in: query
      description: Filtra pelo ID da pessoa de contato vinculada ao assunto
      required: false
      schema:
        type: integer
    nomeClienteCrmAssunto:
      name: nomeCliente
      in: query
      description: Pesquisa por nome do cliente vinculado ao assunto
      required: false
      schema:
        type: string
    statusCrmContato:
      name: statusCrm
      in: query
      description: |-
        Filtra pelo status CRM do contato vinculado ao assunto
        - L - Lead
        - P - Prospect
        - C - Cliente
        - I - Inativo
      required: false
      schema:
        enum:
          - L
          - P
          - C
          - I
      x-enumDescriptions:
        - L - Lead
        - P - Prospect
        - C - Cliente
        - I - Inativo
    idEstagioCrmAssunto:
      name: idEstagio
      in: query
      description: Filtra pelo id do estágio no funil de vendas
      required: false
      schema:
        type: integer
    assuntoCrmAssunto:
      name: assunto
      in: query
      description: Busca por texto na descrição do assunto parcial ou completo
      required: false
      schema:
        type: string
    filtrarPorCrmAssunto:
      name: filtrarPor
      in: query
      description: |-
        Define o critério de filtro
        - data-criacao - Data de criação do assunto
        - data-prevista - Ações com data prevista (tipo D)
        - quanto-antes - Ações quanto antes (tipo Q)
        - esperar - Ações para esperar (tipo E)
      required: false
      schema:
        type: string
        default: data-criacao
        enum:
          - data-criacao
          - data-prevista
          - quanto-antes
          - esperar
      x-enumDescriptions:
        - data-criacao - Data de criação da ação
        - data-prevista - Ações com data prevista (tipo D)
        - quanto-antes - Ações quanto antes (tipo Q)
        - esperar - Ações para esperar (tipo E)
    dataInicialCrmAssunto:
      name: dataInicial
      in: query
      description: >-
        Data inicial para filtro (aplica-se ao critério escolhido em
        'filtrarPor')
      required: false
      schema:
        type: string
        example: '2024-01-01'
    dataFinalCrmAssunto:
      name: dataFinal
      in: query
      description: Data final para filtro (aplica-se ao critério escolhido em 'filtrarPor')
      required: false
      schema:
        type: string
        example: '2024-12-31'
    marcadoresCrmAssunto:
      name: marcadores
      in: query
      description: Pesquisa por marcadores
      required: false
      schema:
        oneOf:
          - type: array
            items:
              type: string
          - type: string
    descricaoAcaoCrmAssunto:
      name: descricaoAcao
      in: query
      description: Busca por texto na descrição da ação do assunto parcial ou completo
      required: false
      schema:
        type: string
    idUsuarioCrmAssunto:
      name: idUsuario
      in: query
      description: Filtra pelo id do usuário que criou as ações do assunto
      required: false
      schema:
        type: integer
    idUsuarioResponsavelCrmAssunto:
      name: idUsuarioResponsavel
      in: query
      description: Filtra pelo id do usuário responsável pelas ações do assunto
      required: false
      schema:
        type: integer
    get_crm_assuntos_limit:
      name: limit
      in: query
      description: Limite da paginação
      required: false
      schema:
        type: integer
        default: 100
    get_crm_assuntos_offset:
      name: offset
      in: query
      description: Offset da paginação
      required: false
      schema:
        type: integer
        default: 0
  schemas:
    CrmAssuntoResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - $ref: '#/components/schemas/CrmAssuntoResponseBaseModel'
        - properties:
            totalAcoes:
              type: integer
            totalAnotacoes:
              type: integer
            proximaAcao:
              oneOf:
                - $ref: '#/components/schemas/CrmProximaAcaoModel'
              nullable: true
          type: object
    PaginatedResultModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            limit:
              type: integer
            offset:
              type: integer
            total:
              type: integer
          type: object
    ErrorDTO:
      title: ' '
      description: ' '
      properties:
        mensagem:
          description: Mensagem de erro geral
          type: string
          example: Ocorreram erros de validação
        detalhes:
          description: Detalhes específicos do erro
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
          example:
            - campo: codigo
              mensagem: O campo código é obrigatório
          nullable: true
      type: object
    CrmAssuntoResponseBaseModel:
      title: ' '
      description: ' '
      properties:
        id:
          type: integer
        assunto:
          type: string
        cliente:
          oneOf:
            - $ref: '#/components/schemas/CrmClienteResumoModel'
          nullable: true
        estagio:
          oneOf:
            - $ref: '#/components/schemas/CrmAssuntoEstagioResponseModel'
          nullable: true
        estrela:
          type: boolean
        arquivado:
          type: boolean
        data:
          type: string
          example: '2024-01-01'
          nullable: true
        dataAtualizacao:
          type: string
          example: '2024-01-01 00:00:00'
          nullable: true
      type: object
    CrmProximaAcaoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            descricao:
              type: string
            tipo:
              description: |-

                - D - Data
                - Q - Quanto Antes
                - E - Esperar
                - N - Sem Data
              type: string
              enum:
                - D
                - Q
                - E
                - 'N'
              nullable: true
              x-enumDescriptions:
                - D - Data
                - Q - Quanto Antes
                - E - Esperar
                - N - Sem Data
            data:
              description: Data da próxima ação (apenas quando tipo = D)
              type: string
              example: '2024-01-01'
              nullable: true
          type: object
    ErrorDetailDTO:
      title: ' '
      description: ' '
      properties:
        campo:
          description: Campo que gerou o erro
          type: string
          example: codigo
        mensagem:
          description: Mensagem de erro específica do campo
          type: string
          example: O campo código é obrigatório
      type: object
    CrmClienteResumoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
            nome:
              type: string
              nullable: true
            codigo:
              type: string
              nullable: true
            fantasia:
              type: string
              nullable: true
            tipoPessoa:
              description: |-

                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
              type: string
              enum:
                - J
                - F
                - E
                - X
              nullable: true
              x-enumDescriptions:
                - J - Juridica
                - F - Fisica
                - E - Estrangeiro
                - X - Estrangeiro No Brasil
            cpfCnpj:
              type: string
              nullable: true
            inscricaoEstadual:
              type: string
              nullable: true
            rg:
              type: string
              nullable: true
            telefone:
              type: string
              nullable: true
            celular:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            pessoaContato:
              $ref: '#/components/schemas/CrmPessoaContatoModel'
            endereco:
              $ref: '#/components/schemas/EnderecoModel'
            statusCrm:
              description: |-

                - L - Lead
                - P - Prospect
                - C - Cliente
                - I - Inativo
              type: string
              enum:
                - L
                - P
                - C
                - I
              nullable: true
              x-enumDescriptions:
                - L - Lead
                - P - Prospect
                - C - Cliente
                - I - Inativo
          type: object
    CrmAssuntoEstagioResponseModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            id:
              type: integer
              nullable: true
            descricao:
              type: string
              nullable: true
          type: object
    CrmPessoaContatoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            nome:
              type: string
              nullable: true
            telefone:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
            ramal:
              type: string
              nullable: true
            departamento:
              type: string
              nullable: true
          type: object
    EnderecoModel:
      title: ' '
      description: ' '
      type: object
      allOf:
        - properties:
            endereco:
              type: string
              nullable: true
            numero:
              type: string
              nullable: true
            complemento:
              type: string
              nullable: true
            bairro:
              type: string
              nullable: true
            municipio:
              type: string
              nullable: true
            cep:
              type: string
              nullable: true
            uf:
              type: string
              nullable: true
            pais:
              type: string
              nullable: true
          type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: Bearer

````