swagger: '2.0'
info:
  title: Qwetu Link API
  description: Comprehensive property management system API documentation
  termsOfService: https://www.yoursite.com/policies/terms/
  contact:
    email: contact@qwetulink.com
  license:
    name: BSD License
  version: v1
host: qwetulinks.co.ke
schemes:
- http
basePath: /api
consumes:
- application/json
produces:
- application/json
securityDefinitions:
  Basic:
    type: basic
security:
- Basic: []
paths:
  /caretaker/change-password/:
    post:
      operationId: caretaker_change-password_create
      description: Allows the caretaker to change their password
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/ChangePassword'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/ChangePassword'
      tags:
      - caretaker
    parameters: []
  /caretaker/dashboard/:
    get:
      operationId: caretaker_dashboard_list
      description: Get comprehensive caretaker dashboard data
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/CaretakerDashboard'
      tags:
      - caretaker
    parameters: []
  /caretaker/lease-assign/:
    post:
      operationId: caretaker_lease-assign_create
      description: Creating A Lease To Assign A Tenant A Unit
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LeaseCreate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/LeaseCreate'
      tags:
      - caretaker
    parameters: []
  /caretaker/leases/:
    get:
      operationId: caretaker_leases_list
      description: List all caretaker lease agreements
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LeaseList'
      tags:
      - caretaker
    parameters: []
  /caretaker/leases/active/:
    get:
      operationId: caretaker_leases_active_list
      description: List all caretaker tenants active lease agreements
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LeaseList'
      tags:
      - caretaker
    parameters: []
  /caretaker/leases/expiring/:
    get:
      operationId: caretaker_leases_expiring_list
      description: List caretaker leases expiring in the next 30 days
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LeaseList'
      tags:
      - caretaker
    parameters: []
  /caretaker/leases/{id}/renew/:
    post:
      operationId: caretaker_leases_renew_create
      description: Renew an existing lease agreement
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LeaseRenew'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/LeaseRenew'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/leases/{id}/terminate/:
    put:
      operationId: caretaker_leases_terminate_update
      description: Terminate a lease agreement
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LeaseTerminate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LeaseTerminate'
      tags:
      - caretaker
    patch:
      operationId: caretaker_leases_terminate_partial_update
      description: Terminate a lease agreement
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LeaseTerminate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LeaseTerminate'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/maintenance/:
    get:
      operationId: caretaker_maintenance_list
      description: Lists maintenance requests for property units assigned to the caretaker
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/MaintenanceList'
      tags:
      - caretaker
    parameters: []
  /caretaker/maintenance/{id}/:
    get:
      operationId: caretaker_maintenance_read
      description: Retrieve and update a specific maintenance request
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceDetails'
      tags:
      - caretaker
    put:
      operationId: caretaker_maintenance_update
      description: Retrieve and update a specific maintenance request
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceDetails'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceDetails'
      tags:
      - caretaker
    patch:
      operationId: caretaker_maintenance_partial_update
      description: Retrieve and update a specific maintenance request
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceDetails'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceDetails'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/profile/:
    get:
      operationId: caretaker_profile_read
      description: Retrieves the profile of the currently authenticated caretaker
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CaretakerProfile'
      tags:
      - caretaker
    parameters: []
  /caretaker/profile/update/:
    put:
      operationId: caretaker_profile_update_update
      description: Allows the caretaker to update their profile.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CaretakerUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CaretakerUpdate'
      tags:
      - caretaker
    patch:
      operationId: caretaker_profile_update_partial_update
      description: Allows the caretaker to update their profile.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CaretakerUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CaretakerUpdate'
      tags:
      - caretaker
    parameters: []
  /caretaker/properties/:
    get:
      operationId: caretaker_properties_list
      description: Lists all properties assigned to the currently authenticated caretaker.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/AssignedProperty'
      tags:
      - caretaker
    parameters: []
  /caretaker/properties/{id}/:
    get:
      operationId: caretaker_properties_read
      description: Retrieves details for a specific property assigned to the caretaker.
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/PropertyDetailsView'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/tenant-disable/{id}/:
    put:
      operationId: caretaker_tenant-disable_update
      description: Disable Tenant Account
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    patch:
      operationId: caretaker_tenant-disable_partial_update
      description: Disable Tenant Account
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/tenant-transfer/{id}/:
    put:
      operationId: caretaker_tenant-transfer_update
      description: Transfering Tenant To A New Unit
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    patch:
      operationId: caretaker_tenant-transfer_partial_update
      description: Transfering Tenant To A New Unit
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /caretaker/tenants/:
    get:
      operationId: caretaker_tenants_list
      description: Lists tenants in properties assigned to the caretaker.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    parameters: []
  /caretaker/tenants/create/:
    post:
      operationId: caretaker_tenants_create_create
      description: Allows caretakers to create new tenants for their landlord/business.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateTenant'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/CreateTenant'
      tags:
      - caretaker
    parameters: []
  /caretaker/tenants/{id}/:
    get:
      operationId: caretaker_tenants_read
      description: Retrieve details for a specific tenant.
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    put:
      operationId: caretaker_tenants_update
      description: Retrieve details for a specific tenant.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    patch:
      operationId: caretaker_tenants_partial_update
      description: Retrieve details for a specific tenant.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantCaretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantCaretaker'
      tags:
      - caretaker
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/admin/maintenance/:
    get:
      operationId: landlords_admin_maintenance_list
      description: Admin-only global maintenance requests view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    post:
      operationId: landlords_admin_maintenance_create
      description: Admin-only global maintenance requests view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    parameters: []
  /landlords/admin/maintenance/{id}/:
    get:
      operationId: landlords_admin_maintenance_read
      description: Admin-only global maintenance requests view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    put:
      operationId: landlords_admin_maintenance_update
      description: Admin-only global maintenance requests view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    patch:
      operationId: landlords_admin_maintenance_partial_update
      description: Admin-only global maintenance requests view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    delete:
      operationId: landlords_admin_maintenance_delete
      description: Admin-only global maintenance requests view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/amenities/:
    get:
      operationId: landlords_amenities_list
      description: Admin-only global amenities view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Amenity'
      tags:
      - landlords
    post:
      operationId: landlords_amenities_create
      description: Admin-only global amenities view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    parameters: []
  /landlords/amenities/{id}/:
    get:
      operationId: landlords_amenities_read
      description: Admin-only global amenities view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    put:
      operationId: landlords_amenities_update
      description: Admin-only global amenities view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    patch:
      operationId: landlords_amenities_partial_update
      description: Admin-only global amenities view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    delete:
      operationId: landlords_amenities_delete
      description: Admin-only global amenities view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/caretaker/maintenance/:
    get:
      operationId: landlords_caretaker_maintenance_list
      description: Caretakers manage requests for properties they are assigned to
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    post:
      operationId: landlords_caretaker_maintenance_create
      description: Caretakers manage requests for properties they are assigned to
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    parameters: []
  /landlords/caretaker/maintenance/{id}/:
    get:
      operationId: landlords_caretaker_maintenance_read
      description: Caretakers manage requests for properties they are assigned to
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    put:
      operationId: landlords_caretaker_maintenance_update
      description: Caretakers manage requests for properties they are assigned to
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    patch:
      operationId: landlords_caretaker_maintenance_partial_update
      description: Caretakers manage requests for properties they are assigned to
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    delete:
      operationId: landlords_caretaker_maintenance_delete
      description: Caretakers manage requests for properties they are assigned to
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/caretakers/:
    get:
      operationId: landlords_caretakers_list
      description: Admin global caretakers view (bypass ownership rules)
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    post:
      operationId: landlords_caretakers_create
      description: Admin global caretakers view (bypass ownership rules)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    parameters: []
  /landlords/caretakers/{id}/:
    get:
      operationId: landlords_caretakers_read
      description: Admin global caretakers view (bypass ownership rules)
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    put:
      operationId: landlords_caretakers_update
      description: Admin global caretakers view (bypass ownership rules)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    patch:
      operationId: landlords_caretakers_partial_update
      description: Admin global caretakers view (bypass ownership rules)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    delete:
      operationId: landlords_caretakers_delete
      description: Admin global caretakers view (bypass ownership rules)
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/:
    get:
      operationId: landlords_landlords_list
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LandlordProfile'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LandlordProfile'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/LandlordProfile'
      tags:
      - landlords
    parameters: []
  /landlords/landlords/me/:
    get:
      operationId: landlords_landlords_me
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LandlordProfile'
      tags:
      - landlords
    parameters: []
  /landlords/landlords/{id}/:
    get:
      operationId: landlords_landlords_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LandlordProfile'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LandlordUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LandlordUpdate'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LandlordUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LandlordUpdate'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      description: A unique value identifying this Landlord.
      required: true
      type: string
  /landlords/landlords/{id}/profile/change-password/:
    post:
      operationId: landlords_landlords_profile_change_password
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LandlordUpdate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/LandlordUpdate'
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      description: A unique value identifying this Landlord.
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/caretakers/:
    get:
      operationId: landlords_landlords_caretakers_list
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_caretakers_create
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/caretakers/{id}/:
    get:
      operationId: landlords_landlords_caretakers_read
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_caretakers_update
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_caretakers_partial_update
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Caretaker'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Caretaker'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_caretakers_delete
      description: |-
        Landlord-level caretakers management:
          - Landlords can only manage caretakers tied to their landlord id and business.
          - Admins bypass (handled by a separate Admin viewset).
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/leases/:
    get:
      operationId: landlords_landlords_leases_list
      description: CRUD for Lease agreements
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Lease'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_leases_create
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/leases/{id}/:
    get:
      operationId: landlords_landlords_leases_read
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_leases_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_leases_partial_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_leases_delete
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/leases/{id}/terminate/:
    patch:
      operationId: landlords_landlords_leases_terminate
      description: |-
        Manually terminate a lease before its end date.
        Only admins/superusers or the landlord who owns the property can terminate.
        Logs unauthorized access attempts.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/:
    get:
      operationId: landlords_landlords_properties_list
      description: Landlord's properties (nested under landlord_pk)
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Property'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_properties_create
      description: Landlord's properties (nested under landlord_pk)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{id}/:
    get:
      operationId: landlords_landlords_properties_read
      description: Landlord's properties (nested under landlord_pk)
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_properties_update
      description: Landlord's properties (nested under landlord_pk)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_properties_partial_update
      description: Landlord's properties (nested under landlord_pk)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_properties_delete
      description: Landlord's properties (nested under landlord_pk)
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/amenities/:
    get:
      operationId: landlords_landlords_properties_amenities_list
      description: Landlords manage amenities, tenants can only view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Amenity'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_properties_amenities_create
      description: Landlords manage amenities, tenants can only view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/amenities/{id}/:
    get:
      operationId: landlords_landlords_properties_amenities_read
      description: Landlords manage amenities, tenants can only view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_properties_amenities_update
      description: Landlords manage amenities, tenants can only view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_properties_amenities_partial_update
      description: Landlords manage amenities, tenants can only view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Amenity'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Amenity'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_properties_amenities_delete
      description: Landlords manage amenities, tenants can only view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/leases/:
    get:
      operationId: landlords_landlords_properties_leases_list
      description: CRUD for Lease agreements
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Lease'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_properties_leases_create
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/leases/{id}/:
    get:
      operationId: landlords_landlords_properties_leases_read
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_properties_leases_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_properties_leases_partial_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_properties_leases_delete
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/leases/{id}/terminate/:
    patch:
      operationId: landlords_landlords_properties_leases_terminate
      description: |-
        Manually terminate a lease before its end date.
        Only admins/superusers or the landlord who owns the property can terminate.
        Logs unauthorized access attempts.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/units/:
    get:
      operationId: landlords_landlords_properties_units_list
      description: Landlord's units (nested under property)
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Units'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_properties_units_create
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/properties/{property_pk}/units/{id}/:
    get:
      operationId: landlords_landlords_properties_units_read
      description: Landlord's units (nested under property)
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_properties_units_update
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_properties_units_partial_update
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_properties_units_delete
      description: Landlord's units (nested under property)
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: property_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/tenants/:
    get:
      operationId: landlords_landlords_tenants_list
      description: ''
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Tenant'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_tenants_create
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/tenants/{id}/:
    get:
      operationId: landlords_landlords_tenants_read
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_tenants_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_tenants_partial_update
      description: ''
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_tenants_delete
      description: ''
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/units/:
    get:
      operationId: landlords_landlords_units_list
      description: Landlord's units (nested under property)
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Units'
      tags:
      - landlords
    post:
      operationId: landlords_landlords_units_create
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
  /landlords/landlords/{landlord_pk}/units/{id}/:
    get:
      operationId: landlords_landlords_units_read
      description: Landlord's units (nested under property)
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    put:
      operationId: landlords_landlords_units_update
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    patch:
      operationId: landlords_landlords_units_partial_update
      description: Landlord's units (nested under property)
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    delete:
      operationId: landlords_landlords_units_delete
      description: Landlord's units (nested under property)
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: landlord_pk
      in: path
      required: true
      type: string
    - name: id
      in: path
      required: true
      type: string
  /landlords/leases/:
    get:
      operationId: landlords_leases_list
      description: CRUD for Lease agreements
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Lease'
      tags:
      - landlords
    post:
      operationId: landlords_leases_create
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters: []
  /landlords/leases/{id}/:
    get:
      operationId: landlords_leases_read
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    put:
      operationId: landlords_leases_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    patch:
      operationId: landlords_leases_partial_update
      description: CRUD for Lease agreements
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    delete:
      operationId: landlords_leases_delete
      description: CRUD for Lease agreements
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/leases/{id}/terminate/:
    patch:
      operationId: landlords_leases_terminate
      description: |-
        Manually terminate a lease before its end date.
        Only admins/superusers or the landlord who owns the property can terminate.
        Logs unauthorized access attempts.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Lease'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Lease'
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      description: A unique value identifying this Lease.
      required: true
      type: string
  /landlords/properties/:
    get:
      operationId: landlords_properties_list
      description: Admin-only global properties view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Property'
      tags:
      - landlords
    post:
      operationId: landlords_properties_create
      description: Admin-only global properties view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    parameters: []
  /landlords/properties/{id}/:
    get:
      operationId: landlords_properties_read
      description: Admin-only global properties view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    put:
      operationId: landlords_properties_update
      description: Admin-only global properties view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    patch:
      operationId: landlords_properties_partial_update
      description: Admin-only global properties view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Property'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Property'
      tags:
      - landlords
    delete:
      operationId: landlords_properties_delete
      description: Admin-only global properties view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/tenant/maintenance/:
    get:
      operationId: landlords_tenant_maintenance_list
      description: Tenants can create/view their own maintenance requests
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    post:
      operationId: landlords_tenant_maintenance_create
      description: Tenants can create/view their own maintenance requests
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    parameters: []
  /landlords/tenant/maintenance/{id}/:
    get:
      operationId: landlords_tenant_maintenance_read
      description: Tenants can create/view their own maintenance requests
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    put:
      operationId: landlords_tenant_maintenance_update
      description: Tenants can create/view their own maintenance requests
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    patch:
      operationId: landlords_tenant_maintenance_partial_update
      description: Tenants can create/view their own maintenance requests
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceRequest'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceRequest'
      tags:
      - landlords
    delete:
      operationId: landlords_tenant_maintenance_delete
      description: Tenants can create/view their own maintenance requests
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/tenants/:
    get:
      operationId: landlords_tenants_list
      description: Admin-only global tenants view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Tenant'
      tags:
      - landlords
    post:
      operationId: landlords_tenants_create
      description: Admin-only global tenants view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    parameters: []
  /landlords/tenants/{id}/:
    get:
      operationId: landlords_tenants_read
      description: Admin-only global tenants view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    put:
      operationId: landlords_tenants_update
      description: Admin-only global tenants view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    patch:
      operationId: landlords_tenants_partial_update
      description: Admin-only global tenants view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Tenant'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Tenant'
      tags:
      - landlords
    delete:
      operationId: landlords_tenants_delete
      description: Admin-only global tenants view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /landlords/units/:
    get:
      operationId: landlords_units_list
      description: Admin-only global units view
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/Units'
      tags:
      - landlords
    post:
      operationId: landlords_units_create
      description: Admin-only global units view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    parameters: []
  /landlords/units/{id}/:
    get:
      operationId: landlords_units_read
      description: Admin-only global units view
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    put:
      operationId: landlords_units_update
      description: Admin-only global units view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    patch:
      operationId: landlords_units_partial_update
      description: Admin-only global units view
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Units'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Units'
      tags:
      - landlords
    delete:
      operationId: landlords_units_delete
      description: Admin-only global units view
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - landlords
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /notifications/:
    get:
      operationId: notifications_list
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
      tags:
      - notifications
    parameters: []
  /tenant/lease/:
    get:
      operationId: tenant_lease_list
      description: List Leases Associated with the Tenant
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/LeaseList'
      tags:
      - tenant
    parameters: []
  /tenant/lease/{id}/:
    get:
      operationId: tenant_lease_read
      description: Retrieve Tenant Lease Details
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/LeaseDetail'
      tags:
      - tenant
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /tenant/maintenance/create/:
    post:
      operationId: tenant_maintenance_create_create
      description: Create a Maintainace request and automatically associate it with
        the current tenant and their current unit.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceCreate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceCreate'
      tags:
      - tenant
    parameters: []
  /tenant/maintenance/history/:
    get:
      operationId: tenant_maintenance_history_list
      description: List Tenants Maintainace Requests.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/MaintenanceList'
      tags:
      - tenant
    parameters: []
  /tenant/maintenance/{id}/:
    get:
      operationId: tenant_maintenance_read
      description: Update & Delete Tenants Maintainace Requests by ID.
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceUpdate'
      tags:
      - tenant
    put:
      operationId: tenant_maintenance_update
      description: Update & Delete Tenants Maintainace Requests by ID.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceUpdate'
      tags:
      - tenant
    patch:
      operationId: tenant_maintenance_partial_update
      description: Update & Delete Tenants Maintainace Requests by ID.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/MaintenanceUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/MaintenanceUpdate'
      tags:
      - tenant
    delete:
      operationId: tenant_maintenance_delete
      description: Update & Delete Tenants Maintainace Requests by ID.
      parameters: []
      responses:
        '204':
          description: ''
      tags:
      - tenant
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /tenant/profile/:
    get:
      operationId: tenant_profile_read
      description: Retrive Authenicated Tenants Profile
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantProfile'
      tags:
      - tenant
    parameters: []
  /tenant/profile/change-password/:
    post:
      operationId: tenant_profile_change-password_create
      description: Change tenant password
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/ChangePassword'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/ChangePassword'
      tags:
      - tenant
    parameters: []
  /tenant/profile/update/:
    put:
      operationId: tenant_profile_update_update
      description: Allow the Tenant To Update Their Profile
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantUpdate'
      tags:
      - tenant
    patch:
      operationId: tenant_profile_update_partial_update
      description: Allow the Tenant To Update Their Profile
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/TenantUpdate'
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/TenantUpdate'
      tags:
      - tenant
    parameters: []
  /tenant/properties/:
    get:
      operationId: tenant_properties_list
      description: Lists all properties under the landlord(s) of the currently authenticated
        tenant.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        type: string
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        type: integer
      responses:
        '200':
          description: ''
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: uri
                x-nullable: true
              previous:
                type: string
                format: uri
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/AssignedProperty'
      tags:
      - tenant
    parameters: []
  /tenant/property/{id}/:
    get:
      operationId: tenant_property_read
      description: Lists Details properties under the currently authenticated tenant
        landlord.
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/PropertyDetailsView'
      tags:
      - tenant
    parameters:
    - name: id
      in: path
      required: true
      type: string
  /users/admin/create-landlord/:
    post:
      operationId: users_admin_create-landlord_create
      summary: Create a new landlord (superuser only)
      description: Creates a landlord and business profile, sends OTP to email.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LandlordCreate'
      responses:
        '201':
          description: Landlord created successfully
      tags:
      - users
    parameters: []
  /users/login/:
    post:
      operationId: users_login_create
      summary: User login
      description: Authenticates user and returns login data with redirect URL.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/UserLogin'
      responses:
        '200':
          description: Login successful
      tags:
      - users
    parameters: []
  /users/logout/:
    post:
      operationId: users_logout_create
      summary: Log out user
      description: Logs out the authenticated user.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/LogoutUser'
      responses:
        '204':
          description: Logged out successfully
      tags:
      - users
    parameters: []
  /users/password-reset-confirm/:
    patch:
      operationId: users_password-reset-confirm_partial_update
      summary: Reset password with OTP
      description: Resets user's password after OTP verification.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/ResetPassword'
      responses:
        '200':
          description: Password reset successful
        '400':
          description: Invalid email or OTP
        '500':
          description: Error occurred
      tags:
      - users
    parameters: []
  /users/password-reset/:
    post:
      operationId: users_password-reset_create
      summary: Request password reset OTP
      description: Sends OTP to user's email for password reset.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/PasswordReset'
      responses:
        '200':
          description: OTP sent to email
      tags:
      - users
    parameters: []
  /users/register/:
    post:
      operationId: users_register_create
      summary: Register a new tenant user
      description: Registers a new tenant user and sends OTP to email.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/UserRegister'
      responses:
        '201':
          description: User registered successfully
      tags:
      - users
    parameters: []
  /users/verify-otp/:
    post:
      operationId: users_verify-otp_create
      summary: Verify OTP code
      description: Verifies OTP code for email confirmation.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/OTPVerify'
      responses:
        '200':
          description: Email verified successfully
        '400':
          description: OTP expired
        '404':
          description: Invalid passcode
      tags:
      - users
    parameters: []
