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

# Patients List

> Cada registro incluye `last_session` con `starts_at` y `status` del último turno
que ya terminó y no fue cancelado en el consultorio. Si no hay un turno anterior
que cumpla esas condiciones, `last_session` es `null`.



## OpenAPI

````yaml /openapi.json get /api/v1/patients
openapi: 3.1.0
info:
  description: >-
    Especificación pública de la API de ViVi. Incluye solo los endpoints del
    dominio de la práctica: agenda, pacientes, conversaciones, clínica y cuenta.
  title: ViVi
  version: 0.1.0
servers:
  - url: https://api.holavivi.app
security: []
tags:
  - name: Agenda
  - name: Pacientes
  - name: Conversaciones
  - name: Clínica
  - name: Cuenta y panel
paths:
  /api/v1/patients:
    get:
      tags:
        - Pacientes
      summary: Patients List
      description: >-
        Cada registro incluye `last_session` con `starts_at` y `status` del
        último turno

        que ya terminó y no fue cancelado en el consultorio. Si no hay un turno
        anterior

        que cumpla esas condiciones, `last_session` es `null`.
      operationId: patients_list_api_v1_patients_get
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: 1
            minimum: 1
            title: Page
            type: integer
        - in: query
          name: per_page
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            title: Per Page
            type: integer
        - in: query
          name: q
          required: false
          schema:
            anyOf:
              - maxLength: 100
                minLength: 1
                type: string
              - type: 'null'
            title: Q
        - in: query
          name: estado
          required: false
          schema:
            anyOf:
              - enum:
                  - activo
                  - pendiente_whatsapp
                  - bloqueado
                  - archivado
                type: string
              - type: 'null'
            title: Estado
        - in: query
          name: onboarding_stage
          required: false
          schema:
            anyOf:
              - enum:
                  - invited
                  - email_verified
                  - terms_accepted
                  - whatsapp_activated
                  - intake_complete
                  - consent_signed
                  - agreement_ready
                  - complete
                type: string
              - type: 'null'
            title: Onboarding Stage
        - in: query
          name: sort
          required: false
          schema:
            default: newest
            enum:
              - newest
              - name
            title: Sort
            type: string
        - in: query
          name: has_open_conflict
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Has Open Conflict
        - in: query
          name: has_overdue_invoice
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Has Overdue Invoice
        - in: query
          name: no_next_session
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: No Next Session
        - in: query
          name: billing_category
          required: false
          schema:
            anyOf:
              - enum:
                  - programmed
                  - irregular
                type: string
              - type: 'null'
            title: Billing Category
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      description: >-
        La credencial de sesión del consultorio o del paciente, o una clave API
        del consultorio, como token Bearer.
      scheme: bearer
      type: http

````

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