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

# Listar leads

> Obtiene una lista paginada de leads/prospectos con capacidades de filtrado.
Incluye información del perfil, canal de origen, proyecto/producto/unidad de interés.



## OpenAPI

````yaml /api/openapi.json get /leads
openapi: 3.1.0
info:
  title: Isprop API
  version: 1.0.0
  description: API para gestión de unidades inmobiliarias y leads de Isprop
servers:
  - url: https://{tenantDomain}/api/v1
    description: Dominio del tenant
    variables:
      tenantDomain:
        default: tenant.example.com
        description: Dominio asignado al tenant, sin protocolo ni ruta.
security:
  - http: []
tags:
  - name: Unit
  - name: Project
  - name: Product
  - name: Typology
  - name: Lead
  - name: Lead Channel
  - name: Attribute
paths:
  /leads:
    get:
      tags:
        - Lead
      summary: Listar leads
      description: >-
        Obtiene una lista paginada de leads/prospectos con capacidades de
        filtrado.

        Incluye información del perfil, canal de origen,
        proyecto/producto/unidad de interés.
      operationId: listLeads
      parameters:
        - name: page
          in: query
          description: Parámetros de paginación
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: per_page
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
            maximum: 100
        - name: profile_id
          in: query
          description: Parámetros de filtrado
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
        - name: lead_channel_id
          in: query
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: project_id
          in: query
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: product_id
          in: query
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: unit_id
          in: query
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: status
          in: query
          schema:
            type:
              - string
              - 'null'
            enum:
              - nuevo
              - contactado
              - presupuestado
              - cotizado
              - convertido
              - dormido
              - descalificado
              - muerto
        - name: campaign
          in: query
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: source
          in: query
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: tag
          in: query
          schema:
            type:
              - string
              - 'null'
            maxLength: 50
        - name: min_score
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 0
            maximum: 100
        - name: max_score
          in: query
          schema:
            type:
              - integer
              - 'null'
            minimum: 0
            maximum: 100
        - name: converted
          in: query
          schema:
            type:
              - boolean
              - 'null'
        - name: created_from
          in: query
          description: Filtros de fecha
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: created_to
          in: query
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: last_contacted_from
          in: query
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: last_contacted_to
          in: query
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: sort_by
          in: query
          description: Parámetros de ordenamiento
          schema:
            type:
              - string
              - 'null'
            enum:
              - created_at
              - updated_at
              - last_contacted_at
              - converted_at
              - score
              - status
        - name: sort_direction
          in: query
          schema:
            type:
              - string
              - 'null'
            enum:
              - asc
              - desc
        - name: include
          in: query
          description: Incluir relaciones
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Paginated set of `LeadListItem`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeadListItem'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      from:
                        type:
                          - integer
                          - 'null'
                      last_page:
                        type: integer
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                      total:
                        type: integer
                        description: Total number of items being paginated.
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    LeadListItem:
      type: object
      properties:
        id:
          type: string
        profile:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            full_name:
              type: string
            email:
              type: string
            phone:
              type: string
          required:
            - first_name
            - last_name
            - full_name
            - email
            - phone
        campaign:
          type: string
        source:
          type: string
        status:
          type: string
        status_label:
          type: string
        score:
          type: string
        temperature:
          type: string
        tags:
          type: string
        last_contacted_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        project:
          anyOf:
            - $ref: '#/components/schemas/ProjectSummary'
              description: Relaciones resumidas (solo id + name)
            - type: 'null'
        product:
          anyOf:
            - $ref: '#/components/schemas/ProductSummary'
            - type: 'null'
        unit:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            sku:
              type: string
            name:
              type: string
          required:
            - id
            - sku
            - name
        lost_reason:
          type: string
        lead_channel:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            key:
              type: string
          required:
            - id
            - name
            - key
        agent:
          anyOf:
            - $ref: '#/components/schemas/Agent'
            - type: 'null'
      required:
        - id
        - campaign
        - source
        - status
        - status_label
        - score
        - temperature
        - last_contacted_at
        - created_at
        - updated_at
        - lost_reason
      title: LeadListItem
    ProjectSummary:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        tagline:
          type: string
        store_active:
          type: string
        logos:
          type:
            - array
            - 'null'
          items: {}
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSummary'
            - type: 'null'
        product_types:
          type:
            - array
            - 'null'
          description: >-
            Tipos de producto distintos entre los products del proyecto (ej:
            ["lotes"] o ["departamentos","cocheras","oficinas"])
          items: {}
        lots_map:
          type:
            - array
            - 'null'
          description: >-
            Config del overlay de tiles para la vista de mapa de lotes (null si
            el emprendimiento no tiene uno definido).
          items: {}
        has_lots_map:
          type: boolean
          description: >-
            Conveniencia para mostrar el toggle Lista/Mapa sin inspeccionar
            `lots_map`.
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - tagline
        - store_active
        - logos
        - product_types
        - lots_map
        - has_lots_map
        - published_at
        - created_at
        - updated_at
      title: ProjectSummary
    ProductSummary:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        product_type:
          type: string
        product_type_label:
          type: string
        type_labels:
          type: object
          properties:
            sector:
              anyOf:
                - type: string
                - type: string
                  enum:
                    - Sector
            unit:
              anyOf:
                - type: string
                - type: string
                  enum:
                    - Unidad
          required:
            - sector
            - unit
        thumbnail_url:
          type:
            - string
            - 'null'
        store_active:
          type: string
        logos:
          type:
            - array
            - 'null'
          description: >-
            Override: null cuando el producto no tiene logo propio (el front cae
            al del project).
          items: {}
        project:
          $ref: '#/components/schemas/ProjectSummary'
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSummary'
            - type: 'null'
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - product_type
        - product_type_label
        - type_labels
        - thumbnail_url
        - store_active
        - logos
        - published_at
        - created_at
        - updated_at
      title: ProductSummary
    Agent:
      type: object
      properties:
        id:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        email:
          type: string
        phone:
          type: string
        media:
          type: object
          properties:
            avatar:
              anyOf:
                - $ref: '#/components/schemas/MediaImage'
                - type: 'null'
          required:
            - avatar
      required:
        - id
        - first_name
        - last_name
        - full_name
        - email
        - phone
        - media
      title: Agent
    AddressSummary:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
        neighborhood:
          type: string
      required:
        - country
        - state
        - city
        - neighborhood
      title: AddressSummary
    MediaImage:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        file_name:
          type: string
        mime_type:
          type: string
        size:
          type: string
        order:
          type: string
        urls:
          type: string
      required:
        - id
        - name
        - file_name
        - mime_type
        - size
        - order
        - urls
      title: MediaImage
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: sanctum

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.