definitions:
  ChangePassword:
    required:
    - old_password
    - new_password
    - confirm_password
    type: object
    properties:
      old_password:
        title: Old password
        type: string
        minLength: 1
      new_password:
        title: New password
        type: string
        minLength: 1
      confirm_password:
        title: Confirm password
        type: string
        minLength: 1
  CaretakerDashboard:
    required:
    - property_count
    - unit_count
    - available_units
    - occupied_units
    - tenant_count
    - active_lease_count
    - expiring_lease_count
    - open_maintenance
    - resolved_maintenance
    - total_maintenance
    type: object
    properties:
      property_count:
        title: Property count
        type: integer
      unit_count:
        title: Unit count
        type: integer
      available_units:
        title: Available units
        type: integer
      occupied_units:
        title: Occupied units
        type: integer
      tenant_count:
        title: Tenant count
        type: integer
      active_lease_count:
        title: Active lease count
        type: integer
      expiring_lease_count:
        title: Expiring lease count
        type: integer
      open_maintenance:
        title: Open maintenance
        type: integer
      resolved_maintenance:
        title: Resolved maintenance
        type: integer
      total_maintenance:
        title: Total maintenance
        type: integer
  LeaseCreate:
    required:
    - unit
    - tenant
    - start_date
    - end_date
    - rent_amount
    - deposit_amount
    type: object
    properties:
      unit:
        title: Unit
        type: string
      tenant:
        title: Tenant
        type: string
      start_date:
        title: Start date
        type: string
        format: date
      end_date:
        title: End date
        type: string
        format: date
      rent_amount:
        title: Rent Amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit Amount
        type: string
        format: decimal
      payment_frequency:
        title: Payment frequency
        type: string
        enum:
        - monthly
        - quarterly
        - yearly
  LeaseList:
    required:
    - start_date
    - deposit_amount
    - end_date
    - rent_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit:
        title: Unit
        type: string
        readOnly: true
      tenant:
        title: Tenant
        type: string
        readOnly: true
      start_date:
        title: Start date
        type: string
        format: date
      deposit_amount:
        title: Deposit Amount
        type: string
        format: decimal
      end_date:
        title: End date
        type: string
        format: date
      rent_amount:
        title: Rent Amount
        type: string
        format: decimal
      status:
        title: Status
        type: string
        enum:
        - active
        - terminated
        - pending
      payment_frequency:
        title: Payment frequency
        type: string
        enum:
        - monthly
        - quarterly
        - yearly
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  LeaseRenew:
    required:
    - end_date
    type: object
    properties:
      end_date:
        title: End date
        type: string
        format: date
  LeaseTerminate:
    required:
    - end_date
    type: object
    properties:
      end_date:
        title: End date
        type: string
        format: date
      status:
        title: Status
        type: string
        enum:
        - active
        - terminated
        - pending
        readOnly: true
  MaintenanceList:
    required:
    - title
    - description
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      unit:
        title: Unit
        type: string
        readOnly: true
      tenant:
        title: Tenant
        type: string
        readOnly: true
      title:
        title: Title
        type: string
        maxLength: 255
        minLength: 1
      description:
        title: Description
        type: string
        minLength: 1
      image:
        title: Image
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      status:
        title: Status
        type: string
        enum:
        - pending
        - in_progress
        - resolved
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  Units:
    required:
    - property
    - unit_number
    - rent_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      property:
        title: Property
        type: string
        format: uuid
      unit_number:
        title: Unit Number
        type: string
        maxLength: 50
        minLength: 1
      unit_floor:
        title: Floor Number
        type: integer
        maximum: 2147483647
        minimum: -2147483648
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - available
        - occupied
        - booked
        - maintenance
      rent_amount:
        title: Rent amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit amount
        type: string
        format: decimal
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  MiniProfile:
    required:
    - username
    - first_name
    - last_name
    - email
    type: object
    properties:
      username:
        title: Username
        type: string
        maxLength: 200
        minLength: 1
      first_name:
        title: First Name
        type: string
        maxLength: 100
        minLength: 1
      last_name:
        title: Last Name
        type: string
        maxLength: 100
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        minLength: 1
      role:
        title: Role
        type: string
        enum:
        - admin
        - landlord
        - caretaker
        - tenant
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      gender:
        title: Gender
        type: string
        enum:
        - male
        - female
        - other
      business:
        title: Business
        description: Nullable for system admins not tied to a business
        type: string
        x-nullable: true
  TenantProfile:
    required:
    - user
    - business
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      user:
        $ref: '#/definitions/MiniProfile'
      business:
        title: Business
        type: string
      tenant_id:
        title: Tenant id
        type: string
        maxLength: 100
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - active
        - paid
        - overdue
      previous_address:
        title: Previous address
        type: string
      id_passport:
        title: Id passport
        type: string
        maxLength: 255
        x-nullable: true
      nxt_full_names:
        title: Nxt full names
        type: string
        maxLength: 255
        x-nullable: true
      nxt_id_passport_no:
        title: Nxt id passport no
        type: string
        maxLength: 255
        x-nullable: true
      nxt_email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        x-nullable: true
      nxt_phone_number:
        title: Nxt phone number
        type: string
        maxLength: 13
        x-nullable: true
      nxt_relationship:
        title: Nxt relationship
        type: string
        maxLength: 100
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  MaintenanceDetails:
    required:
    - unit
    - tenant
    - title
    - description
    - reported_by
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      unit:
        $ref: '#/definitions/Units'
      tenant:
        $ref: '#/definitions/TenantProfile'
      image:
        title: Image
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      title:
        title: Title
        type: string
        maxLength: 255
        minLength: 1
      description:
        title: Description
        type: string
        minLength: 1
      status:
        title: Status
        type: string
        enum:
        - pending
        - in_progress
        - resolved
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
      reported_by:
        type: array
        items:
          type: string
        uniqueItems: true
  MiniBusinessProfile:
    required:
    - name
    - short_name
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      name:
        title: Name
        type: string
        maxLength: 255
        minLength: 1
      short_name:
        title: Short name
        type: string
        maxLength: 100
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      address:
        title: Address
        type: string
        x-nullable: true
      primary_activity:
        title: Primary activity
        type: string
        maxLength: 100
        x-nullable: true
      description:
        title: Description
        type: string
        x-nullable: true
      logo:
        title: Logo
        type: string
        readOnly: true
        x-nullable: true
        format: uri
  CaretakerProfile:
    required:
    - user
    - business
    - address
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      user:
        $ref: '#/definitions/MiniProfile'
      caretaker_id:
        title: Caretaker id
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      employee_no:
        title: Employee no
        type: string
        readOnly: true
        minLength: 1
      business:
        $ref: '#/definitions/MiniBusinessProfile'
      salary:
        title: Salary
        type: string
        format: decimal
        readOnly: true
        x-nullable: true
      id_passport:
        title: Id passport
        type: string
        maxLength: 100
        x-nullable: true
      address:
        title: Address
        type: string
        minLength: 1
      emergency_contact:
        title: Emergency contact
        type: string
        maxLength: 13
        x-nullable: true
      emergency_contact_relationship:
        title: Emergency contact relationship
        type: string
        maxLength: 15
      emergency_contact_full_names:
        title: Emergency contact full names
        type: string
        maxLength: 255
        x-nullable: true
      emergency_contact_id_passport_no:
        title: Emergency contact id passport no
        type: string
        maxLength: 255
        x-nullable: true
      invitation:
        title: Invitation
        type: string
        format: uuid
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  CaretakerUpdate:
    required:
    - address
    type: object
    properties:
      username:
        title: Username
        type: string
        minLength: 1
      first_name:
        title: First name
        type: string
        minLength: 1
      gender:
        title: Gender
        type: string
        minLength: 1
      last_name:
        title: Last name
        type: string
        minLength: 1
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        minLength: 1
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        format: uri
      id_passport:
        title: Id passport
        type: string
        maxLength: 100
        x-nullable: true
      address:
        title: Address
        type: string
        minLength: 1
      emergency_contact:
        title: Emergency contact
        type: string
        maxLength: 13
        x-nullable: true
      emergency_contact_relationship:
        title: Emergency contact relationship
        type: string
        maxLength: 15
      emergency_contact_full_names:
        title: Emergency contact full names
        type: string
        maxLength: 255
        x-nullable: true
      emergency_contact_id_passport_no:
        title: Emergency contact id passport no
        type: string
        maxLength: 255
        x-nullable: true
  Business:
    required:
    - name
    - short_name
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      name:
        title: Name
        type: string
        maxLength: 255
        minLength: 1
      short_name:
        title: Short name
        type: string
        maxLength: 100
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      address:
        title: Address
        type: string
        x-nullable: true
      primary_activity:
        title: Primary activity
        type: string
        maxLength: 100
        x-nullable: true
      description:
        title: Description
        type: string
        x-nullable: true
      logo:
        title: Logo
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      tax_id:
        title: Tax id
        type: string
        maxLength: 50
        x-nullable: true
      business_permit:
        title: Business permit
        type: string
        maxLength: 50
        x-nullable: true
      bank_name:
        title: Bank name
        type: string
        enum:
        - KCB
        - EQUITY BANK LTD
        - CO-OPERATIVE
        - FAMILY BANK LIMITED
        - ABSA BANK
        - NCBA BANK
        - STANDARD CHARTERED BANK (K) LTD
        - DIAMOND TRUST BANK
        - BANK OF BARODA
        - I & M BANK LIMITED
        x-nullable: true
      bank_account_number:
        title: Bank account number
        type: string
        maxLength: 50
        x-nullable: true
      mpesa_paybill:
        title: Mpesa paybill
        type: string
        maxLength: 50
        x-nullable: true
      mpesa_account_number:
        title: Mpesa account number
        type: string
        maxLength: 50
        x-nullable: true
      mpesa_till_no:
        title: Mpesa till no
        type: string
        maxLength: 50
        x-nullable: true
  LandlordProfile:
    required:
    - address
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      user:
        $ref: '#/definitions/MiniProfile'
      business_name:
        title: Business name
        type: string
        readOnly: true
        minLength: 1
      id_passport:
        title: Id passport
        type: string
        maxLength: 100
        x-nullable: true
      member_id:
        title: Member id
        type: string
        maxLength: 100
        x-nullable: true
      address:
        title: Address
        type: string
        minLength: 1
      emergency_contact:
        title: Emergency contact
        type: string
        maxLength: 13
        x-nullable: true
      emergency_contact_relationship:
        title: Emergency contact relationship
        type: string
        maxLength: 15
      emergency_contact_full_names:
        title: Emergency contact full names
        type: string
        maxLength: 255
        x-nullable: true
      emergency_contact_id_passport_no:
        title: Emergency contact id passport no
        type: string
        maxLength: 255
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  Amenity:
    required:
    - name
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      property_name:
        title: Property name
        type: string
        readOnly: true
        minLength: 1
      name:
        title: Name
        type: string
        maxLength: 100
        minLength: 1
      description:
        title: Description
        type: string
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  PropertyImage:
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      image:
        title: Image
        type: string
        readOnly: true
        format: uri
      caption:
        title: Caption
        type: string
        maxLength: 255
        x-nullable: true
  AssignedProperty:
    required:
    - property_name
    - property_address
    - apartment_type
    - number_of_bedrooms
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      business:
        $ref: '#/definitions/Business'
      landlord:
        $ref: '#/definitions/LandlordProfile'
      property_name:
        title: Property Name
        type: string
        maxLength: 255
        minLength: 1
      property_address:
        title: Property Address
        type: string
        minLength: 1
      apartment_type:
        title: Property Type
        type: string
        maxLength: 255
        minLength: 1
      amenities:
        type: array
        items:
          $ref: '#/definitions/Amenity'
        readOnly: true
      number_of_bedrooms:
        title: Number of bedrooms
        type: integer
        maximum: 2147483647
        minimum: -2147483648
      images:
        type: array
        items:
          $ref: '#/definitions/PropertyImage'
        readOnly: true
  Unit:
    required:
    - unit_number
    - rent_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit_number:
        title: Unit Number
        type: string
        maxLength: 50
        minLength: 1
      unit_floor:
        title: Floor Number
        type: integer
        maximum: 2147483647
        minimum: -2147483648
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - available
        - occupied
        - booked
        - maintenance
      rent_amount:
        title: Rent amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit amount
        type: string
        format: decimal
        x-nullable: true
      active_lease:
        title: Active lease
        type: string
        readOnly: true
      is_occupied:
        title: Is occupied
        type: string
        readOnly: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
  PropertyDetailsView:
    required:
    - property_name
    - property_address
    - apartment_type
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      property_name:
        title: Property Name
        type: string
        maxLength: 255
        minLength: 1
      property_address:
        title: Property Address
        type: string
        minLength: 1
      apartment_type:
        title: Property Type
        type: string
        maxLength: 255
        minLength: 1
      business:
        $ref: '#/definitions/Business'
      landlord:
        $ref: '#/definitions/LandlordProfile'
      amenities:
        type: array
        items:
          $ref: '#/definitions/Amenity'
        readOnly: true
      caretaker:
        $ref: '#/definitions/CaretakerProfile'
      images:
        type: array
        items:
          $ref: '#/definitions/PropertyImage'
        readOnly: true
      units:
        type: array
        items:
          $ref: '#/definitions/Unit'
        readOnly: true
      total_units:
        title: Total units
        type: integer
        readOnly: true
      occupied_units:
        title: Occupied units
        type: integer
        readOnly: true
      available_units:
        title: Available units
        type: integer
        readOnly: true
      pending_units:
        title: Pending units
        type: integer
        readOnly: true
      occupancy_rate:
        title: Occupancy rate
        type: number
        readOnly: true
      tenants:
        title: Tenants
        type: string
        readOnly: true
      total_tenants:
        title: Total tenants
        type: string
        readOnly: true
  UnitMini:
    required:
    - unit_number
    - rent_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit_number:
        title: Unit Number
        type: string
        maxLength: 50
        minLength: 1
      unit_floor:
        title: Floor Number
        type: integer
        maximum: 2147483647
        minimum: -2147483648
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - available
        - occupied
        - booked
        - maintenance
      rent_amount:
        title: Rent amount
        type: string
        format: decimal
  LeaseMini:
    required:
    - unit
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit:
        $ref: '#/definitions/UnitMini'
      property:
        title: Property
        type: string
        readOnly: true
      rent_amount:
        title: Rent Amount
        type: string
        format: decimal
        readOnly: true
      payment_frequency:
        title: Payment frequency
        type: string
        enum:
        - monthly
        - quarterly
        - yearly
        readOnly: true
      start_date:
        title: Start date
        type: string
        format: date
        readOnly: true
      end_date:
        title: End date
        type: string
        format: date
        readOnly: true
      status:
        title: Status
        type: string
        enum:
        - active
        - terminated
        - pending
        readOnly: true
  TenantCaretaker:
    required:
    - user
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      user:
        $ref: '#/definitions/MiniProfile'
      leases:
        type: array
        items:
          $ref: '#/definitions/LeaseMini'
        readOnly: true
      tenant_id:
        title: Tenant id
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      previous_address:
        title: Previous address
        type: string
        readOnly: true
        minLength: 1
      id_passport:
        title: Id passport
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - active
        - paid
        - overdue
      nxt_full_names:
        title: Nxt full names
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      nxt_id_passport_no:
        title: Nxt id passport no
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      nxt_email:
        title: Email Address
        type: string
        format: email
        readOnly: true
        minLength: 1
        x-nullable: true
      nxt_phone_number:
        title: Nxt phone number
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
      nxt_relationship:
        title: Nxt relationship
        type: string
        readOnly: true
        minLength: 1
        x-nullable: true
  CreateTenant:
    required:
    - email
    - password
    - password_confirm
    - username
    - first_name
    - last_name
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        minLength: 1
      password:
        title: Password
        type: string
        maxLength: 68
        minLength: 6
      password_confirm:
        title: Password confirm
        type: string
        maxLength: 68
        minLength: 6
      gender:
        title: Gender
        type: string
        enum:
        - male
        - female
        - other
      role:
        title: Role
        type: string
        enum:
        - admin
        - landlord
        - caretaker
        - tenant
      username:
        title: Username
        type: string
        maxLength: 200
        minLength: 1
      first_name:
        title: First Name
        type: string
        maxLength: 100
        minLength: 1
      last_name:
        title: Last Name
        type: string
        maxLength: 100
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      business:
        title: Business
        description: Nullable for system admins not tied to a business
        type: string
        x-nullable: true
  MaintenanceRequest:
    required:
    - unit
    - tenant
    - title
    - description
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      unit:
        title: Unit
        type: string
      unit_number:
        title: Unit number
        type: string
        readOnly: true
        minLength: 1
      tenant:
        title: Tenant
        type: string
      tenant_name:
        title: Tenant name
        type: string
        readOnly: true
        minLength: 1
      title:
        title: Title
        type: string
        maxLength: 255
        minLength: 1
      description:
        title: Description
        type: string
        minLength: 1
      image:
        title: Image
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      status:
        title: Status
        type: string
        enum:
        - pending
        - in_progress
        - resolved
      reported_by:
        type: array
        items:
          type: string
          format: uuid
        readOnly: true
        uniqueItems: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  Caretaker:
    required:
    - first_name
    - last_name
    - email
    - phone_number
    - employee_no
    - address
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      first_name:
        title: First name
        type: string
        minLength: 1
      last_name:
        title: Last name
        type: string
        minLength: 1
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        minLength: 1
      employee_no:
        title: Employee no
        type: string
        maxLength: 20
        minLength: 1
      caretaker_id:
        title: Caretaker id
        type: string
        maxLength: 100
        x-nullable: true
      id_passport:
        title: Id passport
        type: string
        maxLength: 100
        x-nullable: true
      salary:
        title: Salary
        type: string
        format: decimal
        x-nullable: true
      emergency_contact:
        title: Emergency contact
        type: string
        maxLength: 13
        x-nullable: true
      emergency_contact_relationship:
        title: Emergency contact relationship
        type: string
        maxLength: 15
      emergency_contact_full_names:
        title: Emergency contact full names
        type: string
        maxLength: 255
        x-nullable: true
      emergency_contact_id_passport_no:
        title: Emergency contact id passport no
        type: string
        maxLength: 255
        x-nullable: true
      address:
        title: Address
        type: string
        minLength: 1
      user_email:
        title: User email
        type: string
        format: email
        readOnly: true
        minLength: 1
      user_first_name:
        title: User first name
        type: string
        readOnly: true
        minLength: 1
      user_last_name:
        title: User last name
        type: string
        readOnly: true
        minLength: 1
      user_phone:
        title: User phone
        type: string
        readOnly: true
        minLength: 1
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      property_ids:
        type: array
        items:
          type: string
          minLength: 1
      assigned_properties:
        title: Assigned properties
        type: string
        readOnly: true
  LandlordUpdate:
    required:
    - address
    type: object
    properties:
      username:
        title: Username
        type: string
        minLength: 1
      first_name:
        title: First name
        type: string
        minLength: 1
      last_name:
        title: Last name
        type: string
        minLength: 1
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        minLength: 1
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        format: uri
      id_passport:
        title: Id passport
        type: string
        maxLength: 100
        x-nullable: true
      address:
        title: Address
        type: string
        minLength: 1
      gender:
        title: Gender
        type: string
        minLength: 1
  Lease:
    required:
    - unit
    - tenant
    - start_date
    - end_date
    - rent_amount
    - deposit_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit:
        title: Unit
        type: string
      unit_number:
        title: Unit number
        type: string
        readOnly: true
        minLength: 1
      tenant:
        title: Tenant
        type: string
      tenant_name:
        title: Tenant name
        type: string
        readOnly: true
        minLength: 1
      start_date:
        title: Start date
        type: string
        format: date
      end_date:
        title: End date
        type: string
        format: date
      rent_amount:
        title: Rent Amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit Amount
        type: string
        format: decimal
      payment_frequency:
        title: Payment frequency
        type: string
        enum:
        - monthly
        - quarterly
        - yearly
      status:
        title: Status
        type: string
        enum:
        - active
        - terminated
        - pending
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  Property:
    required:
    - business
    - property_name
    - property_address
    - apartment_type
    - amenities
    - number_of_bedrooms
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      business:
        title: Business
        type: string
      landlord:
        title: Landlord
        type: string
        readOnly: true
      property_name:
        title: Property Name
        type: string
        maxLength: 255
        minLength: 1
      property_address:
        title: Property Address
        type: string
        minLength: 1
      apartment_type:
        title: Property Type
        type: string
        maxLength: 255
        minLength: 1
      property_description:
        title: Property description
        type: string
        x-nullable: true
      amenities:
        type: array
        items:
          type: string
          format: uuid
        uniqueItems: true
      number_of_bedrooms:
        title: Number of bedrooms
        type: integer
        maximum: 2147483647
        minimum: -2147483648
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      caretaker:
        $ref: '#/definitions/CaretakerProfile'
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  Tenant:
    required:
    - first_name
    - last_name
    - email
    - phone_number
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      first_name:
        title: First name
        type: string
        minLength: 1
      last_name:
        title: Last name
        type: string
        minLength: 1
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        minLength: 1
      status:
        title: Status
        type: string
        enum:
        - active
        - paid
        - overdue
      unit:
        title: Unit
        type: string
        readOnly: true
      lease_start:
        title: Lease start
        type: string
        readOnly: true
      lease_end:
        title: Lease end
        type: string
        readOnly: true
  PropertyList:
    required:
    - property_name
    - property_address
    - apartment_type
    - amenities
    - number_of_bedrooms
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      business:
        $ref: '#/definitions/Business'
      landlord:
        $ref: '#/definitions/LandlordProfile'
      property_name:
        title: Property Name
        type: string
        maxLength: 255
        minLength: 1
      property_address:
        title: Property Address
        type: string
        minLength: 1
      apartment_type:
        title: Property Type
        type: string
        maxLength: 255
        minLength: 1
      property_description:
        title: Property description
        type: string
        x-nullable: true
      amenities:
        type: array
        items:
          type: string
          format: uuid
        uniqueItems: true
      number_of_bedrooms:
        title: Number of bedrooms
        type: integer
        maximum: 2147483647
        minimum: -2147483648
      caretaker:
        $ref: '#/definitions/CaretakerProfile'
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  UnitProfile:
    required:
    - property
    - unit_number
    - rent_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      property:
        $ref: '#/definitions/PropertyList'
      unit_number:
        title: Unit Number
        type: string
        maxLength: 50
        minLength: 1
      unit_floor:
        title: Floor Number
        type: integer
        maximum: 2147483647
        minimum: -2147483648
        x-nullable: true
      status:
        title: Status
        type: string
        enum:
        - available
        - occupied
        - booked
        - maintenance
      rent_amount:
        title: Rent amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit amount
        type: string
        format: decimal
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  LeaseDetail:
    required:
    - unit
    - tenant
    - start_date
    - end_date
    - rent_amount
    - deposit_amount
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      unit:
        $ref: '#/definitions/UnitProfile'
      tenant:
        $ref: '#/definitions/TenantProfile'
      start_date:
        title: Start date
        type: string
        format: date
      end_date:
        title: End date
        type: string
        format: date
      rent_amount:
        title: Rent Amount
        type: string
        format: decimal
      deposit_amount:
        title: Deposit Amount
        type: string
        format: decimal
      payment_frequency:
        title: Payment frequency
        type: string
        enum:
        - monthly
        - quarterly
        - yearly
      status:
        title: Status
        type: string
        enum:
        - active
        - terminated
        - pending
      termination_date:
        title: Termination date
        type: string
        format: date
        x-nullable: true
      created_at:
        title: Created at
        type: string
        format: date-time
        readOnly: true
      updated_at:
        title: Updated at
        type: string
        format: date-time
        readOnly: true
  MaintenanceCreate:
    required:
    - unit
    - tenant
    - title
    - description
    type: object
    properties:
      unit:
        title: Unit
        type: string
      tenant:
        title: Tenant
        type: string
      image:
        title: Image
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      title:
        title: Title
        type: string
        maxLength: 255
        minLength: 1
      description:
        title: Description
        type: string
        minLength: 1
      status:
        title: Status
        type: string
        enum:
        - pending
        - in_progress
        - resolved
  MaintenanceUpdate:
    required:
    - unit
    - tenant
    - title
    - description
    type: object
    properties:
      unit:
        title: Unit
        type: string
      tenant:
        title: Tenant
        type: string
      image:
        title: Image
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      title:
        title: Title
        type: string
        maxLength: 255
        minLength: 1
      description:
        title: Description
        type: string
        minLength: 1
      status:
        title: Status
        type: string
        enum:
        - pending
        - in_progress
        - resolved
  TenantUpdate:
    type: object
    properties:
      username:
        title: Username
        type: string
        minLength: 1
      first_name:
        title: First name
        type: string
        minLength: 1
      gender:
        title: Gender
        type: string
        minLength: 1
      last_name:
        title: Last name
        type: string
        minLength: 1
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        minLength: 1
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        format: uri
      previous_address:
        title: Previous address
        type: string
      id_passport:
        title: Id passport
        type: string
        maxLength: 255
        x-nullable: true
      nxt_full_names:
        title: Nxt full names
        type: string
        maxLength: 255
        x-nullable: true
      nxt_id_passport_no:
        title: Nxt id passport no
        type: string
        maxLength: 255
        x-nullable: true
      nxt_email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        x-nullable: true
      nxt_phone_number:
        title: Nxt phone number
        type: string
        maxLength: 13
        x-nullable: true
      nxt_relationship:
        title: Nxt relationship
        type: string
        maxLength: 100
        x-nullable: true
  LandlordCreate:
    required:
    - email
    - password
    - password_confirm
    - username
    - first_name
    - last_name
    - business
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        minLength: 1
      password:
        title: Password
        type: string
        maxLength: 68
        minLength: 6
      password_confirm:
        title: Password confirm
        type: string
        maxLength: 68
        minLength: 6
      gender:
        title: Gender
        type: string
        enum:
        - male
        - female
        - other
      role:
        title: Role
        type: string
        enum:
        - admin
        - landlord
        - caretaker
        - tenant
      username:
        title: Username
        type: string
        maxLength: 200
        minLength: 1
      first_name:
        title: First Name
        type: string
        maxLength: 100
        minLength: 1
      last_name:
        title: Last Name
        type: string
        maxLength: 100
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      business:
        $ref: '#/definitions/Business'
      is_staff:
        title: Is staff
        type: boolean
      business_profile:
        $ref: '#/definitions/MiniBusinessProfile'
  UserLogin:
    required:
    - email
    - password
    type: object
    properties:
      email:
        title: Email
        type: string
        format: email
        maxLength: 255
        minLength: 1
      password:
        title: Password
        type: string
        maxLength: 128
        minLength: 1
      id:
        title: Id
        type: integer
        readOnly: true
      username:
        title: Username
        type: string
        readOnly: true
        minLength: 1
      role:
        title: Role
        type: string
        readOnly: true
        minLength: 1
      access_token:
        title: Access token
        type: string
        readOnly: true
        minLength: 1
      refresh_token:
        title: Refresh token
        type: string
        readOnly: true
        minLength: 1
      pending_verification:
        title: Pending verification
        type: boolean
        readOnly: true
      message:
        title: Message
        type: string
        readOnly: true
        minLength: 1
  LogoutUser:
    required:
    - refresh_token
    type: object
    properties:
      refresh_token:
        title: Refresh token
        type: string
        minLength: 1
  ResetPassword:
    required:
    - email
    - otp
    - password
    - confirm_password
    type: object
    properties:
      email:
        title: Email
        type: string
        format: email
        minLength: 1
      otp:
        title: Otp
        type: string
        maxLength: 6
        minLength: 6
      password:
        title: Password
        type: string
        minLength: 1
      confirm_password:
        title: Confirm password
        type: string
        minLength: 1
  PasswordReset:
    required:
    - email
    type: object
    properties:
      email:
        title: Email
        type: string
        format: email
        minLength: 1
  UserRegister:
    required:
    - email
    - password
    - password_confirm
    - username
    - first_name
    - last_name
    type: object
    properties:
      id:
        title: Id
        type: string
        readOnly: true
        minLength: 1
      email:
        title: Email Address
        type: string
        format: email
        maxLength: 255
        minLength: 1
      password:
        title: Password
        type: string
        maxLength: 68
        minLength: 6
      password_confirm:
        title: Password confirm
        type: string
        maxLength: 68
        minLength: 6
      gender:
        title: Gender
        type: string
        enum:
        - male
        - female
        - other
      role:
        title: Role
        type: string
        enum:
        - admin
        - landlord
        - caretaker
        - tenant
      username:
        title: Username
        type: string
        maxLength: 200
        minLength: 1
      first_name:
        title: First Name
        type: string
        maxLength: 100
        minLength: 1
      last_name:
        title: Last Name
        type: string
        maxLength: 100
        minLength: 1
      phone_number:
        title: Phone number
        type: string
        maxLength: 13
        x-nullable: true
      profile_picture:
        title: Profile picture
        type: string
        readOnly: true
        x-nullable: true
        format: uri
      business:
        title: Business
        description: Nullable for system admins not tied to a business
        type: string
        x-nullable: true
  OTPVerify:
    required:
    - otp
    type: object
    properties:
      otp:
        title: Otp
        type: string
        minLength: 1
