openapi: 3.0.0
paths:
  /v4/boundaries:
    get:
      description: Get a list of boundaries based on search criteria.
      operationId: search-boundaries
      parameters:
        - name: name
          required: false
          in: query
          description: >-
            The name of the boundary you seek to obtain boundary information
            from. This can be a full state name (eg. Nebraska), city name,
            neighborhood name, postal code, etc.
          schema:
            type: array
            items:
              type: string
        - name: country
          required: false
          in: query
          description: >-
            The country for which you seek to obtain boundary information from.
            Default is USA.
          schema:
            type: array
            items:
              type: string
        - name: city
          required: false
          in: query
          examples:
            Denver:
              value: Denver
            Los Angeles:
              value: Los Angeles
            Saint Louis:
              value: Saint Louis
            Salt Lake City:
              value: Salt Lake City
            Coeur D Alene:
              value: Coeur D Alene
          description: >-
            The city used by the post office for which you seek to obtain
            boundary information from. Use the full name. All abbreviations
            should be spelt out entirely EG: St. Louis ⇒ Saint Louis, L.A. ⇒ Los
            Angeles, Coeur D'Alene ⇒ Coeur D Alene.
          schema:
            type: array
            items:
              type: string
        - name: layer
          required: false
          in: query
          description: >-
            The layer or layers you seek to obtain boundary information from.


            LiveBy providers many layers of boundaries. We also provide virtual
            layers. Virtual layers are layers that are made from other layers.
            See our [virtual layers guide](/guides/boundaries/virtual-layers)
            for more information.


            The available boundary layers are as follows:


            <table>
              <thead>
                <tr>
                  <th>Layer</th>
                  <th>Value</th>
                  <th>Description</th>
                  <th>Virtual</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>Cities, Towns, or equivalent</td>
                  <td>city</td>
                  <td>Boundaries of hamlets, villages, towns, cities, and census-designated places.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Postal City</td>
                  <td>postal-city</td>
                  <td>
                    Boundaries the post office covers for a city. See Cities vs Postal Cities for more         information on the differences between communities and postal cities.
                  </td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Municipalities</td>
                  <td>municipality</td>
                  <td>Only municipalities that have taxes, addresses, mayors, etc.</td>
                  <td>Yes</td>
                </tr>
                <tr>
                  <td>Districts</td>
                  <td>district</td>
                  <td>Larger boundaries covering multiple smaller neighborhoods in metropolitan areas.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Neighborhoods</td>
                  <td>neighborhood</td>
                  <td>Geographically bound collections of residential or mixed-use parcels.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Condos</td>
                  <td>condo</td>
                  <td>Highlights large multi-unit condominium developments with shared amenities and higher-density living, available only in select markets.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Micro Neighborhoods</td>
                  <td>micro-neighborhood</td>
                  <td>Smaller polygons within broader neighborhood boundaries.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>Subdivisions</td>
                  <td>subdivision</td>
                  <td>Multi-parcel allotments defined by local municipalities.</td>
                  <td>No</td>
                </tr>
                <!-- Mosaic layer coming soon.<tr>
                  <td>Mosaics</td>
                  <td>mosaic</td>
                  <td>A layer containing a mix of neighborhoods, districts, cities, and county subdivisions that perfectly tile a geographic area. Used for user navigation.</td>
                  <td>Yes</td>
                </tr>-->
                <tr>
                  <td>Postal Codes</td>
                  <td>postal-code</td>
                  <td>Service areas of postal codes across countries.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>School Districts</td>
                  <td>school-district</td>
                  <td>Single-purpose governmental units operating schools at the local level.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>School Attendance Areas</td>
                  <td>school-attendance-area</td>
                  <td>Geographic extent served by a local school for student assignment.</td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>State, Province, or equivalent</td>
                  <td>area-level-1</td>
                  <td>
                    First administrative subdivision of a country. These commonly have that name of State or         Province or District.
                  </td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>County, Parish, or equivalent</td>
                  <td>area-level-2</td>
                  <td>
                    Second administrative subdivision. These are commonly called counties. Not available in         all countries.
                  </td>
                  <td>No</td>
                </tr>
                <tr>
                  <td>County Subdivisions</td>
                  <td>county-subdivision</td>
                  <td>
                    Sub-county geographic units defined by the U.S. Census, such as townships, towns, or similar         entities, used for administrative and statistical purposes
                  </td>
                  <td>No</td>
                </tr>
              </tbody>
            </table>
          schema:
            default:
              - city
              - postal-code
              - area-level-1
              - area-level-2
              - postal-city
              - district
              - neighborhood
              - micro-neighborhood
              - subdivision
              - school-district
              - school-attendance-area
              - condo
              - county-subdivision
            type: array
            items:
              type: string
              enum:
                - city
                - postal-code
                - area-level-1
                - area-level-2
                - postal-city
                - district
                - neighborhood
                - micro-neighborhood
                - subdivision
                - school-district
                - school-attendance-area
                - condo
                - county-subdivision
                - municipality
                - mosaic
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision of a country for which you seek to
            obtain boundary information from. Common equivalents are states or
            provinces. Use the full name.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          examples:
            King:
              value: King
            Miami-Dade:
              value: Miami-Dade
            Los Alamos:
              value: Los Alamos
          description: >-
            The second political subdivision of a country which you seek to
            obtain boundary information from. Common equivalents are Counties or
            Parishes Use the full name. Not guaranteed in every country.
          schema:
            type: array
            items:
              type: string
        - name: mls
          required: false
          in: query
          description: The MLS code you want associated boundary IDs from.
          schema:
            type: array
            items:
              type: string
        - name: latitude
          required: false
          in: query
          description: >-
            The latitude for which you seek to obtain boundary information from.
            This will use a default radius of 10 miles. If you would like to
            change the radius, use the **radius** argument.
          schema:
            type: string
        - name: longitude
          required: false
          in: query
          description: >-
            The longitude for which you seek to obtain boundary information
            from. This will use a default radius of 10 miles. If you would like
            to change the radius, use the **radius** argument.
          schema:
            type: string
        - name: radius
          required: false
          in: query
          description: >
            If you are using the coordinates argument, you may change the radius
            of your search. The default radius is 10 miles. You may use decimals
            as well. If you would like to get only boundaries that intersect the
            exact point, set the radius to 0.
          schema:
            default: 10
            type: number
        - name: bounding-box-east
          required: false
          in: query
          description: >-
            The east edge of a bounding box to return results from. All four
            directions (west, south, north, and east) are required if creating a
            bounding box. These are coordinates that will be used to search for
            boundaries. Only boundaries that touch this bounding box will be
            returned. If the coordinates parameter is used, this parameter is
            ignored.
          schema:
            type: string
        - name: bounding-box-west
          required: false
          in: query
          description: >-
            The west edge of a bounding box to return results from. All four
            directions (west, south, north, and east) are required if creating a
            bounding box. These are coordinates that will be used to search for
            boundaries. Only boundaries that touch this bounding box will be
            returned. If the coordinates parameter is used, this parameter is
            ignored.
          schema:
            type: string
        - name: bounding-box-south
          required: false
          in: query
          description: >-
            The south edge of a bounding box to return results from. All four
            directions (west, south, north, and east) are required if creating a
            bounding box. These are coordinates that will be used to search for
            boundaries. Only boundaries that touch this bounding box will be
            returned. If the coordinates parameter is used, this parameter is
            ignored.
          schema:
            type: string
        - name: bounding-box-north
          required: false
          in: query
          description: >-
            The north edge of a bounding box to return results from. All four
            directions (west, south, north, and east) are required if creating a
            bounding box. These are coordinates that will be used to search for
            boundaries. Only boundaries that touch this bounding box will be
            returned. If the coordinates parameter is used, this parameter is
            ignored.
          schema:
            type: string
        - name: postal-code
          required: false
          in: query
          description: >-
            The postal code for which you seek to obtain boundary information
            from.
          schema:
            type: array
            items:
              type: string
        - name: limit
          required: false
          in: query
          description: ' The number of records you would like returned. The default is 20, the maximum is 500. '
          schema:
            default: 20
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            Used for pagination, the number of records for the collection to
            skip.
          schema:
            default: 0
            type: number
        - name: sort-by
          required: false
          in: query
          description: |
            Sort by the following parameters.
            - name
            - layer
            - updated-at
            - distance
          schema:
            type: string
            enum:
              - name
              - layer
              - updated-at
              - distance
        - name: intersection-boundary-id
          required: false
          in: query
          description: >-
            Filtering by intersection-boundary-id will return boundaries that
            intersect with that boundary. Example: Neighborhoods in Denver,
            Colorado could be found by using a intersection-boundary-id filter
            with the id for the city of Denver and layer filter of
            "neighborhood"
          schema:
            type: array
            items:
              type: string
        - name: include-geometry
          required: false
          in: query
          description: >-
            Include the geometry of the boundary in the response. This will
            increase the response time and the size of the response.
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SearchBoundaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Search Boundaries
      tags:
        - Boundaries
  /v4/boundaries/autocomplete:
    get:
      description: This endpoint returns a list of boundaries based on search criteria.
      operationId: autocomplete-boundary-search
      parameters:
        - name: search
          required: true
          in: query
          description: >-
            The text search query you would like to use to search for
            boundaries. All searches are case-insensitive.
          schema:
            type: string
        - name: layer
          required: false
          in: query
          description: |
            The layer or layers you seek to obtain boundary information from.
          schema:
            default:
              - postal-code
              - neighborhood
              - district
              - city
              - area-level-1
              - area-level-2
            type: array
            items:
              type: string
              enum:
                - city
                - postal-code
                - area-level-1
                - area-level-2
                - postal-city
                - district
                - neighborhood
                - micro-neighborhood
                - subdivision
                - school-district
                - school-attendance-area
                - condo
                - county-subdivision
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision of a country for which you seek to
            obtain boundary information from. Common equivalents are states or
            provinces. Use the full name.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          examples:
            King:
              value: King
            Miami-Dade:
              value: Miami-Dade
            Los Alamos:
              value: Los Alamos
          description: >-
            The second political subdivision of a country which you seek to
            obtain boundary information from. Common equivalents are Counties or
            Parishes Use the full name. Not guaranteed in every country.
          schema:
            type: array
            items:
              type: string
        - name: mls
          required: false
          in: query
          description: The MLS code you want associated boundary IDs from.
          schema:
            type: array
            items:
              type: string
        - name: latitude
          required: false
          in: query
          description: The latitude used to sort-by distance
          schema:
            type: number
        - name: longitude
          required: false
          in: query
          description: The longitude  used to sort-by distance
          schema:
            type: number
        - name: sort-by
          required: false
          in: query
          description: >-
            Sort by the following parameters. By default, they will be sorted in
            order of how well they match the search (**score**).
          schema:
            default: score
            type: string
            enum:
              - score
              - name
              - layer
              - population
              - distance
        - name: sort-direction
          required: false
          in: query
          description: Direction to sort the results.
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
        - name: limit
          required: false
          in: query
          description: ' The number of records you would like returned. The default is 20, the maximum is 50. '
          schema:
            default: 20
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            Used for pagination, the number of records for the collection to
            skip.
          schema:
            default: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/AutocompleteBoundaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Autocomplete Boundary Search
      tags:
        - Boundaries
  /v4/boundaries/{id}:
    get:
      description: >-
        This endpoint returns a single LiveBy Boundary based on a LiveBy
        Boundary ID. It includes the geometry for the boundary.
      operationId: get-boundary
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            The LiveBy Boundary ID obtained from the **/v4/boundaries**
            endpoint.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BoundaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Get Boundary
      tags:
        - Boundaries
  /v4/boundaries/vector-tile/{x}/{y}/{z}:
    get:
      description: |2-
            Get a mapbox vector tile. This endpoint is intended to be used by a map library that supports Mapbox Vector Tiles.    For most map libraries, the base tile endpoint will be `https://api.liveby.com/v4/boundaries/vector-tile/{x}/{y}/{z}`

            Currently, the vector tile API only supports at zoom level 7 and greater.

            The query parameters are the same as the search-boundaries endpoint.

            Each boundary is separated into its own "layer-source" based on its layer.    For instance, https://api.liveby.com/v4/boundaries/28/48/7?layer=neighborhood&layer=city will provide a source vector tile with 4 source-layers, one for the `neighborhood` polygon data, one for the `neighborhood-label` label point, one for the `city` polygon source, and one for the `city-label`.    The ID provided from this API is a vector tile ID, and not the standard boundary ID. To get the standard boundary ID, use the `_id` field.

            To keep this API as fast as possible, a small subset of data is returned. Only `name`, `_id`, `boundingBox` and `layer` are returned.

            For more information about source-layers, see the [Mapbox source-layers](https://docs.mapbox.com/style-spec/reference/layers/#source-layer) documentation.    
      operationId: vector-tile
      parameters:
        - name: x
          required: true
          in: path
          description: >-
            Mapbox Tile Layer X value. This value should be generated by your
            mapping library.
          schema:
            type: number
        - name: 'y'
          required: true
          in: path
          description: >-
            Mapbox Tile Layer Y value. This value should be generated by your
            mapping library.
          schema:
            type: number
        - name: z
          required: true
          in: path
          description: >-
            Mapbox Tile Layer Z value. This value should be generated by your
            mapping library.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SearchBoundaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Mapbox Vector Tile Boundaries
      tags:
        - Boundaries
        - beta
  /v4/boundaries/{id}/image/map:
    get:
      description: |2-
            Get an image of a boundary displayed on a mapbox. This endpoint is intended to allow a boundary to be visualized without loading an entire map.
            You can specify a [public Mapbox style url](https://docs.mapbox.com/api/maps/styles/#mapbox-standard) to visualize the boundary.
            
      operationId: boundary-image-map
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            The LiveBy Boundary ID obtained from the **/v4/boundaries**
            endpoint.
          schema:
            type: string
        - name: mapbox-style
          required: true
          in: query
          description: >-
            Mapbox style identifier used for the static image background.

            Supported values include mapbox://styles/{ownerId}/{styleId},
            ownerId/styleId, or styleId (defaults ownerId to mapbox).
          schema:
            default: mapbox://styles/mapbox/streets-v12
            example: mapbox://styles/mapbox/streets-v12
            type: string
        - name: width
          required: false
          in: query
          description: >-
            Output image width in pixels. Maximum is 1280 (Mapbox static API
            limit).
          schema:
            default: 700
            type: number
        - name: height
          required: false
          in: query
          description: >-
            Output image height in pixels. Maximum is 1280 (Mapbox static API
            limit).
          schema:
            default: 400
            type: number
        - name: stroke
          required: false
          in: query
          description: Boundary line color in simplestyle format.
          schema:
            default: '#444ce7'
            type: string
        - name: stroke-width
          required: false
          in: query
          description: Boundary line width in pixels (simplestyle stroke-width).
          schema:
            default: 2
            type: number
        - name: stroke-opacity
          required: false
          in: query
          description: Boundary line opacity between 0 and 1 (simplestyle stroke-opacity).
          schema:
            default: 1
            type: number
        - name: fill
          required: false
          in: query
          description: Boundary fill color in simplestyle format.
          schema:
            default: '#444ce7'
            type: string
        - name: fill-opacity
          required: false
          in: query
          description: Boundary fill opacity between 0 and 1 (simplestyle fill-opacity).
          schema:
            default: 0.1
            type: number
      responses:
        '200':
          description: ''
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Static Boundary Image on Mapbox Map
      tags:
        - Boundaries
        - beta
  /v4/boundaries/{id}/summary:
    get:
      description: Get a summary for a given boundary.
      operationId: get-boundary-summary
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            The LiveBy Boundary ID obtained from the **/v4/boundaries**
            endpoint.
          schema:
            type: string
        - name: promptStyle
          required: true
          in: query
          description: The style of the prompt used to generate the boundary summary.
          schema:
            type: string
        - name: createIfMissing
          required: true
          in: query
          description: >-
            If a summary does not already exist and this parameter is true, a
            new summary will be created using a LLM.
          schema:
            type: boolean
        - name: rebuild
          required: true
          in: query
          description: >-
            If a summary does exist, ignore it and generate a new one using a
            LLM.
          schema:
            type: boolean
        - name: userId
          required: true
          in: query
          description: ID of the user that the summary is for.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BoundarySummaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Get Boundary Summary
      tags:
        - Boundaries
        - Boundaries
        - hidden
    post:
      description: Create a summary for a given boundary.
      operationId: create-boundary-summary
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            The LiveBy Boundary ID obtained from the **/v4/boundaries**
            endpoint.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BoundarySummaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Create Boundary Summary
      tags:
        - Boundaries
        - Boundaries
        - hidden
  /v4/boundaries/{id}/summary/{summaryId}:
    put:
      description: Update a summary for a given boundary.
      operationId: update-boundary-summary
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            The LiveBy Boundary ID obtained from the **/v4/boundaries**
            endpoint.
          schema:
            type: string
        - name: summaryId
          required: true
          in: path
          description: The stored summary ID of the boundary.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/BoundarySummaryDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Update Boundary Summary
      tags:
        - Boundaries
        - Boundaries
        - hidden
  /v4/schools:
    get:
      description: Get a list of schools based on search criteria.
      operationId: search-schools
      parameters:
        - name: types
          required: false
          in: query
          description: >
            The types of schools returned.

            Public schools are schools that are payed for by the
            government.Private schools are schools that require extra payment to
            attend.Catholic schools are schools (primarily in Canada) that get
            government funding and are open to anyone to attend, but are owned
            and run by the Catholic church.
          examples:
            public:
              value: public
            private:
              value: private
            catholic:
              value: catholic
          schema:
            default:
              - public
              - private
            type: array
            items:
              type: string
              enum:
                - public
                - private
                - catholic
        - name: private-school-affiliation
          required: false
          in: query
          description: >-
            The organization that this school is affiliated with. This filter is
            only available for private schools.

            If the school type is set to `catholic`, this parameter is ignored.
          schema:
            type: array
            items:
              type: string
              enum:
                - roman-catholic
                - african-methodist-episcopal
                - amish
                - assembly-of-god
                - baptist
                - brethren
                - calvinist
                - christian-nondenomination
                - church-of-christ
                - church-of-god
                - church-of-god-in-christ
                - church-of-the-nazarene
                - disciples-of-christ
                - episcopal
                - friends
                - greek-orthodox
                - islamic
                - jewish
                - latter-day-saints
                - lutheran-missouri-synod
                - evangelical-lutheran
                - wisconsin-evangelical-lutheran
                - other-lutheran
                - mennonite
                - methodist
                - pentecostal
                - presbyterian
                - seventh-day-adventist
                - other
                - nonsectarian
        - name: boundary-id
          required: false
          in: query
          description: >-
            boundary id for which you seek to obtain school information from.   
            This will return all schools with a school attendance boundary that
            overlaps this boundary, and private schools within ~1110 meters of
            the boundary.
                You must either provide a latitude and longitude or a boundary id.
          schema:
            type: string
        - name: latitude
          required: false
          in: query
          description: >-
            The latitude of the point to search schools near. Any school whose
            attendance boundary overlaps this coordinate will be returned, along
            with schools without an attendance boundary that fall within the
            specified radius.

            Must be provided together with longitude. Mutually exclusive with
            boundary-id.
          schema:
            type: number
        - name: longitude
          required: false
          in: query
          description: >-
            The longitude of the point to search schools near. Any school whose
            attendance boundary overlaps this coordinate will be returned, along
            with schools without an attendance boundary that fall within the
            specified radius.

            Must be provided together with latitude. Mutually exclusive with
            boundary-id.
          schema:
            type: number
        - name: radius
          required: false
          in: query
          description: >-
            Search radius in meters when using latitude and longitude. The
            default is 1000 meters. Decimals are accepted.Set to 0 to return
            only schools whose attendance boundary contains the exact point.
          schema:
            default: 1000
            type: number
        - name: limit
          required: false
          in: query
          description: ' The number of records you would like returned. The default is 20, the maximum is 500. '
          schema:
            default: 20
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            Used for pagination, the number of records for the collection to
            skip.
          schema:
            default: 0
            type: number
        - name: sort-by
          required: false
          in: query
          description: >
            This parameter changes the order of the results.

            The sort distance will be from the closest edge of the boundary, if
            boundary-id is provided.

            It will be from the coordinate if, latitude and longitude are
            provided.
          schema:
            default: distance
            type: string
            enum:
              - distance
              - type
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SchoolDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Search Schools
      tags:
        - Schools
  /v4/schools/vector-tile/{x}/{y}/{z}:
    get:
      description: |2-
            Get a mapbox vector tile. This endpoint is intended to be used by a map library that supports Mapbox Vector Tiles.    For most map libraries, the base tile endpoint will be `https://api.liveby.com/v4/schools/vector-tile/{x}/{y}/{z}`

            Currently, the vector tile API only supports at zoom level 7 and greater.

            The API returns the school&rsquo;s numeric ID as the primary identifier. For convenience, it also includes a `schoolId` field containing the same ID as a string, along with a `boundaryId` that references the school&rsquo;s associated boundary.

            For more information about source-layers, see the [Mapbox source-layers](https://docs.mapbox.com/style-spec/reference/layers/#source-layer) documentation.    
      operationId: search-schools-vector-tile
      parameters:
        - name: types
          required: false
          in: query
          description: >
            The types of schools returned.

            Public schools are schools that are payed for by the
            government.Private schools are schools that require extra payment to
            attend.Catholic schools are schools (primarily in Canada) that get
            government funding and are open to anyone to attend, but are owned
            and run by the Catholic church.
          examples:
            public:
              value: public
            private:
              value: private
            catholic:
              value: catholic
          schema:
            default:
              - public
              - private
            type: array
            items:
              type: string
              enum:
                - public
                - private
                - catholic
        - name: private-school-affiliation
          required: false
          in: query
          description: >-
            The organization that this school is affiliated with. This filter is
            only available for private schools.

            If the school type is set to `catholic`, this parameter is ignored.
          schema:
            type: array
            items:
              type: string
              enum:
                - roman-catholic
                - african-methodist-episcopal
                - amish
                - assembly-of-god
                - baptist
                - brethren
                - calvinist
                - christian-nondenomination
                - church-of-christ
                - church-of-god
                - church-of-god-in-christ
                - church-of-the-nazarene
                - disciples-of-christ
                - episcopal
                - friends
                - greek-orthodox
                - islamic
                - jewish
                - latter-day-saints
                - lutheran-missouri-synod
                - evangelical-lutheran
                - wisconsin-evangelical-lutheran
                - other-lutheran
                - mennonite
                - methodist
                - pentecostal
                - presbyterian
                - seventh-day-adventist
                - other
                - nonsectarian
        - name: boundary-id
          required: false
          in: query
          description: >-
            boundary id for which you seek to obtain school information from.   
            This will return all schools with a school attendance boundary that
            overlaps this boundary, and private schools within ~1110 meters of
            the boundary.
                You must either provide a latitude and longitude or a boundary id.
          schema:
            type: string
        - name: radius
          required: false
          in: query
          description: >-
            Search radius in meters when using latitude and longitude. The
            default is 1000 meters. Decimals are accepted.Set to 0 to return
            only schools whose attendance boundary contains the exact point.
          schema:
            default: 1000
            type: number
        - name: sort-by
          required: false
          in: query
          description: >
            This parameter changes the order of the results.

            The sort distance will be from the closest edge of the boundary, if
            boundary-id is provided.

            It will be from the coordinate if, latitude and longitude are
            provided.
          schema:
            default: distance
            type: string
            enum:
              - distance
              - type
        - name: x
          required: true
          in: path
          description: >-
            Mapbox Tile Layer X value. This value should be generated by your
            mapping library.
          schema:
            type: number
        - name: 'y'
          required: true
          in: path
          description: >-
            Mapbox Tile Layer Y value. This value should be generated by your
            mapping library.
          schema:
            type: number
        - name: z
          required: true
          in: path
          description: >-
            Mapbox Tile Layer Z value. This value should be generated by your
            mapping library.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SchoolDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Mapbox Vector Tile Schools
      tags:
        - Schools
        - beta
  /v4/schools/{schoolId}:
    get:
      description: Get a schools based on the NCES ID.
      operationId: get-school
      parameters:
        - name: schoolId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/SchoolDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Get School
      tags:
        - Schools
  /v4/demographics:
    get:
      description: >-
        The `/v4/demographics` endpoint returns survey data from a country's
        census. Currently the only countries supported are the United States of
        America and Canada.


        The API uses an ID of a boundary to locate census data for the boundary.


        Because of the nature of generating census data for neighborhoods, some
        data will be less accurate than others. To determine how accurate data
        is, the confidence value between 0-100 is included for each boundary.
      operationId: find-demographics
      parameters:
        - name: boundary-id
          required: true
          in: query
          description: >
            The boundary ID(s) to get demographics information on. Demographics
            information will only be returned if the boundary exists and there
            is demographics information available for it. Only 20 boundary IDs
            can be supplied per request.
          schema:
            example: >-
              &boundary-id=593979d6da3374b282bb7bbb&boundary-id=593979d6da3374b282bb7bcb
              (maximum of 20 boundary-ids per request)
            type: array
            items:
              type: string
        - name: associated-layers
          required: false
          in: query
          description: >
            Optional layer name(s) to include associated boundaries for. When
            provided, the endpoint will return demographics for the requested
            boundaries provided to `boundary-id` AND their associated boundaries
            at the specified layers (e.g., area-level-1 for states, area-level-2
            for counties). Multiple associated layer types can be requested.
          schema:
            example: '&associated-layers=area-level-1&associated-layers=area-level-2'
            type: array
            items:
              type: string
              enum:
                - city
                - postal-code
                - area-level-1
                - area-level-2
                - postal-city
                - district
                - neighborhood
                - micro-neighborhood
                - subdivision
                - school-district
                - school-attendance-area
                - condo
                - county-subdivision
                - municipality
                - mosaic
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindDemographicsResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Demographics
      tags:
        - Demographics
  /v4/lifestyles:
    get:
      description: >-
        This endpoint returns returns lifestyle trend information from Spatial
        AI. This data is based on where behaviors occur, not where people live.
        There are 72 lifestyle behaviors that are measured.

        <br /><br />

        Currently the only countries supported are the United States of America
        and Canada.
      operationId: find-lifestyles
      parameters:
        - name: boundary-id
          required: true
          in: query
          description: >
            The boundary ID(s) to get lifestyle behavioral information on.
            Behavioral information will only be returned if the boundary exists
            and there is lifestyle information available for it. Only 20
            boundary IDs can be supplied per request.
          schema:
            example: >-
              &boundary-id=593979d6da3374b282bb7bbb&boundary-id=593979d6da3374b282bb7bcb
              (maximum of 20 boundary-ids per request)
            type: array
            items:
              type: string
        - name: exclude-slug
          required: false
          in: query
          description: >
            An array of slugs that represent a corresponding lifestyle behavior
            that you want excluded from the results.
          schema:
            type: array
            items:
              type: string
        - name: limit
          required: false
          in: query
          description: >
            The number of lifestyle behaviors you want returned. There are 72
            lifestyle behaviors that are measured. This is useful in cases where
            you only need the top lifestyle behaviors for a requested area.
          schema:
            example: '&limit=10'
            type: array
            items:
              type: number
        - name: offset
          required: false
          in: query
          description: >-
            Used for pagination, the number of records for the collection to
            skip.
          schema:
            default: 0
            example: '&offset=10'
            type: number
        - name: sort-by
          required: false
          in: query
          description: |
            Sort by any of the following parameters.
            - lifestyle
            - percentileVsNation
          schema:
            default: percentileVsNation
            example: '&sort-by=percentileVsNation'
            type: string
            enum:
              - lifestyle
              - percentileVsNation
        - name: sort-order
          required: false
          in: query
          description: |
            The direction in which to sort using the following parameters.
            - asc (ascending order)
            - desc (descending order)
          schema:
            default: desc
            example: '&sort-order=asc'
            type: string
            enum:
              - asc
              - desc
        - name: group-by
          required: false
          in: query
          description: >
            Group results by boundary ID instead of aggregating results for all
            included boundaries.

            - boundary-id
          schema:
            example: '&group-by=boundary-id'
            type: string
            enum:
              - boundary-id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/LifestylesResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Search Lifestyles
      tags:
        - Lifestyles
  /v4/nearby-events:
    get:
      description: >-
        Search for events by location, date range, popularity, and other
        criteria. At least one location filter is required: city, postal-code,
        latitude and longitude, boundary-id, or a complete bounding box.
      operationId: NearbyEventsController_searchEvents_v4
      parameters:
        - name: city
          required: false
          in: query
          description: Filter by city where the event takes place
          schema:
            type: string
        - name: postal-code
          required: false
          in: query
          description: Filter by postal code where the event takes place
          schema:
            type: string
        - name: start-date-from
          required: false
          in: query
          description: >-
            Return events starting on or after this date (YYYY-MM-DD). Can be
            used independently to find upcoming events.
          schema:
            type: string
        - name: start-date-to
          required: false
          in: query
          description: >-
            Return events starting on or before this date (YYYY-MM-DD). Can be
            used independently to find past events.
          schema:
            type: string
        - name: popularity-score
          required: false
          in: query
          description: Filter by popularity score (0–6, where 6 is the highest)
          schema:
            type: integer
        - name: is-travel-worthy
          required: false
          in: query
          description: >-
            Filter to only travel-worthy events (true) or non-travel-worthy
            events (false)
          schema:
            type: boolean
        - name: latitude
          required: false
          in: query
          description: >-
            Latitude of the search origin point. Must be combined with
            longitude.
          schema:
            type: number
        - name: longitude
          required: false
          in: query
          description: >-
            Longitude of the search origin point. Must be combined with
            latitude.
          schema:
            type: number
        - name: radius
          required: false
          in: query
          description: 'Search radius in miles around the lat/lng point (default: 10).'
          schema:
            type: number
        - name: boundary-id
          required: false
          in: query
          description: Return events within the LiveBy boundary with this ID.
          schema:
            type: string
        - name: bounding-box-east
          required: false
          in: query
          description: >-
            Eastern longitude of the bounding box. All four sides required
            together.
          schema:
            type: number
        - name: bounding-box-west
          required: false
          in: query
          description: >-
            Western longitude of the bounding box. All four sides required
            together.
          schema:
            type: number
        - name: bounding-box-north
          required: false
          in: query
          description: >-
            Northern latitude of the bounding box. All four sides required
            together.
          schema:
            type: number
        - name: bounding-box-south
          required: false
          in: query
          description: >-
            Southern latitude of the bounding box. All four sides required
            together.
          schema:
            type: number
        - name: event-type
          required: false
          in: query
          description: >-
            Filter by one or more event types (any match). Values:
            class_workshop, competition, concert, convention_expo, festival,
            museum_exhibit, parade, performance_show, shopping, social, tour
          schema:
            type: array
        - name: interest
          required: false
          in: query
          description: >-
            Filter by one or more interest categories — events must contain all
            provided interests. Values: airplane, alcohol, art, arts_and_crafts,
            automotive_car, beauty, beer, boating, bowling, brunch, boot_camp,
            card_game, comedy, comic_book, cooking, costume_cosplay,
            current_events_and_politics, cycling, dance_participation,
            dance_performance, dinosaur, dog_focused, esports, fashion, film,
            fishing, fitness_general, floral_design, flowers, food, food_truck,
            fun_run, games, garden, gluten_free, gun, healing, hiking, history,
            holiday, home_and_garden, horse, house, improv, karaoke, lego,
            light, liquor, literature, magic, martial_arts, meditation,
            motorcycle, motorsport, music, nature, parenthood, pet, photography,
            pickleball, podcast, quinceanera, running, science,
            self_improvement, skiing, swimming, table_games, tattoo, tea,
            technology, theatre, track_and_field, travel, vegetarian_vegan,
            video_game, wedding, weights_bodybuilding, wine, yard_leisure_game,
            yoga, zoo
          schema:
            type: array
        - name: is-touring
          required: false
          in: query
          description: Filter to touring events (true) or non-touring events (false)
          schema:
            type: boolean
        - name: sort-by
          required: false
          in: query
          description: >-
            Field to sort results by. "distance" is valid when a spatial filter
            (latitude and longitude, boundary-id, or bounding box) is provided.
          schema:
            type: string
            enum:
              - distance
              - popularityScore
              - travelWorthy
              - modifiedAt
              - startDate
        - name: sort-direction
          required: false
          in: query
          description: 'Sort direction (default: asc)'
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: limit
          required: false
          in: query
          description: 'Number of results to return (1–100, default: 20)'
          schema:
            type: integer
        - name: offset
          required: false
          in: query
          description: 'Number of results to skip for pagination (default: 0)'
          schema:
            type: integer
      responses:
        '200':
          description: Paginated list of events matching the query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsListResponseDto'
        '400':
          description: Invalid query parameters or missing required location filter
      security:
        - bearer: []
      summary: Search nearby events
      tags:
        - beta
        - Nearby Events
  /v4/nearby-events/{id}:
    get:
      description: Returns a single event by its UUID.
      operationId: NearbyEventsController_getEvent_v4
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: The event with the given ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponseDto'
        '404':
          description: Event not found
      security:
        - bearer: []
      summary: Get a single event
      tags:
        - beta
        - Nearby Events
  /v4/market-statistics:
    get:
      description: >
        Get market statistics based on search criteria. This endpoint returns
        aggregated statistics for any listings that have sold within a specified
        timeframe. <br /><br /> **Required**: Filters must include either a
        boundary-id or an MLS plus one additional area filter. Area filters
        include city, area-level-1, area-level-2, and postal-code.
      operationId: sold-market-statistics
      parameters:
        - name: time-interval
          required: true
          in: query
          description: >-
            This is the interval of time you want aggregated market statistics
            for. This is an ISO 8601 time Interval with either

            <ul>
              <li>a start and end time</li>
              <li>a start time and duration</li>
              <li>or a duration and end time</li>
            </ul>

            Specifying a begin date retrieves all data for that day. Specifying
            an end date retrieves all data before that day. To get an entire
            month's worth of data, specify the first day of the month in
            question and the first day of the following month. Time values in
            the range are discarded.<br /><br />

            For example, passing a time interval of <b>2024-04-01/2024-05-01</b>
            or <b>2024-04-01/P1M</b> will return all data for April 2024. If you
            pass <b>2024-04-01/2024-04-30</b> or
            <b>2024-04-01T00:00:00/2024-04-3T23:59:59</b> you might be expecting
            all of April, but you'd end up missing data from April 30 in both
            cases.<br /><br />

            More information on ISO 8601 durations can be found <a
            href="https://en.wikipedia.org/wiki/ISO_8601#Time_intervals"
            target="_blank">here</a>.
                
          schema:
            example: '&time-interval=P1Y/2008-05-11T15:30:00Z'
            type: string
        - name: mls
          required: false
          in: query
          description: The MLS code you want associated boundary IDs from.
          schema:
            type: array
            items:
              type: string
        - name: boundary-id
          required: false
          in: query
          description: >-
            The boundary id or ids you want aggregated market statistics for.
            Boundary ids are the only way to get data by legally defined
            geometry. All other parameters like city, search on the postal
            address. See [Cities vs Postal
            Cities](https://docs.liveby.com/guides/boundaries/cities-vs-postal-cities).

            By default, all boundary IDs will be grouped together. If you want
            to group by individual boundary IDs, you can use the `group-by`
            query parameter.

            **Note:** at least one boundary-id, city, local-area-1,
            local-area-2, or postal-code is required.
          schema:
            type: array
            items:
              type: string
        - name: simple-property-type
          required: false
          in: query
          description: >-
            LiveBy's simplified property type classification system. This is a
            classification that merges the Property Type and Property Sub Type
            into a single value and is not RESO standard. It is designed to make
            it easier to filter and group listings into broad categories.
          schema:
            example: >-
              &simple-property-type=SINGLE_FAMILY&simple-property-type=CONDO&simple-property-type=LAND
            type: array
            items:
              type: string
              enum:
                - LAND
                - COMMERCIAL
                - APARTMENT
                - RESIDENTIAL_RENTAL
                - MULTI_FAMILY
                - CONDO
                - SINGLE_FAMILY
                - TOWNHOUSE
                - MANUFACTURED_HOME
                - MOBILE_HOME
                - FARM
                - RANCH
                - BOAT_SLIP
                - PARKING
                - HOTEL
                - MIXED_USE
                - STOCK_COOPERATIVE
                - TIMESHARE
                - OFFICE
                - OTHER
        - name: property-type
          required: false
          in: query
          description: >-
            The property type or types you want aggregated market statistics
            for.
          schema:
            example: '&property-type=Residential&property-type=Commercial'
            type: array
            items:
              type: string
              enum:
                - Residential
                - ResidentialLease
                - ResidentialIncome
                - Commercial
                - Land
                - Other
                - All
        - name: property-sub-type
          required: false
          in: query
          description: |2-
              The property sub type or sub types you want aggregated market statistics for. Sub Types are used to distinguish between the types of residential or commercial data available.
              <br /><br />
              For instance, the most common suburban home would be a SingleFamilyResidence. A Condominium is usually defined as a subsection of a building made to be a place of dwelling. The place of dwelling is usually only 1 story tall. A Townhouse is usually a multilevel building attached to other multilevel buildings with no dwelling above or below it. See the [RESO Standard Lookups](https://ddwiki.reso.org/display/DDW20/PropertySubType+Lookups) for more information on property sub types.

              **Disclaimer:** LiveBy ensures the availability of SingleFamilyResidence, Townhouse, and Condominium in each MLS. The availability of other PropertySubTypes may vary and is more limited by MLS.

              For Residential Listings, we recommend using SingleFamilyResidence, Townhouse, and Condominium.

              
          schema:
            example: >-
              &property-sub-type=SingleFamilyResidence&property-sub-type=Condominium
            type: array
            items:
              type: string
              enum:
                - SingleFamilyResidence
                - Agriculture
                - Apartment
                - BoatSlip
                - Business
                - Cabin
                - Condominium
                - DeededParking
                - FarmAndRanch
                - Hotel
                - Industrial
                - ManufacturedHome
                - MixedUse
                - Mobile
                - MultiFamily
                - Office
                - OwnYourOwn
                - Retail
                - StockCooperative
                - Timeshare
                - Townhouse
                - Land
                - UnimprovedLand
                - Warehouse
                - Other
        - name: city
          required: false
          in: query
          description: >-
            The postal city or cities you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            Standard field “City”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This is
            often called “state”, “province” or “district” in various countries.
            This uses the RESO standard field “StateOrProvince”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          description: >-
            The second political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This uses
            the RESO standard field “CountyOrParish”.
          schema:
            type: array
            items:
              type: string
        - name: postal-code
          required: false
          in: query
          description: >-
            The postal code or codes you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            standard field “PostalCode”.
          schema:
            type: array
            items:
              type: string
        - name: mls-area-major
          required: false
          in: query
          description: The MLS Area Major for which you want market statistics.
          schema:
            type: array
            items:
              type: string
        - name: outlier-original-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-original-list-price-low=5000'
            type: number
        - name: outlier-original-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-original-list-price-high=1000000000'
            type: number
        - name: outlier-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-list-price-low=5000'
            type: number
        - name: outlier-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-list-price-high=1000000000'
            type: number
        - name: outlier-close-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-close-price-low=5000'
            type: number
        - name: outlier-close-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-close-price-high=1000000000'
            type: number
        - name: outlier-days-on-market-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            example: '&outlier-days-on-market-low=0'
            type: number
        - name: outlier-days-on-market-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000
            example: '&outlier-days-on-market-high=1000'
            type: number
        - name: outlier-living-area-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            example: '&outlier-living-area-low=0'
            type: number
        - name: outlier-living-area-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 10000
            example: '&outlier-living-area-high=10000'
            type: number
        - name: outlier-year-built-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1700
            example: '&outlier-year-built-low=1700'
            type: number
        - name: outlier-year-built-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 2027
            example: '&outlier-year-built-high=2027'
            type: number
        - name: living-area-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-low=2000'
            type: number
        - name: living-area-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-high=5000'
            type: number
        - name: beds-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bedrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?beds-low=3'
            type: number
        - name: beds-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bedrooms than the value
            specified. Unlike the outlier filter, this will remove listings from
            all statistics, not just the price statistics.
          schema:
            example: '?beds-high=5'
            type: number
        - name: baths-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-low=2'
            type: number
        - name: baths-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-high=3'
            type: number
        - name: close-price-low
          required: false
          in: query
          description: >-
            This removes any listings that have a close price less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '&close-price-low=100000'
            type: number
        - name: close-price-high
          required: false
          in: query
          description: >-
            This removes any listings that have a close price more than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '&close-price-high=10000000'
            type: number
        - name: group-by
          required: false
          in: query
          description: >
            This lets you group data by date range using one of the options
            provided below.

            <br /><br />

            **If this is not specified you will get an aggregate of all data.**
            This is useful for making rolling averages of data.

            <br /><br />

            If you specify two years of data by using
            `&time-interval=2022-01-01T00:00:00Z/P2Y` and group by year, you
            will get an array of 3 results.

            <br /><br />

            The first array will be for the first year, and the second array
            will be for the second year. You will also get an aggregate of all
            data combined.

            <br /><br />

            If you specify quarter, you will get 11 results in the array, 8
            quarters, (4 quarters * 2 years) +  2 years + 1 total.

            <br /><br />

            If you specify month, you will get 27 results in the array, 24
            months (12 months * 2 years) + 2 years + 1 total.

            <br /><br />

            For information on grouping by price, see the price-segments
            parameter.


            If you would like to get multiple boundaries, you can also specify
            `&group-by=boundary-id`.


            If you would like to get data groupbed by SimplePropertyType, you
            can also specify `&group-by=simple-property-type`.


            If you would like to get data groupbed by PropertySubType, you can
            also specify `&group-by=property-sub-type`.


            If you would like to get data groupbed by PropertyType, you can also
            specify `&group-by=property-type`.


            If you specify multiple group-by parameters that are time ranges,
            only the first will be used.
          schema:
            example: '&group-by=month'
            type: array
            items:
              type: string
              enum:
                - year
                - quarter
                - month
                - week
                - boundary-id
                - property-sub-type
                - property-type
                - simple-property-type
        - name: price-segment
          required: false
          in: query
          description: >
            If this parameter is provided, an aggregate is created for each
            price range defined by the price segments provided. It is implied
            that the first price range starts at 0. Also, the low price is
            inclusive (>=) and the high price is exclusive (<). See the example
            below.

            <br><br>

            This will always provide one more range than the number of
            **price-segment** parameters provided.

            <br><br>

            You may also specify either **_best-fit_** or **_mesokurtic_** for
            an auto generated set of price segments, or **_default_** to use the
            default price segment options.

            <br><br><br><br>


            In this example, the price range aggregates will be:


            - 0 - 499,999

            - 500,000 - 999,999

            - 1,000,000 - 1,499,999

            - 1,500,000 +
          schema:
            default: []
            example: '&price-segment=500000&price-segment=1000000&price-segment=1500000'
            oneOf:
              - type: array
                items:
                  type: integer
              - type: string
        - name: price-segment-amount
          required: false
          in: query
          description: >-
            This parameter specifies the number of price segments to when the
            price-segment option is set to best-fit, mesokurtic, or default.

            <br/> The default price segments will be a value that does not
            change based on the price of houses in the area.

            <br/> The best-fit price segments will be the price segment that
            best distributes the amount of listings across all price ranges.

            <br/> The mesokurtic price segments will be the price segment that
            best fits a standard distribution of the listings across all price
            ranges.

            <br /><br />

            This parameter can only be 5 or 10.

            The default is 10.

            <br /><br />

            While this parameter specifies either 5 or 10 segments, 6 or 11
            total buckets will be returned, since there is always an upper and
            lower bound.
              
          schema:
            example:
              - '&price-segment-amount=10'
              - '&price-segment-amount=5'
            type: number
            enum:
              - 5
              - 10
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SoldMarketStatisticsDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Sold Market Statistics
      tags:
        - Market Statistics
  /v4/market-statistics/active:
    get:
      description: >-
        Get market statistics based on search criteria. This endpoint returns
        aggregated statistics for any listings that have an active or pending
        status.<br /><br /> **Required**: Filters must include either a
        boundary-id or an MLS plus one additional area filter. Area filters
        include city, area-level-1, area-level-2, and postal-code.
      operationId: active-market-statistics
      parameters:
        - name: status
          required: false
          in: query
          description: >-
            The status or statuses you want aggregated market statistics for.
            See [RESO Standard Status
            Lookups](https://ddwiki.reso.org/display/DDW20/StandardStatus+Lookups)
            for more information on status types. We expect the status to be in
            "PascalCase" format but will attempt map any casing convention to
            the relevant status.
          examples:
            Active:
              value: Active
            Pending:
              value: Pending
            ActiveUnderContract:
              value: ActiveUnderContract
          schema:
            default:
              - Active
              - Pending
              - ActiveUnderContract
            example: '?status=Active&status=Pending'
            type: array
            items:
              type: string
              enum:
                - Active
                - ActiveUnderContract
                - ComingSoon
                - Pending
        - name: mls
          required: false
          in: query
          description: The MLS code you want associated boundary IDs from.
          schema:
            type: array
            items:
              type: string
        - name: boundary-id
          required: false
          in: query
          description: >-
            The boundary id or ids you want aggregated market statistics for.
            Boundary ids are the only way to get data by legally defined
            geometry. All other parameters like city, search on the postal
            address. See [Cities vs Postal
            Cities](https://docs.liveby.com/guides/boundaries/cities-vs-postal-cities).

            By default, all boundary IDs will be grouped together. If you want
            to group by individual boundary IDs, you can use the `group-by`
            query parameter.

            **Note:** at least one boundary-id, city, local-area-1,
            local-area-2, or postal-code is required.
          schema:
            type: array
            items:
              type: string
        - name: simple-property-type
          required: false
          in: query
          description: >-
            LiveBy's simplified property type classification system. This is a
            classification that merges the Property Type and Property Sub Type
            into a single value and is not RESO standard. It is designed to make
            it easier to filter and group listings into broad categories.
          schema:
            example: >-
              &simple-property-type=SINGLE_FAMILY&simple-property-type=CONDO&simple-property-type=LAND
            type: array
            items:
              type: string
              enum:
                - LAND
                - COMMERCIAL
                - APARTMENT
                - RESIDENTIAL_RENTAL
                - MULTI_FAMILY
                - CONDO
                - SINGLE_FAMILY
                - TOWNHOUSE
                - MANUFACTURED_HOME
                - MOBILE_HOME
                - FARM
                - RANCH
                - BOAT_SLIP
                - PARKING
                - HOTEL
                - MIXED_USE
                - STOCK_COOPERATIVE
                - TIMESHARE
                - OFFICE
                - OTHER
        - name: property-type
          required: false
          in: query
          description: >-
            The property type or types you want aggregated market statistics
            for.
          schema:
            example: '&property-type=Residential&property-type=Commercial'
            type: array
            items:
              type: string
              enum:
                - Residential
                - ResidentialLease
                - ResidentialIncome
                - Commercial
                - Land
                - Other
                - All
        - name: property-sub-type
          required: false
          in: query
          description: |2-
              The property sub type or sub types you want aggregated market statistics for. Sub Types are used to distinguish between the types of residential or commercial data available.
              <br /><br />
              For instance, the most common suburban home would be a SingleFamilyResidence. A Condominium is usually defined as a subsection of a building made to be a place of dwelling. The place of dwelling is usually only 1 story tall. A Townhouse is usually a multilevel building attached to other multilevel buildings with no dwelling above or below it. See the [RESO Standard Lookups](https://ddwiki.reso.org/display/DDW20/PropertySubType+Lookups) for more information on property sub types.

              **Disclaimer:** LiveBy ensures the availability of SingleFamilyResidence, Townhouse, and Condominium in each MLS. The availability of other PropertySubTypes may vary and is more limited by MLS.

              For Residential Listings, we recommend using SingleFamilyResidence, Townhouse, and Condominium.

              
          schema:
            example: >-
              &property-sub-type=SingleFamilyResidence&property-sub-type=Condominium
            type: array
            items:
              type: string
              enum:
                - SingleFamilyResidence
                - Agriculture
                - Apartment
                - BoatSlip
                - Business
                - Cabin
                - Condominium
                - DeededParking
                - FarmAndRanch
                - Hotel
                - Industrial
                - ManufacturedHome
                - MixedUse
                - Mobile
                - MultiFamily
                - Office
                - OwnYourOwn
                - Retail
                - StockCooperative
                - Timeshare
                - Townhouse
                - Land
                - UnimprovedLand
                - Warehouse
                - Other
        - name: city
          required: false
          in: query
          description: >-
            The postal city or cities you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            Standard field “City”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This is
            often called “state”, “province” or “district” in various countries.
            This uses the RESO standard field “StateOrProvince”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          description: >-
            The second political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This uses
            the RESO standard field “CountyOrParish”.
          schema:
            type: array
            items:
              type: string
        - name: postal-code
          required: false
          in: query
          description: >-
            The postal code or codes you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            standard field “PostalCode”.
          schema:
            type: array
            items:
              type: string
        - name: mls-area-major
          required: false
          in: query
          description: The MLS Area Major for which you want market statistics.
          schema:
            type: array
            items:
              type: string
        - name: outlier-original-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-original-list-price-low=5000'
            type: number
        - name: outlier-original-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-original-list-price-high=1000000000'
            type: number
        - name: outlier-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-list-price-low=5000'
            type: number
        - name: outlier-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-list-price-high=1000000000'
            type: number
        - name: outlier-days-on-site-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            example: '&outlier-days-on-site-low=0'
            type: number
        - name: outlier-days-on-site-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000
            example: '&outlier-days-on-site-high=1000'
            type: number
        - name: outlier-living-area-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            example: '&outlier-living-area-low=0'
            type: number
        - name: outlier-living-area-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 10000
            example: '&outlier-living-area-high=10000'
            type: number
        - name: outlier-year-built-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1700
            example: '&outlier-year-built-low=1700'
            type: number
        - name: outlier-year-built-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 2027
            example: '&outlier-year-built-high=2027'
            type: number
        - name: list-price-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a list price less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?list-price-low=100000'
            type: number
        - name: list-price-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a list price greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?list-price-high=10000000'
            type: number
        - name: living-area-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-low=2000'
            type: number
        - name: living-area-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-high=5000'
            type: number
        - name: beds-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bedrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?beds-low=3'
            type: number
        - name: beds-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bedrooms than the value
            specified. Unlike the outlier filter, this will remove listings from
            all statistics, not just the price statistics.
          schema:
            example: '?beds-high=5'
            type: number
        - name: baths-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-low=2'
            type: number
        - name: baths-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-high=3'
            type: number
        - name: price-segment
          required: false
          in: query
          description: >
            If this parameter is provided, an aggregate is created for each
            price range defined by the price segments provided. It is implied
            that the first price range starts at 0. Also, the low price is
            inclusive (>=) and the high price is exclusive (<). See the example
            below.

            <br><br>

            This will always provide one more range than the number of
            **price-segment** parameters provided.

            <br><br>

            You may also specify either **_best-fit_** or **_mesokurtic_** for
            an auto generated set of price segments, or **_default_** to use the
            default price segment options.

            <br><br><br><br>


            In this example, the price range aggregates will be:


            - 0 - 499,999

            - 500,000 - 999,999

            - 1,000,000 - 1,499,999

            - 1,500,000 +
          schema:
            default: []
            example: '&price-segment=500000&price-segment=1000000&price-segment=1500000'
            oneOf:
              - type: array
                items:
                  type: integer
              - type: string
        - name: price-segment-amount
          required: false
          in: query
          description: >-
            This parameter specifies the number of price segments to when the
            price-segment option is set to best-fit, mesokurtic, or default.

            <br/> The default price segments will be a value that does not
            change based on the price of houses in the area.

            <br/> The best-fit price segments will be the price segment that
            best distributes the amount of listings across all price ranges.

            <br/> The mesokurtic price segments will be the price segment that
            best fits a standard distribution of the listings across all price
            ranges.

            <br /><br />

            This parameter can only be 5 or 10.

            The default is 10.

            <br /><br />

            While this parameter specifies either 5 or 10 segments, 6 or 11
            total buckets will be returned, since there is always an upper and
            lower bound.
              
          schema:
            example:
              - '&price-segment-amount=10'
              - '&price-segment-amount=5'
            type: number
            enum:
              - 5
              - 10
        - name: group-by
          required: false
          in: query
          description: >
            This lets you group the data by boundary ID, by specifying
            `&group-by=boundary-id` you'll receive aggregates for each boundary
            ID requested. Otherwise, you'll receive the data aggregated together
            for all requested boundary IDs.
          schema:
            example: '&group-by=boundary-id'
            type: string
            enum:
              - boundary-id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/ActiveMarketStatisticsDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Active Market Statistics
      tags:
        - Market Statistics
  /v4/market-statistics/added-to-market:
    get:
      description: >-
        Get market statistics based on search criteria. This endpoint returns
        aggregated statistics for any listings that were listed within a
        specified timeframe.<br /><br /> **Required**: Filters must include
        either a boundary-id or an MLS plus one additional area filter. Area
        filters include city, area-level-1, area-level-2, and postal-code.
      operationId: added-to-market-statistics
      parameters:
        - name: time-interval
          required: true
          in: query
          description: >-
            This is the interval of time you want aggregated market statistics
            for. This is an ISO 8601 time Interval with either

            <ul>
              <li>a start and end time</li>
              <li>a start time and duration</li>
              <li>or a duration and end time</li>
            </ul>

            Specifying a begin date retrieves all data for that day. Specifying
            an end date retrieves all data before that day. To get an entire
            month's worth of data, specify the first day of the month in
            question and the first day of the following month. Time values in
            the range are discarded.<br /><br />

            For example, passing a time interval of <b>2024-04-01/2024-05-01</b>
            or <b>2024-04-01/P1M</b> will return all data for April 2024. If you
            pass <b>2024-04-01/2024-04-30</b> or
            <b>2024-04-01T00:00:00/2024-04-3T23:59:59</b> you might be expecting
            all of April, but you'd end up missing data from April 30 in both
            cases.<br /><br />

            More information on ISO 8601 durations can be found <a
            href="https://en.wikipedia.org/wiki/ISO_8601#Time_intervals"
            target="_blank">here</a>.
                
          schema:
            example: '&time-interval=P1Y/2008-05-11T15:30:00Z'
            type: string
        - name: mls
          required: false
          in: query
          description: The MLS code you want associated boundary IDs from.
          schema:
            type: array
            items:
              type: string
        - name: boundary-id
          required: false
          in: query
          description: >-
            The boundary id or ids you want aggregated market statistics for.
            Boundary ids are the only way to get data by legally defined
            geometry. All other parameters like city, search on the postal
            address. See [Cities vs Postal
            Cities](https://docs.liveby.com/guides/boundaries/cities-vs-postal-cities).

            By default, all boundary IDs will be grouped together. If you want
            to group by individual boundary IDs, you can use the `group-by`
            query parameter.

            **Note:** at least one boundary-id, city, local-area-1,
            local-area-2, or postal-code is required.
          schema:
            type: array
            items:
              type: string
        - name: simple-property-type
          required: false
          in: query
          description: >-
            LiveBy's simplified property type classification system. This is a
            classification that merges the Property Type and Property Sub Type
            into a single value and is not RESO standard. It is designed to make
            it easier to filter and group listings into broad categories.
          schema:
            example: >-
              &simple-property-type=SINGLE_FAMILY&simple-property-type=CONDO&simple-property-type=LAND
            type: array
            items:
              type: string
              enum:
                - LAND
                - COMMERCIAL
                - APARTMENT
                - RESIDENTIAL_RENTAL
                - MULTI_FAMILY
                - CONDO
                - SINGLE_FAMILY
                - TOWNHOUSE
                - MANUFACTURED_HOME
                - MOBILE_HOME
                - FARM
                - RANCH
                - BOAT_SLIP
                - PARKING
                - HOTEL
                - MIXED_USE
                - STOCK_COOPERATIVE
                - TIMESHARE
                - OFFICE
                - OTHER
        - name: property-type
          required: false
          in: query
          description: >-
            The property type or types you want aggregated market statistics
            for.
          schema:
            example: '&property-type=Residential&property-type=Commercial'
            type: array
            items:
              type: string
              enum:
                - Residential
                - ResidentialLease
                - ResidentialIncome
                - Commercial
                - Land
                - Other
                - All
        - name: property-sub-type
          required: false
          in: query
          description: |2-
              The property sub type or sub types you want aggregated market statistics for. Sub Types are used to distinguish between the types of residential or commercial data available.
              <br /><br />
              For instance, the most common suburban home would be a SingleFamilyResidence. A Condominium is usually defined as a subsection of a building made to be a place of dwelling. The place of dwelling is usually only 1 story tall. A Townhouse is usually a multilevel building attached to other multilevel buildings with no dwelling above or below it. See the [RESO Standard Lookups](https://ddwiki.reso.org/display/DDW20/PropertySubType+Lookups) for more information on property sub types.

              **Disclaimer:** LiveBy ensures the availability of SingleFamilyResidence, Townhouse, and Condominium in each MLS. The availability of other PropertySubTypes may vary and is more limited by MLS.

              For Residential Listings, we recommend using SingleFamilyResidence, Townhouse, and Condominium.

              
          schema:
            example: >-
              &property-sub-type=SingleFamilyResidence&property-sub-type=Condominium
            type: array
            items:
              type: string
              enum:
                - SingleFamilyResidence
                - Agriculture
                - Apartment
                - BoatSlip
                - Business
                - Cabin
                - Condominium
                - DeededParking
                - FarmAndRanch
                - Hotel
                - Industrial
                - ManufacturedHome
                - MixedUse
                - Mobile
                - MultiFamily
                - Office
                - OwnYourOwn
                - Retail
                - StockCooperative
                - Timeshare
                - Townhouse
                - Land
                - UnimprovedLand
                - Warehouse
                - Other
        - name: city
          required: false
          in: query
          description: >-
            The postal city or cities you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            Standard field “City”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This is
            often called “state”, “province” or “district” in various countries.
            This uses the RESO standard field “StateOrProvince”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          description: >-
            The second political subdivision you want aggregated market
            statistics for. You can use this instead of a boundary id. This uses
            the RESO standard field “CountyOrParish”.
          schema:
            type: array
            items:
              type: string
        - name: postal-code
          required: false
          in: query
          description: >-
            The postal code or codes you want aggregated market statistics for.
            You can use this instead of a boundary id. This uses the RESO
            standard field “PostalCode”.
          schema:
            type: array
            items:
              type: string
        - name: mls-area-major
          required: false
          in: query
          description: The MLS Area Major for which you want market statistics.
          schema:
            type: array
            items:
              type: string
        - name: outlier-original-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-original-list-price-low=5000'
            type: number
        - name: outlier-original-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-original-list-price-high=1000000000'
            type: number
        - name: outlier-list-price-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 5000
            example: '&outlier-list-price-low=5000'
            type: number
        - name: outlier-list-price-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1000000000
            example: '&outlier-list-price-high=1000000000'
            type: number
        - name: outlier-living-area-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            example: '&outlier-living-area-low=0'
            type: number
        - name: outlier-living-area-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 10000
            example: '&outlier-living-area-high=10000'
            type: number
        - name: outlier-year-built-low
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 1700
            example: '&outlier-year-built-low=1700'
            type: number
        - name: outlier-year-built-high
          required: false
          in: query
          description: >-
            LiveBy by default cleans the data to remove outliers. LiveBy does
            not remove outlier data from the total counts, only the field’s
            counts, and statistics. You can use the count value of each field to
            determine if that field had outliers and was available from the MLS
            data sources.
          schema:
            default: 2027
            example: '&outlier-year-built-high=2027'
            type: number
        - name: list-price-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a list price less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?list-price-low=100000'
            type: number
        - name: list-price-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a list price greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?list-price-high=10000000'
            type: number
        - name: living-area-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-low=2000'
            type: number
        - name: living-area-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-high=5000'
            type: number
        - name: beds-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bedrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?beds-low=3'
            type: number
        - name: beds-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bedrooms than the value
            specified. Unlike the outlier filter, this will remove listings from
            all statistics, not just the price statistics.
          schema:
            example: '?beds-high=5'
            type: number
        - name: baths-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-low=2'
            type: number
        - name: baths-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bathrooms than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?baths-high=3'
            type: number
        - name: group-by
          required: false
          in: query
          description: >
            This lets you group data by date range using one of the options
            provided below.

            <br /><br />

            **If this is not specified you will get an aggregate of all data.**
            This is useful for making rolling averages of data.

            <br /><br />

            If you specify two years of data by using
            `&time-interval=2022-01-01T00:00:00Z/P2Y` and group by year, you
            will get an array of 3 results.

            <br /><br />

            The first array will be for the first year, and the second array
            will be for the second year. You will also get an aggregate of all
            data combined.

            <br /><br />

            If you specify quarter, you will get 11 results in the array, 8
            quarters, (4 quarters * 2 years) +  2 years + 1 total.

            <br /><br />

            If you specify month, you will get 27 results in the array, 24
            months (12 months * 2 years) + 2 years + 1 total.

            <br /><br />

            For information on grouping by price, see the price-segments
            parameter.


            If you would like to get multiple boundaries, you can also specify
            `&group-by=boundary-id`.


            If you would like to get data groupbed by SimplePropertyType, you
            can also specify `&group-by=simple-property-type`.


            If you would like to get data groupbed by PropertySubType, you can
            also specify `&group-by=property-sub-type`.


            If you would like to get data groupbed by PropertyType, you can also
            specify `&group-by=property-type`.


            If you specify multiple group-by parameters that are time ranges,
            only the first will be used.
          schema:
            example: '&group-by=month'
            type: array
            items:
              type: string
              enum:
                - year
                - quarter
                - month
                - week
                - boundary-id
                - property-sub-type
                - property-type
                - simple-property-type
        - name: price-segment
          required: false
          in: query
          description: >
            If this parameter is provided, an aggregate is created for each
            price range defined by the price segments provided. It is implied
            that the first price range starts at 0. Also, the low price is
            inclusive (>=) and the high price is exclusive (<). See the example
            below.

            <br><br>

            This will always provide one more range than the number of
            **price-segment** parameters provided.

            <br><br>

            You may also specify either **_best-fit_** or **_mesokurtic_** for
            an auto generated set of price segments, or **_default_** to use the
            default price segment options.

            <br><br><br><br>


            In this example, the price range aggregates will be:


            - 0 - 499,999

            - 500,000 - 999,999

            - 1,000,000 - 1,499,999

            - 1,500,000 +
          schema:
            default: []
            example: '&price-segment=500000&price-segment=1000000&price-segment=1500000'
            oneOf:
              - type: array
                items:
                  type: integer
              - type: string
        - name: price-segment-amount
          required: false
          in: query
          description: >-
            This parameter specifies the number of price segments to when the
            price-segment option is set to best-fit, mesokurtic, or default.

            <br/> The default price segments will be a value that does not
            change based on the price of houses in the area.

            <br/> The best-fit price segments will be the price segment that
            best distributes the amount of listings across all price ranges.

            <br/> The mesokurtic price segments will be the price segment that
            best fits a standard distribution of the listings across all price
            ranges.

            <br /><br />

            This parameter can only be 5 or 10.

            The default is 10.

            <br /><br />

            While this parameter specifies either 5 or 10 segments, 6 or 11
            total buckets will be returned, since there is always an upper and
            lower bound.
              
          schema:
            example:
              - '&price-segment-amount=10'
              - '&price-segment-amount=5'
            type: number
            enum:
              - 5
              - 10
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/AddedToMarketMarketStatisticsDto
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Added to Market Statistics
      tags:
        - Market Statistics
  /v4/mls/members:
    get:
      description: Search for MLS members by name, email, Office ID, or MLS ID.
      operationId: MLS Members
      parameters:
        - name: mls
          required: false
          in: query
          description: MLS Vendor ID(s) to filter members by. Case sensitive.
          schema:
            type: string
        - name: city
          required: false
          in: query
          description: City of the member. Case sensitive.
          schema:
            type: string
        - name: stateOrProvince
          required: false
          in: query
          description: State or Province of the member. Case sensitive.
          schema:
            type: string
        - name: email
          required: false
          in: query
          description: Email of the member. Case insensitive.
          schema:
            type: string
        - name: firstName
          required: false
          in: query
          description: First name of the member. Case insensitive.
          schema:
            type: string
        - name: lastName
          required: false
          in: query
          description: Last name of the member. Case insensitive.
          schema:
            type: string
        - name: fullName
          required: false
          in: query
          description: Full name of the member. Case insensitive.
          schema:
            type: string
        - name: mobilePhoneNumber
          required: false
          in: query
          description: Mobile phone number of the member.
          schema:
            type: string
        - name: stateLicense
          required: false
          in: query
          description: State license of the member. Case sensitive.
          schema:
            type: string
        - name: memberMlsId
          required: false
          in: query
          description: Member MLS ID of the member. Case insensitive.
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the member. Case insensitive.
          schema:
            type: string
        - name: type
          required: false
          in: query
          description: Type of the member. Case sensitive.
          schema:
            type: string
        - name: officeMlsId
          required: false
          in: query
          description: Office MLS ID of the member. Case sensitive.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Maximum number of members to return.
          schema:
            minimum: 1
            maximum: 1000
            default: 1000
            type: number
        - name: offset
          required: false
          in: query
          description: Number of members to skip before starting to collect the result set.
          schema:
            minimum: 0
            maximum: 500000
            default: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/MLSMemberResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Get MLS Member Information
      tags:
        - MLS
        - hidden
  /v4/mls/offices:
    get:
      description: Search for MLS offices by name, email, or MLS ID.
      operationId: MLS Offices
      parameters:
        - name: mls
          required: false
          in: query
          description: MLS Vendor ID(s) to filter offices by. Case sensitive.
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the office. Case insensitive.
          schema:
            type: string
        - name: name
          required: false
          in: query
          description: Legal name of the office. Case insensitive.
          schema:
            type: string
        - name: city
          required: false
          in: query
          description: City of the office. Case insensitive.
          schema:
            type: string
        - name: stateOrProvince
          required: false
          in: query
          description: State or province of the office. Case sensitive.
          schema:
            type: string
        - name: mainOfficeMlsId
          required: false
          in: query
          description: The Main Office MLS ID. Case insensitive.
          schema:
            type: string
        - name: officeMlsId
          required: false
          in: query
          description: MLS ID of the office. Case insensitive.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Maximum number of offices to return.
          schema:
            default: 1000
            type: number
        - name: offset
          required: false
          in: query
          description: Number of offices to skip before starting to collect the result set.
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/MLSOfficeResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: Get MLS Office Information
      tags:
        - MLS
        - hidden
  /v4/listings:
    get:
      description: >-
        Get details of MLS Listings. You must have access to the MLS in the area
        to get information about individual MLS Listings.
      operationId: listings
      parameters:
        - name: time-interval
          required: false
          in: query
          description: >-
            This is the interval of time you want to get listings in. If the
            listing is Closed, then the ClosedDate is used to filter. If the
            listing is not Closed, it uses the OnMarketDate is used. 

            This is an ISO 8601 time Interval with either

            <ul>
              <li>a start and end time</li>
              <li>a start time and duration</li>
              <li>or a duration and end time</li>
            </ul>

            Specifying a begin date retrieves all data for that day. Specifying
            an end date retrieves all data before that day. To get an entire
            month's worth of data, specify the first day of the month in
            question and the first day of the following month. Time values in
            the range are discarded.<br /><br />

            For example, passing a time interval of <b>2024-04-01/2024-05-01</b>
            or <b>2024-04-01/P1M</b> will return all data for April 2024. If you
            pass <b>2024-04-01/2024-04-30</b> or
            <b>2024-04-01T00:00:00/2024-04-3T23:59:59</b> you might be expecting
            all of April, but you'd end up missing data from April 30 in both
            cases.<br /><br />

            More information on ISO 8601 durations can be found <a
            href="https://en.wikipedia.org/wiki/ISO_8601#Time_intervals"
            target="_blank">here</a>.
                
          schema:
            example: '&time-interval=P1Y/2008-05-11T15:30:00Z'
            type: string
        - name: mls
          required: false
          in: query
          description: >-
            The MLS code you want associated boundary IDs from. This value can
            be found on an MLS record as `resoPropertiesVendor`
          schema:
            type: array
            items:
              type: string
        - name: status
          required: false
          in: query
          description: >-
            The status or statuses you want listings for. See [RESO Standard
            Status
            Lookups](https://ddwiki.reso.org/display/DDW20/StandardStatus+Lookups)
            for more information on status types. We expect the status to be in
            "PascalCase" format but will attempt map any casing convention to
            the relevant status.
          examples:
            Active:
              value: Active
            Pending:
              value: Pending
            ActiveUnderContract:
              value: ActiveUnderContract
          schema:
            default:
              - Active
              - Pending
              - ActiveUnderContract
              - Closed
              - Canceled
            example: '?status=Active&status=Pending'
            type: array
            items:
              type: string
              enum:
                - Active
                - ActiveUnderContract
                - Pending
                - Closed
                - Canceled
                - ComingSoon
        - name: address
          required: false
          in: query
          description: >-
            An address to find MLS information about. This must be the full
            length address with the postal code at the end of the address.
          schema:
            example: '?address=100 Main Street Town, State 12345'
            type: string
        - name: addressId
          required: false
          in: query
          description: An address id to find MLS information about.
          schema:
            example: '?address-id=e4d42b45-98c0-455c-bed5-3f98cd83ff81'
            type: string
        - name: limit
          required: false
          in: query
          description: The amount of listings to return.
          schema:
            minimum: 1
            maximum: 200
            default: 20
            type: number
        - name: sort-by
          required: false
          in: query
          description: >-
            The field you want to sort by. If you sort by distance, you must
            provide an `address` or `address-id`.
          schema:
            type: string
            enum:
              - date
              - close-date
              - price
              - distance
              - square-feet
              - beds
              - baths
        - name: sort-direction
          required: false
          in: query
          description: Direction to sort the results.
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: order-by
          required: false
          in: query
          description: >-
            Deprecated alias for `sort-by`. Accepts the same values as
            `sort-by`.
          deprecated: true
          schema:
            type: string
            enum:
              - date
              - close-date
              - price
              - distance
              - square-feet
              - beds
              - baths
        - name: offset
          required: false
          in: query
          description: The offset of listings to return.
          schema:
            minimum: 0
            default: 0
            type: number
        - name: boundary-id
          required: false
          in: query
          description: >-
            This parameter filters listings by a boundary or boundaries'
            geometry. Boundary ids are the only way to get data by legally
            defined geometry. All other parameters like city, search on the
            postal address. See [Cities vs Postal
            Cities](https://docs.liveby.com/guides/boundaries/cities-vs-postal-cities).

            **Note:** at least one boundary-id, city, local-area-1,
            local-area-2, or postal-code is required.
          schema:
            type: array
            items:
              type: string
        - name: listing-id
          required: false
          in: query
          description: >-
            The listing id or ids you want to get a listing for.     Listing Ids
            can be the same in multiple different MLSes.     You should specify
            an mls, or an area value like the zipcode or boundary to ensure you
            get the listing you are looking for.
          schema:
            type: array
            items:
              type: string
        - name: list-agent-mls-id
          required: false
          in: query
          description: >-
            The listing agent's MLS ID or IDs you want to get a listing for.
            This does not scope the search on its own and must be combined with
            an `mls` value.
          schema:
            type: array
            items:
              type: string
        - name: list-office-mls-id
          required: false
          in: query
          description: >-
            The listing office's MLS ID or IDs you want to get a listing for.
            This does not scope the search on its own and must be combined with
            an `mls` value
          schema:
            type: array
            items:
              type: string
        - name: simple-property-type
          required: false
          in: query
          description: >-
            LiveBy's simplified property type classification system. This is a
            classification that merges the Property Type and Property Sub Type
            into a single value and is not RESO standard. It is designed to make
            it easier to filter and group listings into broad categories.
          schema:
            example: >-
              &simple-property-type=SINGLE_FAMILY&simple-property-type=CONDO&simple-property-type=LAND
            type: array
            items:
              type: string
              enum:
                - LAND
                - COMMERCIAL
                - APARTMENT
                - RESIDENTIAL_RENTAL
                - MULTI_FAMILY
                - CONDO
                - SINGLE_FAMILY
                - TOWNHOUSE
                - MANUFACTURED_HOME
                - MOBILE_HOME
                - FARM
                - RANCH
                - BOAT_SLIP
                - PARKING
                - HOTEL
                - MIXED_USE
                - STOCK_COOPERATIVE
                - TIMESHARE
                - OFFICE
                - OTHER
        - name: property-type
          required: false
          in: query
          description: The property type or types you want listings for.
          schema:
            example: '&property-type=Residential&property-type=Commercial'
            type: array
            items:
              type: string
              enum:
                - Residential
                - ResidentialLease
                - ResidentialIncome
                - Commercial
                - Land
                - Other
                - All
        - name: property-sub-type
          required: false
          in: query
          description: |2-
              The property sub type or sub types you want listings for. Sub Types are used to distinguish between the types of residential or commercial data available.
              <br /><br />
              For instance, the most common suburban home would be a SingleFamilyResidence. A Condominium is usually defined as a subsection of a building made to be a place of dwelling. The place of dwelling is usually only 1 story tall. A Townhouse is usually a multilevel building attached to other multilevel buildings with no dwelling above or below it. See the [RESO Standard Lookups](https://ddwiki.reso.org/display/DDW20/PropertySubType+Lookups) for more information on property sub types.

              **Disclaimer:** LiveBy ensures the availability of SingleFamilyResidence, Townhouse, and Condominium in each MLS. The availability of other PropertySubTypes may vary and is more limited by MLS.

              For Residential Listings, we recommend using SingleFamilyResidence, Townhouse, and Condominium.

              
          schema:
            example: >-
              &property-sub-type=SingleFamilyResidence&property-sub-type=Condominium
            type: array
            items:
              type: string
              enum:
                - SingleFamilyResidence
                - Agriculture
                - Apartment
                - BoatSlip
                - Business
                - Cabin
                - Condominium
                - DeededParking
                - FarmAndRanch
                - Hotel
                - Industrial
                - ManufacturedHome
                - MixedUse
                - Mobile
                - MultiFamily
                - Office
                - OwnYourOwn
                - Retail
                - StockCooperative
                - Timeshare
                - Townhouse
                - Land
                - UnimprovedLand
                - Warehouse
                - Other
        - name: city
          required: false
          in: query
          description: >-
            The postal city or cities you want listings for. You can use this
            instead of a boundary id. This uses the RESO Standard field “City”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-1
          required: false
          in: query
          description: >-
            The first political subdivision you want listings for. You can use
            this instead of a boundary id. This is often called “state”,
            “province” or “district” in various countries. This uses the RESO
            standard field “StateOrProvince”.
          schema:
            type: array
            items:
              type: string
        - name: area-level-2
          required: false
          in: query
          description: >-
            The second political subdivision you want listings for. You can use
            this instead of a boundary id. This uses the RESO standard field
            “CountyOrParish”.
          schema:
            type: array
            items:
              type: string
        - name: postal-code
          required: false
          in: query
          description: >-
            The postal code or codes you want listings for. You can use this
            instead of a boundary id. This uses the RESO standard field
            “PostalCode”.
          schema:
            type: array
            items:
              type: string
        - name: mls-area-major
          required: false
          in: query
          description: The MLS Area Major for which you want listings.
          schema:
            type: array
            items:
              type: string
        - name: price-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a price less than the value
            specified.
          schema:
            example: '?price-low=100000'
            type: number
        - name: price-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a price greater than the
            value specified.
          schema:
            example: '?price-high=10000000'
            type: number
        - name: living-area-low
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area less than the
            value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-low=2000'
            type: number
        - name: living-area-high
          required: false
          in: query
          description: >-
            This filters out any listings that have a living area greater than
            the value specified. Unlike the outlier filter, this will remove
            listings from all statistics, not just the price statistics.
          schema:
            example: '?living-area-high=5000'
            type: number
        - name: beds-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bedrooms than the
            value specified.
          schema:
            example: '?beds-low=3'
            type: number
        - name: beds-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bedrooms than the value
            specified.
          schema:
            example: '?beds-high=5'
            type: number
        - name: baths-low
          required: false
          in: query
          description: >-
            This filters out any listings that have fewer bathrooms than the
            value specified.
          schema:
            example: '?baths-low=2'
            type: number
        - name: baths-high
          required: false
          in: query
          description: >-
            This filters out any listings that have more bathrooms than the
            value specified.
          schema:
            example: '?baths-high=3'
            type: number
        - name: include-duplicates
          required: false
          in: query
          description: '    Used for testing purposes. If set to true, the API will return duplicate listings in the response. This is useful for testing the API''s handling of duplicates. If set to false, duplicates will be filtered out.'
          schema:
            default: false
            example: '?include-duplicates=true'
            type: boolean
        - name: user-id
          required: false
          in: query
          description: This is for internal use only. Do not use this parameter.
          schema:
            example: '?user-id=12345'
            type: number
        - name: account-id
          required: false
          in: query
          description: This is for internal use only. Do not use this parameter.
          schema:
            example: '?account-id=12345'
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/Listing'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: MLS Listings
      tags:
        - MLS Listings
        - hidden
  /v4/listings/open-houses:
    get:
      description: Get details of MLS Open Houses.
      operationId: open-houses
      parameters:
        - name: mls
          required: false
          in: query
          description: MLS Vendor ID(s) to filter Open Houses by. Case sensitive.
          schema:
            type: string
        - name: listingId
          required: false
          in: query
          description: Listing ID of the Open House. Case sensitive.
          schema:
            type: string
        - name: status
          required: false
          in: query
          description: Status of the Open House. Case insensitive.
          schema:
            type: string
        - name: type
          required: false
          in: query
          description: Type of the Open House. Case insensitive.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Maximum number of Open Houses to return.
          schema:
            minimum: 1
            maximum: 1000
            default: 1000
            type: number
        - name: offset
          required: false
          in: query
          description: >-
            Number of Open Houses to skip before starting to collect the result
            set.
          schema:
            minimum: 0
            maximum: 500000
            default: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/OpenHouseResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: MLS Open Houses
      tags:
        - MLS Listings
        - hidden
  /v4/listings/media:
    get:
      description: Get media of MLS Listings.
      operationId: media
      parameters:
        - name: mls
          required: false
          in: query
          description: MLS Vendor ID(s) to filter Media by. Case sensitive.
          schema:
            type: string
        - name: listingId
          required: false
          in: query
          description: Listing ID of the Media. Case sensitive.
          schema:
            type: string
        - name: mediaCategory
          required: false
          in: query
          description: Category of the Media. Case sensitive.
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Maximum number of Media to return.
          schema:
            minimum: 1
            maximum: 1000
            default: 1000
            type: number
        - name: offset
          required: false
          in: query
          description: Number of Media to skip before starting to collect the result set.
          schema:
            minimum: 0
            maximum: 500000
            default: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/StandardPaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/MLSMediaResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      security:
        - bearer: []
      summary: MLS Media
      tags:
        - MLS Listings
        - hidden
  /v4/accounts/me:
    get:
      description: Returns the LiveBy Account of the currently authenticated caller.
      operationId: get-my-account
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAccountResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Get My Account
      tags:
        - Account
  /v4/accounts/{id}:
    get:
      description: >-
        Returns a LiveBy Account by account ID. Only accounts that the caller
        has access to (their own account or a descendant) can be retrieved.
      operationId: get-account
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAccountResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Get Account
      tags:
        - Account
  /v4/accounts/{id}/api-keys:
    get:
      description: >-
        Lists the API keys for the given account (`me`, or an id that is the
        caller's own account or a descendant of it).
      operationId: list-account-api-keys
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiKeyListResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: List API Keys
      tags:
        - Account
    post:
      description: >-
        Creates a new API key for the given account (`me`, or an id that is the
        caller's own account or a descendant of it).
      operationId: create-account-api-key
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountApiKeyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiKeyResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Create API Key
      tags:
        - Account
  /v4/accounts/{id}/api-keys/{keyId}:
    put:
      description: Updates the name of an API key belonging to the given account.
      operationId: update-account-api-key
      parameters:
        - name: keyId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountApiKeyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiKeyResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Update API Key
      tags:
        - Account
    delete:
      description: >-
        Revokes (soft-deletes) an API key belonging to the given account. The
        key immediately stops working.
      operationId: revoke-account-api-key
      parameters:
        - name: keyId
          required: true
          in: path
          schema:
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiKeyResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Revoke API Key
      tags:
        - Account
  /v4/campaigns:
    post:
      description: >-
        Creates a new campaign for the report specified and sends it according
        to the campaign's send settings.
      operationId: create-campaign
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignPayloadDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCampaignResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Create Campaign
      tags:
        - Campaigns
        - beta
        - hidden
  /v4/reports:
    post:
      description: 'Creates a new report based on the provided input data.    '
      operationId: create-report
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/MarketReportInput'
                - $ref: '#/components/schemas/PropertyReportInput'
                - $ref: '#/components/schemas/SellerActivityReportInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateReportResponseDto'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
        '504':
          description: Service Unavailable
      summary: Create Report
      tags:
        - Reports
        - beta
        - hidden
info:
  title: LiveBy API Reference
  description: ''
  version: 1.0.0
  contact: {}
  license:
    name: Terms of Use
    url: https://liveby.com/terms/
tags:
  - name: Boundaries
    description: Find and organize boundaries for use with other API endpoints.
  - name: Demographics
    description: Get demographic data for a boundary.
  - name: Lifestyles
    description: <p>Find Lifestyles trend information from Spatial AI for a given area.</p>
  - name: Market Statistics
    description: >-
      <p>LiveBy Real Estate Market Statistics offers detailed statistical
      analysis of real estate markets, spanning from large-scale city data to
      granular neighborhood insights, essential for informed decision-making in
      the real estate sector.</p><p>The following endpoints provide diverse
      filtering capabilities, including date ranges, property types, and
      geographic parameters, ensuring a comprehensive view of market trends and
      activities.</p><p>These APIs allow you to filter by the same parameter
      multiple times. If a parameter is specified multiple times, it is assumed
      you mean to include data that matches either of the values specified.</p>
  - name: Schools
    description: >

      LiveBy Schools API offers detailed information about schools in a
      geographical area.


      There are 3 kinds of school data that can be provided:


      - **Assigned schools** are schools that someone at the residence, or lives
      inside the provided LiveBy boundary could attend. Usually, these are the
      schools that a public bus would service.

      - **Non-assigned public schools** are free public schools that someone
      could attend if they could get transportation for the student to use.
      These are also often called open enroll schools.

      - **Private schools** are schools a student must pay for in order to
      attend. Because private schools do not have attendance boundaries, LiveBy
      returns private schools within a distance to the provided geometry. If
      that geometry is a coordinate, you may control this distance. If the
      geometry is a LiveBy boundary, the distance is controlled by LiveBy.
  - name: Contacts
    description: >-
      LiveBy Contacts API provides endpoints to manage contacts associated with
      a user, including creating, updating, and retrieving contact information.
      Contacts are used in LiveBy to manage information about people that
      receive reports. To add someone to a report, you must first create a
      contact for them.
  - name: Nearby Events
    description: >-
      Get local event information, including event details, venue information,
      and popularity metrics.
  - name: MLS Listings
    description: Get real estate listings and listing details.
  - name: Account
    description: Manage your own LiveBy account, sub-accounts, and API keys.
servers:
  - url: https://api.liveby.com
    description: Production
  - url: https://stage.api.liveby.com
    description: Stage
components:
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
  schemas:
    PaginationDto:
      type: object
      properties:
        pageTotal:
          type: number
        limit:
          type: number
        offset:
          type: number
      required:
        - pageTotal
        - limit
        - offset
    StandardPaginatedResponseDto:
      type: object
      properties:
        success:
          type: boolean
        pagination:
          $ref: '#/components/schemas/PaginationDto'
      required:
        - success
        - pagination
    AddressDto:
      type: object
      properties:
        postcode:
          type: string
        city:
          type: string
        municipality:
          type: string
        village:
          type: string
        district:
          type: string
        subdistrict:
          type: string
        archipelago:
          type: string
        territory:
          type: string
        island:
          type: string
        province:
          type: string
        state:
          type: string
        county:
          type: string
        township:
          type: string
        region:
          type: string
        town:
          type: string
        locality:
          type: string
    LabelLocationDto:
      type: object
      properties:
        type:
          type: string
        coordinates:
          title: Point
          example:
            - -96.662575133
            - 40.79944225
          minItems: 2
          maxItems: 2
          type: array
          items:
            type: number
      required:
        - type
        - coordinates
    BoundingBoxDto:
      type: object
      properties:
        type:
          type: string
        coordinates:
          example:
            - - - -96.672851
                - 40.791635
              - - -96.672851
                - 40.806196
              - - -96.653655
                - 40.806196
              - - -96.653655
                - 40.791635
              - - -96.672851
                - 40.791635
          oneOf:
            - title: Polygon
              type: array
              items:
                type: array
                items:
                  type: array
                  minItems: 2
                  maxItems: 2
                  items:
                    type: number
            - title: LineString
              type: array
              items:
                type: array
                minItems: 2
                maxItems: 2
                items:
                  type: number
            - title: Point
              type: array
              minItems: 2
              maxItems: 2
              items:
                type: number
      required:
        - type
        - coordinates
    GeometryDto:
      type: object
      properties:
        type:
          type: string
        coordinates:
          oneOf:
            - title: MultiPolygon
              type: array
              items:
                type: array
                items:
                  type: array
                  items:
                    type: array
                    minItems: 2
                    maxItems: 2
                    items:
                      type: number
            - title: Polygon
              type: array
              items:
                type: array
                items:
                  type: array
                  minItems: 2
                  maxItems: 2
                  items:
                    type: number
          example:
            - - - - -96.663251
                  - 40.806192
                - - -96.672843
                  - 40.806196
                - - -96.672851
                  - 40.797645
                - - -96.672511
                  - 40.797471
                - - -96.671828
                  - 40.797176
                - - -96.671496
                  - 40.796994
                - - -96.671201
                  - 40.796826
                - - -96.670796
                  - 40.796559
                - - -96.67039
                  - 40.796265
                - - -96.669579
                  - 40.795536
                - - -96.66602
                  - 40.792507
                - - -96.66499
                  - 40.791655
                - - -96.661209
                  - 40.791649
                - - -96.660922
                  - 40.791658
                - - -96.653751
                  - 40.791635
                - - -96.653718
                  - 40.795293
                - - -96.653655
                  - 40.798927
                - - -96.653684
                  - 40.801319
                - - -96.653692
                  - 40.802984
                - - -96.653702
                  - 40.806188
                - - -96.663251
                  - 40.806192
      required:
        - type
        - coordinates
    SearchBoundaryDto:
      type: object
      properties:
        id:
          type: string
          description: The LiveBy Boundary ID.
        address:
          description: >-
            This is a geocoded point near the center of the shape. While the
            query parameters specify area-level-1 as a standard field, this
            address uses the local name for area names E.G. state, county,
            province, village.
          allOf:
            - $ref: '#/components/schemas/AddressDto'
        layer:
          type: string
        private:
          type: object
        status:
          type: string
        osmLevel:
          type: number
          nullable: true
          minimum: 1
          maximum: 11
        name:
          type: string
        virtualLayers:
          type: array
          items:
            type: string
        vectorTileId:
          type: number
        labelLocation:
          $ref: '#/components/schemas/LabelLocationDto'
        boundingBox:
          $ref: '#/components/schemas/BoundingBoxDto'
        geometry:
          description: >-
            The geometry for the boundary. This propertye is only included when
            `includeGeometries` is set to `true` when calling the
            `/v4/boundaries` endpoint. It is always returned when calling the
            `/v4/boundaries/:id` endpoint.
          allOf:
            - $ref: '#/components/schemas/GeometryDto'
        censusId:
          type: string
          nullable: true
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - address
        - layer
        - status
        - osmLevel
        - name
        - virtualLayers
        - vectorTileId
        - labelLocation
        - boundingBox
        - censusId
        - createdAt
        - updatedAt
    AutocompleteBoundaryDto:
      type: object
      properties:
        id:
          type: string
          description: The LiveBy Boundary ID.
        layer:
          type: string
        name:
          type: string
        vectorTileId:
          type: object
          nullable: true
        boundingBox:
          $ref: '#/components/schemas/BoundingBoxDto'
        address:
          $ref: '#/components/schemas/AddressDto'
      required:
        - id
        - layer
        - name
        - vectorTileId
        - boundingBox
        - address
    StandardResponseDto:
      type: object
      properties:
        success:
          type: boolean
      required:
        - success
    AssociatedBoundariesDto:
      type: object
      properties:
        layer:
          type: string
        osmLevel:
          type: number
          nullable: true
          minimum: 1
          maximum: 11
        boundaryId:
          type: string
        name:
          type: string
      required:
        - layer
        - osmLevel
        - boundaryId
        - name
    BoundaryDto:
      type: object
      properties:
        id:
          type: string
          description: The LiveBy Boundary ID.
        address:
          description: >-
            This is a geocoded point near the center of the shape. While the
            query parameters specify area-level-1 as a standard field, this
            address uses the local name for area names E.G. state, county,
            province, village.
          allOf:
            - $ref: '#/components/schemas/AddressDto'
        layer:
          type: string
        private:
          type: object
        status:
          type: string
        osmLevel:
          type: number
          nullable: true
          minimum: 1
          maximum: 11
        name:
          type: string
        virtualLayers:
          type: array
          items:
            type: string
        vectorTileId:
          type: number
        labelLocation:
          $ref: '#/components/schemas/LabelLocationDto'
        boundingBox:
          $ref: '#/components/schemas/BoundingBoxDto'
        geometry:
          description: >-
            The geometry for the boundary. This propertye is only included when
            `includeGeometries` is set to `true` when calling the
            `/v4/boundaries` endpoint. It is always returned when calling the
            `/v4/boundaries/:id` endpoint.
          allOf:
            - $ref: '#/components/schemas/GeometryDto'
        associatedBoundaries:
          type: array
          items:
            $ref: '#/components/schemas/AssociatedBoundariesDto'
        censusId:
          type: string
          nullable: true
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - address
        - layer
        - status
        - osmLevel
        - name
        - virtualLayers
        - vectorTileId
        - labelLocation
        - boundingBox
        - associatedBoundaries
        - censusId
        - createdAt
        - updatedAt
    BoundarySummaryDto:
      type: object
      properties:
        Boundary:
          type: string
          description: The unique identifier for the boundary.
        Description:
          type: object
          description: The description of the boundary.
        Expires At:
          type: object
          description: The expiration date of the description.
        Deleted At:
          type: object
          description: The deletion date of the boundary.
      required:
        - Boundary
        - Description
    RankHistoryDto:
      type: object
      properties:
        year:
          type: number
          description: Year of the school assessment
        rank:
          type: number
          description: >-
            How many other schools had a total score better than this school in
            the school district and of the same school type.
        rankOf:
          type: number
          description: >-
            Total amount of schools in the district that were assessed and of
            the same school type.
        rankStars:
          type: number
          description: The star rating of the school.
          example: 3
          minimum: 0
          maximum: 5
        rankLevel:
          type: string
          description: The level of the school.
      required:
        - year
        - rank
        - rankOf
        - rankStars
        - rankLevel
    SchoolYearlyDetailsDto:
      type: object
      properties:
        year:
          type: number
          description: Year of the school survey
          example: 2019
        numberOfStudents:
          type: number
          description: Number of students in the school
          example: 1000
        percentFreeDiscLunch:
          type: number
          description: Percent of students who receive free/reduced price lunch
          example: 50
        percentOfAfricanAmericanStudents:
          type: number
          description: Percent of students who are African American
        percentOfAsianStudents:
          type: number
          description: Percent of students who are Asian
        percentOfHispanicStudents:
          type: number
          description: Percent of students who are Hispanic
        percentOfIndianStudents:
          type: number
          description: Percent of students who are Indian
        percentOfPacificIslanderStudents:
          type: number
          description: Percent of students who are Pacific Islander
        percentOfWhiteStudents:
          type: number
          description: Percent of students who are White
        percentOfTwoOrMoreRaceStudents:
          type: number
          description: Percent of students who are two or more races
        percentOfUnspecifiedRaceStudents:
          type: number
          description: Percent of students who are of an unspecified race
        teachersFulltime:
          type: number
          description: Number of full time teachers
        pupilTeacherRatio:
          type: number
          description: number of students per full time teacher
        numberOfAfricanAmericanStudents:
          type: number
          description: number of students who are African American
        numberOfAsianStudents:
          type: number
          description: number of students who are Asian
        numberOfHispanicStudents:
          type: number
          description: number of students who are Hispanic
        numberOfIndianStudents:
          type: number
          description: number of students who are Indian
        numberOfPacificIslanderStudents:
          type: number
          description: number of students who are Pacific Islander
        numberOfWhiteStudents:
          type: number
          description: number of students who are White
        numberOfTwoOrMoreRaceStudents:
          type: number
          description: number of students who are two or more races
        numberOfUnspecifiedRaceStudents:
          type: number
          description: number of students who are of an unspecified race
      required:
        - year
        - numberOfStudents
        - percentFreeDiscLunch
        - percentOfAfricanAmericanStudents
        - percentOfAsianStudents
        - percentOfHispanicStudents
        - percentOfIndianStudents
        - percentOfPacificIslanderStudents
        - percentOfWhiteStudents
        - percentOfTwoOrMoreRaceStudents
        - percentOfUnspecifiedRaceStudents
        - teachersFulltime
        - pupilTeacherRatio
        - numberOfAfricanAmericanStudents
        - numberOfAsianStudents
        - numberOfHispanicStudents
        - numberOfIndianStudents
        - numberOfPacificIslanderStudents
        - numberOfWhiteStudents
        - numberOfTwoOrMoreRaceStudents
        - numberOfUnspecifiedRaceStudents
    SchoolDto:
      type: object
      properties:
        schoolId:
          type: string
          description: The national center for educational statistics (NCES) school ID.
        districtId:
          type: string
          description: >-
            The district ID. Schools without districts will be assigned the
            value '99999'.
        districtName:
          type: object
          description: The school's district name.
          nullable: true
        schoolName:
          type: string
          description: The school name.
        schoolType:
          type: string
          description: The type of school.
          example: public
          enum:
            - public
            - private
            - catholic
        phone:
          type: string
          description: The phone number of the school.
        website:
          type: string
          description: The website of the school.
        street:
          type: string
          description: The street address of the school.
        city:
          type: string
          description: The city where the school is located.
        stateOrProvince:
          type: string
          description: The state or province where the school is located.
        postalCode:
          type: string
          description: The postal code of the school.
        country:
          type: string
          description: The country where the school is located.
        addressFull:
          type: string
          description: The full address of the school.
        lowGrade:
          type: string
          description: The lowest grade offered by the school.
        highGrade:
          type: string
          description: The highest grade offered by the school.
        schoolLevel:
          type: string
          description: The level of the school (e.g., Elementary, Middle, High, Private).
          enum:
            - Elementary
            - Middle
            - High
            - Private
          nullable: true
        isCharterSchool:
          type: boolean
          description: Flag to determine if this school is a charter school.
          nullable: true
        isMagnetSchool:
          type: boolean
          description: Flag to determine if this school is a magnet school.
          nullable: true
        isVirtualSchool:
          type: boolean
          description: Flag to determine if this school is a virtual school.
          nullable: true
        isPrivate:
          type: boolean
          description: >-
            Flag to determine if this school is a private school, or a public
            school.
          nullable: true
        isJJFacility:
          type: boolean
          description: >-
            Flag to determine if this school is a long-term secure juvenile
            justice facility.
          nullable: true
        privateSchoolAffiliation:
          type: string
          description: >-
            The organization that this school is affiliated with. This field is
            only available for private schools.
          nullable: true
          enum:
            - Roman Catholic
            - African Methodist Episcopal
            - Amish
            - Assembly of God
            - Baptist
            - Brethren
            - Calvinist
            - Christian (no specific denomination)
            - Church of Christ
            - Church of God
            - Church of God in Christ
            - Church of the Nazarene
            - Disciples of Christ
            - Episcopal
            - Friends
            - Greek Orthodox
            - Islamic
            - Jewish
            - Latter Day Saints
            - Lutheran Church - Missouri Synod
            - Evangelical Lutheran Church in America
            - Wisconsin Evangelical Lutheran Synod
            - Other Lutheran
            - Mennonite
            - Methodist
            - Pentecostal
            - Presbyterian
            - Seventh-Day Adventist
            - Other
            - Nonsectarian
        rankHistory:
          description: >-
            School rating based on standardized test assessments. This is a
            historical list of school ratings. For the most recent rating, use
            the first value from the array.
          type: array
          items:
            $ref: '#/components/schemas/RankHistoryDto'
        schoolYearlyDetails:
          description: >-
            Details about the school that change per year, including school
            attendance, and staffing. This is a historical list of school
            details. For the most recent detail, use the first value from the
            array.
          type: array
          items:
            $ref: '#/components/schemas/SchoolYearlyDetailsDto'
        giftedAndTalented:
          type: boolean
          nullable: true
          description: >-
            Gifted and talented programs are programs during regular school
            hours that provide special educational    opportunities including
            accelerated promotion through grades and classes and an enriched
            curriculum for students    who give evidence of high achievement
            capability in areas such as intellectual, creative, artistic, or
            leadership    capacity, or in specific academic fields.
        dualEnrollment:
          type: boolean
          nullable: true
          description: >-
            Dual enrollment/dual credit programs provide opportunities for high
            school students to take college-level courses offered by colleges,
            and earn concurrent credit toward a high school diploma and a
            college degree while still in high school. These programs are for
            high school-enrolled students who are academically prepared to
            enroll in college and are interested in taking on additional
            coursework. For example, students who want to study subjects not
            offered at their high school may seek supplemental education at
            colleges nearby. Dual enrollment/dual credit programs do not include
            the Advanced Placement (AP) program or the International
            Baccalaureate Diploma Programme. 
        creditRecovery:
          type: boolean
          nullable: true
          description: >-
            Credit recovery programs (including courses or other instruction)
            aim to help more students graduate by giving students who have
            fallen behind the chance to “recover” credits through a multitude of
            different strategies, including online. Different programs allow
            students to work on their credit recovery classes over the summer,
            on school breaks, after school, on weekends, at home on their own,
            at night in school computer labs, or even during the school day. 
        singleSexClasses:
          type: boolean
          nullable: true
          description: >-
            Single-sex academic class refers to an academic class in a
            co-educational school that excludes boys or girls from enrolling or
            otherwise participating in that class because of their sex. A class
            is not considered single-sex so long as it does not exclude boys or
            girls, even if students of only one sex, or a disproportionate
            number of students of one sex, enroll. 
        apCourse:
          type: boolean
          nullable: true
          description: >-
            Advanced Placement (AP) refers to a program, sponsored by the
            College Board, through which students may earn college credit and
            advanced college placement by successfully completing AP courses and
            standardized AP exams. 
        internationalBaccalaureate:
          type: boolean
          nullable: true
          description: >-
            International Baccalaureate (IB) Diploma Programme, sponsored by the
            International Baccalaureate Organization, is designed as an
            academically challenging and balanced program of education with
            final examinations that prepares students, usually aged 16 to 19,
            for success at university and life beyond. The Programme is
            typically taught over two years. IB Diploma Programme students study
            six courses at higher level or standard level. Students must choose
            one subject from each of groups 1 to 5, thus ensuring breadth of
            experience in languages, social studies, the experimental sciences
            and mathematics. The sixth subject may be an arts subject chosen
            from group 6, or the student may choose another subject from groups
            1 to 5. Additionally, IB Diploma Programme students must meet three
            core requirements: the extended essay, the theory of knowledge
            course, and a creativity/action/service experience.
        corporalPunishment:
          type: boolean
          nullable: true
          description: >-
            Corporal punishment refers to paddling, spanking, or other forms of
            physical punishment imposed on a child.
        interscholarAthletics:
          type: boolean
          nullable: true
          description: >-
            Interscholastic athletics refers to team-based organized sports
            activities that offer competition between schools. 
        offersKindergarten:
          type: boolean
          nullable: true
          description: Flag to indicate if this school offers Kindergarten.
        offersFullDayKindergarten:
          type: boolean
          nullable: true
          description: Flag to indicate if this school offers Full Day Kindergarten.
        apEnrollment:
          type: boolean
          nullable: true
          description: Amount of students enrolled in AP courses.
        expenditurePerStudent:
          type: boolean
          nullable: true
          description: Amount of dollars spent per student each year.
        isTitleISchool:
          type: boolean
          nullable: true
          description: Flag to indicate if this school offers Title I services.
        isTitleISchoolwideSchool:
          type: boolean
          nullable: true
          description: >-
            Flag to indicate if this school is a exclusively providesd Title I
            services.
        privateHours:
          type: number
          nullable: true
          description: >-
            Amount of hours a day the school is open. Only available for private
            schools.
        privateDays:
          type: number
          nullable: true
          description: >-
            Amount of days a each year the school is open. Only available for
            private schools.
        privateHasLibrary:
          type: boolean
          nullable: true
          description: >-
            Flag to indicate if this school has a private library. Only
            available for private schools.
        privateCoed:
          type: string
          description: >-
            Flag to determine if the school is coed or seperated by gender. Only
            available for private schools.
          enum:
            - Coed
            - Male
            - Female
          nullable: true
        latitude:
          type: number
          nullable: false
          description: The latitude location of the school.
        longitude:
          type: number
          nullable: false
          description: The longitude location of the school.
        hasBoundary:
          type: boolean
          description: Flag to determine if the school has an attendance boundary.
        distance:
          type: number
          description: >
            Distance to the school location in meters. If the geometry is a
            LiveBy boundary, it is distance to the edge of the boundary, or 0 if
            the school is inside the boundary.
        isAssigned:
          type: boolean
          description: >
            Flag for if this school is the assigned school for current geometry.
            Many public schools allow attendance regardless of where the student
            lives, however will not provide bus services, or accommodations for
            those living outside the designated school attendance area. This
            flag is used to determine if the school district desginated the
            school to provide services to this location or not.
      required:
        - schoolId
        - districtId
        - districtName
        - schoolName
        - schoolType
        - phone
        - website
        - street
        - city
        - stateOrProvince
        - postalCode
        - country
        - addressFull
        - lowGrade
        - highGrade
        - schoolLevel
        - isCharterSchool
        - isMagnetSchool
        - isVirtualSchool
        - isPrivate
        - isJJFacility
        - privateSchoolAffiliation
        - rankHistory
        - schoolYearlyDetails
        - giftedAndTalented
        - dualEnrollment
        - creditRecovery
        - singleSexClasses
        - apCourse
        - internationalBaccalaureate
        - corporalPunishment
        - interscholarAthletics
        - offersKindergarten
        - offersFullDayKindergarten
        - apEnrollment
        - expenditurePerStudent
        - isTitleISchool
        - isTitleISchoolwideSchool
        - privateHours
        - privateDays
        - privateHasLibrary
        - privateCoed
        - latitude
        - longitude
        - hasBoundary
        - distance
        - isAssigned
    Metadata:
      type: object
      properties:
        attribution:
          type: string
          description: Attribution to the source of the demographics data.
        source:
          type: string
          description: Source country of the demographics data.
          enum:
            - CA
            - US
        boundaryId:
          type: string
          description: The boundary ID for the demographics data.
        layer:
          type: string
          description: >-
            The layer type of the boundary (e.g., area-level-1, area-level-2,
            neighborhood).
        associatedBoundaryId:
          type: string
          description: >-
            The original boundary ID that this demographic data is associated
            with. Only present when demographics are for an associated boundary.
      required:
        - attribution
        - source
        - boundaryId
        - layer
    MaritalStatus:
      type: object
      properties:
        married:
          type: number
          description: Count of married individuals.
        single:
          type: number
          description: Count of single individuals.
        separated:
          type: number
          description: Count of separated individuals.
        widowed:
          type: number
          description: Count of widowed individuals.
        divorced:
          type: number
          description: Count of divorced individuals.
      required:
        - married
        - single
        - separated
        - widowed
        - divorced
    Rent:
      type: object
      properties:
        under499:
          type: number
          description: Count of individuals with monthly rent payments under $499.
          nullable: true
        between500To749:
          type: number
          description: >-
            Count of individuals with monthly rent payments between $500 and
            $749.
        between750To999:
          type: number
          description: >-
            Count of individuals with monthly rent payments between $750 and
            $999.
        over999:
          type: number
          description: >-
            Count of individuals with monthly rent payments over $999 ($1000 or
            more).
      required:
        - under499
        - between500To749
        - between750To999
        - over999
    Occupancy:
      type: object
      properties:
        vacant:
          type: number
          description: Count of vacant units.
        unitOccupiedOwner:
          type: number
          description: Count of units occupied by owners.
        unitOccupiedRenter:
          type: number
          description: Count of units occupied by renters.
        absenteeOwner:
          type: number
          description: Count of units with absentee owners.
          nullable: true
      required:
        - vacant
        - unitOccupiedOwner
        - unitOccupiedRenter
        - absenteeOwner
    HomeValue:
      type: object
      properties:
        below100000:
          type: number
          description: Count of homes with value below $100,000.
          nullable: true
        between100000To150000:
          type: number
          description: Count of homes with value between $100,000 and $150,000.
          nullable: true
        between150000To200000:
          type: number
          description: Count of homes with value between $150,000 and $200,000.
          nullable: true
        between200000To300000:
          type: number
          description: Count of homes with value between $200,000 and $300,000.
          nullable: true
        between300000To500000:
          type: number
          description: Count of homes with value between $300,000 and $500,000.
          nullable: true
        above500000:
          type: number
          description: Count of homes with value above $500,000.
          nullable: true
      required:
        - below100000
        - between100000To150000
        - between150000To200000
        - between200000To300000
        - between300000To500000
        - above500000
    CommuteTime:
      type: object
      properties:
        under15Minutes:
          type: number
          description: Commute time under 15 minutes
          nullable: true
        between15To29Minutes:
          type: number
          description: Commute time between 15 to 29 minutes
          nullable: true
        between30To59Minutes:
          type: number
          description: Commute time between 30 to 59 minutes
          nullable: true
        over60Minutes:
          type: number
          description: Commute time over 60 minutes
          nullable: true
      required:
        - under15Minutes
        - between15To29Minutes
        - between30To59Minutes
        - over60Minutes
    Enrollment:
      type: object
      properties:
        publicPrePrimarySchool:
          type: number
          description: Count of individuals attending public pre-primary school.
          nullable: true
        privatePrePrimarySchool:
          type: number
          description: Count of individuals attending private pre-primary school.
          nullable: true
        publicCollege:
          type: number
          description: Count of individuals attending public college.
          nullable: true
        privateCollege:
          type: number
          description: Count of individuals attending private college.
          nullable: true
        publicSchool:
          type: number
          description: Count of individuals attending public school.
          nullable: true
        privateSchool:
          type: number
          description: Count of individuals attending private school.
          nullable: true
        none:
          type: number
          description: Count of individuals not attending any educational institution.
          nullable: true
      required:
        - publicPrePrimarySchool
        - privatePrePrimarySchool
        - publicCollege
        - privateCollege
        - publicSchool
        - privateSchool
        - none
    Education:
      type: object
      properties:
        noDegree:
          type: number
          description: Count of individuals with no degree.
        highSchool:
          type: number
          description: Count of individuals with a high school degree.
        collegeBelowBachelor:
          type: number
          description: >-
            Count of individuals with some college education but no bachelor's
            degree.
        bachelor:
          type: number
          description: Count of individuals with a bachelor's degree.
        master:
          type: number
          description: Count of individuals with a master's degree.
        doctorate:
          type: number
          description: Count of individuals with a doctorate degree.
      required:
        - noDegree
        - highSchool
        - collegeBelowBachelor
        - bachelor
        - master
        - doctorate
    MedianMortgagePayment:
      type: object
      properties:
        under500:
          type: number
          description: Count of individuals with a mortgage payment under $500.
          nullable: true
        between500To1000:
          type: number
          description: Count of individuals with a mortgage payment between $500 and $1000.
          nullable: true
        between1000To2000:
          type: number
          description: >-
            Count of individuals with a mortgage payment between $1000 and
            $2000.
          nullable: true
        between2000To3000:
          type: number
          description: >-
            Count of individuals with a mortgage payment between $2000 and
            $3000.
          nullable: true
        between3000To4000:
          type: number
          description: >-
            Count of individuals with a mortgage payment between $3000 and
            $4000.
          nullable: true
        over4000:
          type: number
          description: Count of individuals with a mortgage payment over $4000.
          nullable: true
      required:
        - under500
        - between500To1000
        - between1000To2000
        - between2000To3000
        - between3000To4000
        - over4000
    Rooms:
      type: object
      properties:
        studio:
          type: number
          description: Count of studio units.
        oneBedroom:
          type: number
          description: Count of one-bedroom units.
        twoBedrooms:
          type: number
          description: Count of two-bedroom units.
        threeBedrooms:
          type: number
          description: Count of three-bedroom units.
        fourBedroomsOrMore:
          type: number
          description: Count of four-bedroom or more units.
      required:
        - studio
        - oneBedroom
        - twoBedrooms
        - threeBedrooms
        - fourBedroomsOrMore
    TransportationMode:
      type: object
      properties:
        bicycle:
          type: number
          description: Number of people that commute by bike.
        carAlone:
          type: number
          description: Number people that drive alone.
        carCarpool:
          type: number
          description: Number of people that carpool.
        carDriver:
          type: number
          description: Number of people that are drivers.
        carSelf:
          type: number
          description: Number of people that drive themselves.
          nullable: true
        other:
          type: number
          description: Number of people that use other means of transportation for commute.
        publicTransit:
          type: number
          description: Number of people that commute by public transit.
        walked:
          type: number
          description: Number of people that walk.
      required:
        - bicycle
        - carAlone
        - carCarpool
        - carDriver
        - carSelf
        - other
        - publicTransit
        - walked
    Occupation:
      type: object
      properties:
        agriculture:
          type: number
          description: Number of people in the agriculture occupation.
        appliedScience:
          type: number
          description: Number of people in the applied science occupation.
        artCultureSport:
          type: number
          description: Number of people in the art, culture, and sport occupation.
        businessFinanceAdmin:
          type: number
          description: >-
            Number of people in the business, finance, and administration
            occupation.
        educationLawSocialGovernment:
          type: number
          description: >-
            Number of people in the education, law, social, and government
            services occupation.
        management:
          type: number
          description: Number of people in the management occupation.
        manufacturing:
          type: number
          description: Number of people in the manufacturing occupation.
        notApplicable:
          type: number
          description: Number of people where occupation is not applicable.
        sales:
          type: number
          description: Number of people in the sales occupation.
        trades:
          type: number
          description: Number of people in the trades occupation.
      required:
        - agriculture
        - appliedScience
        - artCultureSport
        - businessFinanceAdmin
        - educationLawSocialGovernment
        - management
        - manufacturing
        - notApplicable
        - sales
        - trades
    JobSector:
      type: object
      properties:
        governmentWorker:
          type: number
          description: Count of government workers.
        notForProfitWorker:
          type: number
          description: Count of not-for-profit workers.
        privateWorker:
          type: number
          description: Count of private workers.
          nullable: true
        selfEmployedWorker:
          type: number
          description: Count of self-employed workers.
          nullable: true
        unpaidFamilyWorker:
          type: number
          description: Count of unpaid family workers.
          nullable: true
      required:
        - governmentWorker
        - notForProfitWorker
        - privateWorker
        - selfEmployedWorker
        - unpaidFamilyWorker
    JobType:
      type: object
      properties:
        blueCollar:
          type: number
          description: Count of individuals in blue-collar jobs.
        whiteCollar:
          type: number
          description: Count of individuals in white-collar jobs.
      required:
        - blueCollar
        - whiteCollar
    YearBuiltForCanada:
      type: object
      properties:
        before1961:
          type: number
          description: Number of units built before 1961.
        between1961To1980:
          type: number
          description: Number of units built between 1961 and 1980.
        between1981To1990:
          type: number
          description: Number of units built between 1981 and 1990.
        between1991To2000:
          type: number
          description: Number of units built between 1991 and 2000.
        between2001To2005:
          type: number
          description: Number of units built between 2001 and 2005.
        between2006To2010:
          type: number
          description: Number of units built between 2006 and 2010.
        between2011To2015:
          type: number
          description: Number of units built between 2011 and 2015.
        between2016To2021:
          type: number
          description: Number of units built between 2016 and 2021.
      required:
        - before1961
        - between1961To1980
        - between1981To1990
        - between1991To2000
        - between2001To2005
        - between2006To2010
        - between2011To2015
        - between2016To2021
    IncomeByLevel:
      type: object
      properties:
        between0To25000:
          type: number
          description: Number of people with income between $0 and $25,000
        between25000To35000:
          type: number
          description: Number of people with income between $25,000 and $35,000
        between35000To50000:
          type: number
          description: Number of people with income between $35,000 and $50,000
        between50000To75000:
          type: number
          description: Number of people with income between $50,000 and $75,000
        between75000To100000:
          type: number
          description: Number of people with income between $75,000 and $100,000
        over100000:
          type: number
          description: Number of people with income over $100,000
      required:
        - between0To25000
        - between25000To35000
        - between35000To50000
        - between50000To75000
        - between75000To100000
        - over100000
    IncomeByCohortForCanada:
      type: object
      properties:
        between0To10k:
          type: number
          description: Number of people with income between $0 and $10,000
        between10kTo15k:
          type: number
          description: Number of people with income between $10,000 and $15,000
        between15kTo20k:
          type: number
          description: Number of people with income between $15,000 and $20,000
        between20kTo25k:
          type: number
          description: Number of people with income between $20,000 and $25,000
        between25kTo30k:
          type: number
          description: Number of people with income between $25,000 and $30,000
        between30kTo35k:
          type: number
          description: Number of people with income between $30,000 and $35,000
        between35kTo40k:
          type: number
          description: Number of people with income between $35,000 and $40,000
        between40kTo45k:
          type: number
          description: Number of people with income between $40,000 and $45,000
        between45kTo50k:
          type: number
          description: Number of people with income between $45,000 and $50,000
        between50kTo60k:
          type: number
          description: Number of people with income between $50,000 and $60,000
        between60kTo70k:
          type: number
          description: Number of people with income between $60,000 and $70,000
        between70kTo100k:
          type: number
          description: Number of people with income between $70,000 and $100,000
        between100kTo125k:
          type: number
          description: Number of people with income between $100,000 and $125,000
        between125kTo15k:
          type: number
          description: Number of people with income between $125,000 and $150,000
        between150kTo200k:
          type: number
          description: Number of people with income between $150,000 and $200,000
        over200k:
          type: number
          description: Number of people with income over $200,000
      required:
        - between0To10k
        - between10kTo15k
        - between15kTo20k
        - between20kTo25k
        - between25kTo30k
        - between30kTo35k
        - between35kTo40k
        - between40kTo45k
        - between45kTo50k
        - between50kTo60k
        - between60kTo70k
        - between70kTo100k
        - between100kTo125k
        - between125kTo15k
        - between150kTo200k
        - over200k
    IncomeForCanada:
      type: object
      properties:
        byLevel:
          description: Income distribution by income level for the given boundary
          allOf:
            - $ref: '#/components/schemas/IncomeByLevel'
        byCohort:
          description: Income distribution by cohort for the given boundary.
          allOf:
            - $ref: '#/components/schemas/IncomeByCohortForCanada'
      required:
        - byLevel
        - byCohort
    StructureType:
      type: object
      properties:
        apartment:
          type: number
          description: Count of apartment units.
        detachedHouse:
          type: number
          description: Count of detached house units.
        duplexApartment:
          type: number
          description: Count of duplex apartment units.
        highRise:
          type: number
          description: Count of high-rise units.
        mobile:
          type: number
          description: Count of mobile units.
        other:
          type: number
          description: Count of other units.
        semiDetachedHouse:
          type: number
          description: Count of semi-detached house units.
        townhouse:
          type: number
          description: Count of townhouse units.
        total:
          type: number
          description: Total count of all units.
      required:
        - apartment
        - detachedHouse
        - duplexApartment
        - highRise
        - mobile
        - other
        - semiDetachedHouse
        - townhouse
        - total
    AgeByLifeStageForCanada:
      type: object
      properties:
        between0To9:
          type: number
          description: Count of individuals between 0 to 9 years old.
        between10To19:
          type: number
          description: Count of individuals between 10 to 19 years old.
        between20To24:
          type: number
          description: Count of individuals between 20 to 24 years old.
        between25To64:
          type: number
          description: Count of individuals between 25 to 64 years old.
        between65To74:
          type: number
          description: Count of individuals between 65 to 74 years old.
        between75AndOver:
          type: number
          description: Count of individuals 75 years old and over.
      required:
        - between0To9
        - between10To19
        - between20To24
        - between25To64
        - between65To74
        - between75AndOver
    AgeByCohort:
      type: object
      properties:
        between0To4:
          type: number
          description: Count of individuals between 0 to 4 years old.
        between5To9:
          type: number
          description: Count of individuals between 5 to 9 years old.
        between10To14:
          type: number
          description: Count of individuals between 10 to 14 years old.
        between15To19:
          type: number
          description: Count of individuals between 15 to 19 years old.
        between25To29:
          type: number
          description: Count of individuals between 25 to 29 years old.
        between30To34:
          type: number
          description: Count of individuals between 30 to 34 years old.
        between35To39:
          type: number
          description: Count of individuals between 35 to 39 years old.
        between40To44:
          type: number
          description: Count of individuals between 40 to 44 years old.
        between45To49:
          type: number
          description: Count of individuals between 45 to 49 years old.
        between50To54:
          type: number
          description: Count of individuals between 50 to 54 years old.
        between55To59:
          type: number
          description: Count of individuals between 55 to 59 years old.
        between60To64:
          type: number
          description: Count of individuals between 60 to 64 years old.
        between65To69:
          type: number
          description: Count of individuals between 65 to 69 years old.
        between70To74:
          type: number
          description: Count of individuals between 70 to 74 years old.
        between75To79:
          type: number
          description: Count of individuals between 75 to 79 years old.
        between80To84:
          type: number
          description: Count of individuals between 80 to 84 years old.
        between85AndOver:
          type: number
          description: Count of individuals 85 years old and over.
      required:
        - between0To4
        - between5To9
        - between10To14
        - between15To19
        - between25To29
        - between30To34
        - between35To39
        - between40To44
        - between45To49
        - between50To54
        - between55To59
        - between60To64
        - between65To69
        - between70To74
        - between75To79
        - between80To84
        - between85AndOver
    AgeForCanada:
      type: object
      properties:
        byLifeStage:
          description: >-
            Age distribution by life stage (children, adolescents & teens, young
            adults, adults, etc.) for the given boundary.
          allOf:
            - $ref: '#/components/schemas/AgeByLifeStageForCanada'
        byCohort:
          description: >-
            Age distribution by cohort (0-4, 5-9, 10-14, etc.) for the given
            boundary.
          allOf:
            - $ref: '#/components/schemas/AgeByCohort'
        total:
          type: number
          description: Total count of individuals.
      required:
        - byLifeStage
        - byCohort
        - total
    DemographicsForCanada:
      type: object
      properties:
        confidence:
          type: number
          description: >

            Score of LiveBy's confidence in the accuracy of the statistics
            produced. This is a percentage from 0 to 100, with 100 being the
            highest confidence.
        metadata:
          $ref: '#/components/schemas/Metadata'
        population:
          type: number
          description: Number of people in the boundary provided.
        populationDensity:
          type: number
          description: >-
            Average number of people in given unit of space for the boundary.
            Unit defined by `populationDensityUnit`.
        populationDensityUnit:
          type: string
          description: Unit used to describe populationDensity
        privateHouseholds:
          type: number
          description: Number of households in the boundary provided.
        averageHouseholdSize:
          type: number
          description: Average number of people per household.
        medianAge:
          type: number
          description: The median age of people in the given boundary.
        medianIncome:
          type: number
          description: Median household income for the given boundary.
        educationClimateIndex:
          type: number
          description: >
            A measurement of how students, staff, and parents perceive the
            quality, character, and health of the learning environments within
            boundary.
          nullable: true
        averageTravelTime:
          type: number
          description: |
            Average travel time in minutes.
          nullable: true
        householdsWithChildren:
          type: number
          description: Number of households with children in the boundary provided.
        averageRooms:
          type: number
          description: Average number of rooms in dwelling.
        medianMortgageMonthlyCost:
          type: number
          description: Median monthly mortgage payment.
        medianRentMonthlyCost:
          type: number
          description: Median monthly rent payment.
        medianHouseValue:
          type: number
          description: Median home value.
        countMarried:
          type: number
          description: Count of married individuals.
        countUnmarried:
          type: number
          description: Count of unmarried individuals.
        percentMale:
          type: number
          description: Percentage of male individuals. From 0 to 100.
          nullable: true
        percentFemale:
          type: number
          description: Percentage of female individuals. From 0 to 100.
          nullable: true
        maritalStatus:
          $ref: '#/components/schemas/MaritalStatus'
        rent:
          $ref: '#/components/schemas/Rent'
        occupancy:
          $ref: '#/components/schemas/Occupancy'
        homeValue:
          $ref: '#/components/schemas/HomeValue'
        commuteTime:
          $ref: '#/components/schemas/CommuteTime'
        enrollment:
          $ref: '#/components/schemas/Enrollment'
        education:
          $ref: '#/components/schemas/Education'
        medianMortgagePayment:
          $ref: '#/components/schemas/MedianMortgagePayment'
        rooms:
          $ref: '#/components/schemas/Rooms'
        transportationMode:
          $ref: '#/components/schemas/TransportationMode'
        occupation:
          $ref: '#/components/schemas/Occupation'
        jobSector:
          $ref: '#/components/schemas/JobSector'
        jobType:
          $ref: '#/components/schemas/JobType'
        averageIncome:
          type: number
          description: Average income per household for the given boundary.
        yearBuilt:
          $ref: '#/components/schemas/YearBuiltForCanada'
        income:
          $ref: '#/components/schemas/IncomeForCanada'
        structureType:
          $ref: '#/components/schemas/StructureType'
        age:
          $ref: '#/components/schemas/AgeForCanada'
      required:
        - confidence
        - metadata
        - population
        - populationDensity
        - populationDensityUnit
        - privateHouseholds
        - averageHouseholdSize
        - medianAge
        - medianIncome
        - educationClimateIndex
        - averageTravelTime
        - householdsWithChildren
        - averageRooms
        - medianMortgageMonthlyCost
        - medianRentMonthlyCost
        - medianHouseValue
        - countMarried
        - countUnmarried
        - percentMale
        - percentFemale
        - maritalStatus
        - rent
        - occupancy
        - homeValue
        - commuteTime
        - enrollment
        - education
        - medianMortgagePayment
        - rooms
        - transportationMode
        - occupation
        - jobSector
        - jobType
        - averageIncome
        - yearBuilt
        - income
        - structureType
        - age
    YearBuiltForUnitedStates:
      type: object
      properties:
        before1970:
          type: number
          description: Count of units built before 1970.
        between1970To1979:
          type: number
          description: Count of units built between 1970 and 1979.
        between1980To1989:
          type: number
          description: Count of units built between 1980 and 1989.
        between1990To1999:
          type: number
          description: Count of units built between 1990 and 1999.
        between2000To2009:
          type: number
          description: Count of units built between 2000 and 2009.
        between2010To2019:
          type: number
          description: Count of units built between 2010 and 2019.
        after2019:
          type: number
          description: Count of units built after 2019.
      required:
        - before1970
        - between1970To1979
        - between1980To1989
        - between1990To1999
        - between2000To2009
        - between2010To2019
        - after2019
    IncomeByCohortForUnitedStates:
      type: object
      properties:
        between0To10k:
          type: number
          description: Number of people with income between $0 and $10,000
        between10kTo15k:
          type: number
          description: Number of people with income between $10,000 and $15,000
        between15kTo20k:
          type: number
          description: Number of people with income between $15,000 and $20,000
        between20kTo25k:
          type: number
          description: Number of people with income between $20,000 and $25,000
        between25kTo30k:
          type: number
          description: Number of people with income between $25,000 and $30,000
        between30kTo35k:
          type: number
          description: Number of people with income between $30,000 and $35,000
        between35kTo40k:
          type: number
          description: Number of people with income between $35,000 and $40,000
        between40kTo45k:
          type: number
          description: Number of people with income between $40,000 and $45,000
        between45kTo50k:
          type: number
          description: Number of people with income between $45,000 and $50,000
        between50kTo60k:
          type: number
          description: Number of people with income between $50,000 and $60,000
        between60kTo75k:
          type: number
          description: Number of people with income between $60,000 and $75,000
        between75kTo100k:
          type: number
          description: Number of people with income between $60,000 and $75,000
        between100kTo125k:
          type: number
          description: Number of people with income between $100,000 and $125,000
        between125kTo15k:
          type: number
          description: Number of people with income between $125,000 and $150,000
        between150kTo200k:
          type: number
          description: Number of people with income between $150,000 and $200,000
        over200k:
          type: number
          description: Number of people with income over $200,000
      required:
        - between0To10k
        - between10kTo15k
        - between15kTo20k
        - between20kTo25k
        - between25kTo30k
        - between30kTo35k
        - between35kTo40k
        - between40kTo45k
        - between45kTo50k
        - between50kTo60k
        - between60kTo75k
        - between75kTo100k
        - between100kTo125k
        - between125kTo15k
        - between150kTo200k
        - over200k
    IncomeForUnitedStates:
      type: object
      properties:
        byLevel:
          description: Income distribution by income level for the given boundary
          allOf:
            - $ref: '#/components/schemas/IncomeByLevel'
        byCohort:
          description: Income distribution by cohort for the given boundary.
          allOf:
            - $ref: '#/components/schemas/IncomeByCohortForUnitedStates'
      required:
        - byLevel
        - byCohort
    AgeByLifeStageForUnitedStates:
      type: object
      properties:
        between0To9:
          type: number
          description: Count of individuals between 0 to 9 years old.
        between10To17:
          type: number
          description: Count of individuals between 10 to 17 years old.
        between18To24:
          type: number
          description: Count of individuals between 18 to 24 years old.
        between25To64:
          type: number
          description: Count of individuals between 25 to 64 years old.
        between65To74:
          type: number
          description: Count of individuals between 65 to 74 years old.
        between75AndOver:
          type: number
          description: Count of individuals 75 years old and over.
      required:
        - between0To9
        - between10To17
        - between18To24
        - between25To64
        - between65To74
        - between75AndOver
    AgeForUnitedStates:
      type: object
      properties:
        byLifeStage:
          description: >-
            Age distribution by life stage (children, adolescents & teens, young
            adults, adults, etc.) for the given boundary.
          allOf:
            - $ref: '#/components/schemas/AgeByLifeStageForUnitedStates'
        byCohort:
          description: >-
            Age distribution by cohort (0-4, 5-9, 10-14, etc.) for the given
            boundary.
          allOf:
            - $ref: '#/components/schemas/AgeByCohort'
      required:
        - byLifeStage
        - byCohort
    DemographicsForUnitedStates:
      type: object
      properties:
        confidence:
          type: number
          description: >

            Score of LiveBy's confidence in the accuracy of the statistics
            produced. This is a percentage from 0 to 100, with 100 being the
            highest confidence.
        metadata:
          $ref: '#/components/schemas/Metadata'
        population:
          type: number
          description: Number of people in the boundary provided.
        populationDensity:
          type: number
          description: >-
            Average number of people in given unit of space for the boundary.
            Unit defined by `populationDensityUnit`.
        populationDensityUnit:
          type: string
          description: Unit used to describe populationDensity
        privateHouseholds:
          type: number
          description: Number of households in the boundary provided.
        averageHouseholdSize:
          type: number
          description: Average number of people per household.
        medianAge:
          type: number
          description: The median age of people in the given boundary.
        medianIncome:
          type: number
          description: Median household income for the given boundary.
        educationClimateIndex:
          type: number
          description: >
            A measurement of how students, staff, and parents perceive the
            quality, character, and health of the learning environments within
            boundary.
          nullable: true
        averageTravelTime:
          type: number
          description: |
            Average travel time in minutes.
          nullable: true
        householdsWithChildren:
          type: number
          description: Number of households with children in the boundary provided.
        averageRooms:
          type: number
          description: Average number of rooms in dwelling.
        medianMortgageMonthlyCost:
          type: number
          description: Median monthly mortgage payment.
        medianRentMonthlyCost:
          type: number
          description: Median monthly rent payment.
        medianHouseValue:
          type: number
          description: Median home value.
        countMarried:
          type: number
          description: Count of married individuals.
        countUnmarried:
          type: number
          description: Count of unmarried individuals.
        percentMale:
          type: number
          description: Percentage of male individuals. From 0 to 100.
          nullable: true
        percentFemale:
          type: number
          description: Percentage of female individuals. From 0 to 100.
          nullable: true
        maritalStatus:
          $ref: '#/components/schemas/MaritalStatus'
        rent:
          $ref: '#/components/schemas/Rent'
        occupancy:
          $ref: '#/components/schemas/Occupancy'
        homeValue:
          $ref: '#/components/schemas/HomeValue'
        commuteTime:
          $ref: '#/components/schemas/CommuteTime'
        enrollment:
          $ref: '#/components/schemas/Enrollment'
        education:
          $ref: '#/components/schemas/Education'
        medianMortgagePayment:
          $ref: '#/components/schemas/MedianMortgagePayment'
        rooms:
          $ref: '#/components/schemas/Rooms'
        transportationMode:
          $ref: '#/components/schemas/TransportationMode'
        occupation:
          $ref: '#/components/schemas/Occupation'
        jobSector:
          $ref: '#/components/schemas/JobSector'
        jobType:
          $ref: '#/components/schemas/JobType'
        annualResidentialTurnover:
          type: number
          description: >
            Number of households that change occupiers per year in the boundary
            provided.
        yearBuilt:
          $ref: '#/components/schemas/YearBuiltForUnitedStates'
        income:
          $ref: '#/components/schemas/IncomeForUnitedStates'
        age:
          $ref: '#/components/schemas/AgeForUnitedStates'
      required:
        - confidence
        - metadata
        - population
        - populationDensity
        - populationDensityUnit
        - privateHouseholds
        - averageHouseholdSize
        - medianAge
        - medianIncome
        - educationClimateIndex
        - averageTravelTime
        - householdsWithChildren
        - averageRooms
        - medianMortgageMonthlyCost
        - medianRentMonthlyCost
        - medianHouseValue
        - countMarried
        - countUnmarried
        - percentMale
        - percentFemale
        - maritalStatus
        - rent
        - occupancy
        - homeValue
        - commuteTime
        - enrollment
        - education
        - medianMortgagePayment
        - rooms
        - transportationMode
        - occupation
        - jobSector
        - jobType
        - yearBuilt
        - income
        - age
    FindDemographicsResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/DemographicsForUnitedStates'
              - $ref: '#/components/schemas/DemographicsForCanada'
      required:
        - success
        - data
    Lifestyle Behavior:
      type: object
      properties:
        spatialAiId:
          type: string
          description: The id given for this lifestyle by Spatial AI.
        lifestyle:
          type: string
          description: >-
            The lifestyle behavior being measured. Measurements are based on
            where behaviors occurs, not where people live.
        slug:
          type: string
          description: >-
            An easier to read id to be used when excluding lifestyle behaviors
            from the results.
        category:
          type: string
          description: The category the lifestyle behavior belongs to.
        percentileVsNation:
          type: string
          description: >-
            A score representing percentile vs. the nation. A "Bookish" score of
            80 means this area scored higher than 80% of the nation.
        image:
          type: string
          description: A visual representation of the lifestyle behavior.
        description:
          type: string
          description: A description of the lifestyle behavior being measured.
      required:
        - spatialAiId
        - lifestyle
        - slug
        - category
        - percentileVsNation
        - image
        - description
    LifestylesResponseDto:
      type: object
      properties:
        boundaryId:
          description: The boundary id or ids used to aggregate lifestyle behavioral data.
          type: array
          items:
            type: string
        data:
          description: >-
            Array of lifestyle behaviors. There are 72 lifestyle behaviors that
            are measured.
          type: array
          items:
            $ref: '#/components/schemas/Lifestyle Behavior'
      required:
        - boundaryId
        - data
    EventsListResponseDtoEvent:
      type: object
      properties:
        id:
          type: string
          description: Unique event identifier (UUID)
        name:
          type: string
          description: Name of the event
          nullable: true
        description:
          type: string
          description: Full description of the event
          nullable: true
        type:
          type: string
          enum:
            - class_workshop
            - competition
            - concert
            - convention_expo
            - festival
            - museum_exhibit
            - parade
            - performance_show
            - shopping
            - social
            - tour
            - null
          description: >-
            Type of event. One of: class_workshop, competition, concert,
            convention_expo, festival, museum_exhibit, parade, performance_show,
            shopping, social, tour
          nullable: true
        startDate:
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Event start date (YYYY-MM-DD)
          nullable: true
        endDate:
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Event end date (YYYY-MM-DD)
          nullable: true
        datesArray:
          type: array
          items:
            type: string
          description: List of event dates (YYYY-MM-DD)
          nullable: true
        datesTimes:
          type: array
          items:
            type: object
            properties:
              start_date:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                description: Date of this event occurrence (YYYY-MM-DD)
                nullable: true
              start_time:
                type: string
                description: Local start time for this event occurrence
                nullable: true
              end_date:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                description: End date of this event occurrence (YYYY-MM-DD)
                nullable: true
              end_time:
                type: string
                description: Local end time for this event occurrence
                nullable: true
              cancelled:
                type: string
                description: Cancellation value for this event occurrence
                nullable: true
              event_uuid:
                type: string
                description: Unique identifier for this event occurrence
                nullable: true
              source_url:
                type: string
                description: Source URL for this event occurrence
                nullable: true
              ticket_url:
                type: string
                description: Ticket URL for this event occurrence
                nullable: true
          description: Dates and local times for individual event occurrences
          nullable: true
        staffPicks:
          type: string
          enum:
            - local_gem
            - dont_miss
            - null
          description: 'Staff tagged events. One of: local_gem, dont_miss'
          nullable: true
        recurringEventId:
          type: string
          description: Unique identifier for the recurring event series
          nullable: true
        cancelled:
          type: string
          description: Cancellation value for the event
          nullable: true
        areasConnected:
          type: string
          description: Areas associated to the event
          nullable: true
        closestLocation:
          type: string
          description: Closest place name to the event
          nullable: true
        virtualRule:
          type: string
          enum:
            - Unknown
            - 100% Virtual
            - Not Virtual
            - Virtual and In Person
            - null
          description: >-
            Virtual event rule. One of: Unknown, 100% Virtual, Not Virtual,
            Virtual and In Person
          nullable: true
        imageUrl:
          type: string
          description: >-
            URL of the event image. These images are hosted by the a data
            provider, and are provided under the MIT license. See
            https://opensource.org/licenses/MIT for more information.
          nullable: true
        sourceUrl:
          type: string
          description: URL to the original event listing
          nullable: true
        popularityScore:
          type: number
          description: Popularity score from 0 (lowest) to 6 (highest)
          nullable: true
        isTravelWorthy:
          type: boolean
          description: Indicates if the event is worth traveling for
          nullable: true
        isTouring:
          type: boolean
          description: Indicates if the event is part of a touring production
          nullable: true
        primaryDescriptorInterests:
          type: array
          items:
            type: string
          description: >-
            Interest categories associated with the event. Each value is
            expected to be one of these values: airplane, alcohol, art,
            arts_and_crafts, automotive_car, beauty, beer, boating, bowling,
            brunch, boot_camp, card_game, comedy, comic_book, cooking,
            costume_cosplay, current_events_and_politics, cycling,
            dance_participation, dance_performance, dinosaur, dog_focused,
            esports, fashion, film, fishing, fitness_general, floral_design,
            flowers, food, food_truck, fun_run, games, garden, gluten_free, gun,
            healing, hiking, history, holiday, home_and_garden, horse, house,
            improv, karaoke, lego, light, liquor, literature, magic,
            martial_arts, meditation, motorcycle, motorsport, music, nature,
            parenthood, pet, photography, pickleball, podcast, quinceanera,
            running, science, self_improvement, skiing, swimming, table_games,
            tattoo, tea, technology, theatre, track_and_field, travel,
            vegetarian_vegan, video_game, wedding, weights_bodybuilding, wine,
            yard_leisure_game, yoga, zoo
          nullable: true
        title:
          type: string
          description: Name of the venue
          nullable: true
        fullAddress:
          type: string
          description: Full address, with street, city, state, and postal code of the venue
          nullable: true
        address1:
          type: string
          description: Street address of the venue
          nullable: true
        city:
          type: string
          description: City where the event takes place
          nullable: true
        region:
          type: string
          description: State or province where the event takes place
          nullable: true
        country:
          type: string
          description: Country where the event takes place
          nullable: true
        postalCode:
          type: string
          description: Postal code where the event takes place
          nullable: true
        latitude:
          type: number
          description: Latitude of the venue
          nullable: true
        longitude:
          type: number
          description: Longitude of the venue
          nullable: true
        distance:
          type: number
          description: >-
            Distance from the search geometry in degrees (populated when a
            spatial filter is active and sortBy=distance)
          nullable: true
        modifiedAt:
          type: string
          description: Timestamp when the event was last modified in the data provider
          nullable: true
        createdAt:
          type: string
          description: Timestamp when the event was first created in the data provider
          nullable: true
      required:
        - id
        - name
        - description
        - type
        - startDate
        - endDate
        - datesArray
        - datesTimes
        - staffPicks
        - recurringEventId
        - cancelled
        - areasConnected
        - closestLocation
        - virtualRule
        - imageUrl
        - sourceUrl
        - popularityScore
        - isTravelWorthy
        - isTouring
        - primaryDescriptorInterests
        - title
        - fullAddress
        - address1
        - city
        - region
        - country
        - postalCode
        - latitude
        - longitude
        - distance
        - modifiedAt
        - createdAt
      title: Event
      description: An event returned by the Nearby Events API
    EventsListResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventsListResponseDtoEvent'
        pagination:
          type: object
          properties:
            total:
              type: number
            limit:
              type: number
            offset:
              type: number
          required:
            - total
            - limit
            - offset
      required:
        - success
        - data
        - pagination
    EventResponseDtoEvent:
      type: object
      properties:
        id:
          type: string
          description: Unique event identifier (UUID)
        name:
          type: string
          description: Name of the event
          nullable: true
        description:
          type: string
          description: Full description of the event
          nullable: true
        type:
          type: string
          enum:
            - class_workshop
            - competition
            - concert
            - convention_expo
            - festival
            - museum_exhibit
            - parade
            - performance_show
            - shopping
            - social
            - tour
            - null
          description: >-
            Type of event. One of: class_workshop, competition, concert,
            convention_expo, festival, museum_exhibit, parade, performance_show,
            shopping, social, tour
          nullable: true
        startDate:
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Event start date (YYYY-MM-DD)
          nullable: true
        endDate:
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          description: Event end date (YYYY-MM-DD)
          nullable: true
        datesArray:
          type: array
          items:
            type: string
          description: List of event dates (YYYY-MM-DD)
          nullable: true
        datesTimes:
          type: array
          items:
            type: object
            properties:
              start_date:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                description: Date of this event occurrence (YYYY-MM-DD)
                nullable: true
              start_time:
                type: string
                description: Local start time for this event occurrence
                nullable: true
              end_date:
                type: string
                format: date
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                description: End date of this event occurrence (YYYY-MM-DD)
                nullable: true
              end_time:
                type: string
                description: Local end time for this event occurrence
                nullable: true
              cancelled:
                type: string
                description: Cancellation value for this event occurrence
                nullable: true
              event_uuid:
                type: string
                description: Unique identifier for this event occurrence
                nullable: true
              source_url:
                type: string
                description: Source URL for this event occurrence
                nullable: true
              ticket_url:
                type: string
                description: Ticket URL for this event occurrence
                nullable: true
          description: Dates and local times for individual event occurrences
          nullable: true
        staffPicks:
          type: string
          enum:
            - local_gem
            - dont_miss
            - null
          description: 'Staff tagged events. One of: local_gem, dont_miss'
          nullable: true
        recurringEventId:
          type: string
          description: Unique identifier for the recurring event series
          nullable: true
        cancelled:
          type: string
          description: Cancellation value for the event
          nullable: true
        areasConnected:
          type: string
          description: Areas associated to the event
          nullable: true
        closestLocation:
          type: string
          description: Closest place name to the event
          nullable: true
        virtualRule:
          type: string
          enum:
            - Unknown
            - 100% Virtual
            - Not Virtual
            - Virtual and In Person
            - null
          description: >-
            Virtual event rule. One of: Unknown, 100% Virtual, Not Virtual,
            Virtual and In Person
          nullable: true
        imageUrl:
          type: string
          description: >-
            URL of the event image. These images are hosted by the a data
            provider, and are provided under the MIT license. See
            https://opensource.org/licenses/MIT for more information.
          nullable: true
        sourceUrl:
          type: string
          description: URL to the original event listing
          nullable: true
        popularityScore:
          type: number
          description: Popularity score from 0 (lowest) to 6 (highest)
          nullable: true
        isTravelWorthy:
          type: boolean
          description: Indicates if the event is worth traveling for
          nullable: true
        isTouring:
          type: boolean
          description: Indicates if the event is part of a touring production
          nullable: true
        primaryDescriptorInterests:
          type: array
          items:
            type: string
          description: >-
            Interest categories associated with the event. Each value is
            expected to be one of these values: airplane, alcohol, art,
            arts_and_crafts, automotive_car, beauty, beer, boating, bowling,
            brunch, boot_camp, card_game, comedy, comic_book, cooking,
            costume_cosplay, current_events_and_politics, cycling,
            dance_participation, dance_performance, dinosaur, dog_focused,
            esports, fashion, film, fishing, fitness_general, floral_design,
            flowers, food, food_truck, fun_run, games, garden, gluten_free, gun,
            healing, hiking, history, holiday, home_and_garden, horse, house,
            improv, karaoke, lego, light, liquor, literature, magic,
            martial_arts, meditation, motorcycle, motorsport, music, nature,
            parenthood, pet, photography, pickleball, podcast, quinceanera,
            running, science, self_improvement, skiing, swimming, table_games,
            tattoo, tea, technology, theatre, track_and_field, travel,
            vegetarian_vegan, video_game, wedding, weights_bodybuilding, wine,
            yard_leisure_game, yoga, zoo
          nullable: true
        title:
          type: string
          description: Name of the venue
          nullable: true
        fullAddress:
          type: string
          description: Full address, with street, city, state, and postal code of the venue
          nullable: true
        address1:
          type: string
          description: Street address of the venue
          nullable: true
        city:
          type: string
          description: City where the event takes place
          nullable: true
        region:
          type: string
          description: State or province where the event takes place
          nullable: true
        country:
          type: string
          description: Country where the event takes place
          nullable: true
        postalCode:
          type: string
          description: Postal code where the event takes place
          nullable: true
        latitude:
          type: number
          description: Latitude of the venue
          nullable: true
        longitude:
          type: number
          description: Longitude of the venue
          nullable: true
        distance:
          type: number
          description: >-
            Distance from the search geometry in degrees (populated when a
            spatial filter is active and sortBy=distance)
          nullable: true
        modifiedAt:
          type: string
          description: Timestamp when the event was last modified in the data provider
          nullable: true
        createdAt:
          type: string
          description: Timestamp when the event was first created in the data provider
          nullable: true
      required:
        - id
        - name
        - description
        - type
        - startDate
        - endDate
        - datesArray
        - datesTimes
        - staffPicks
        - recurringEventId
        - cancelled
        - areasConnected
        - closestLocation
        - virtualRule
        - imageUrl
        - sourceUrl
        - popularityScore
        - isTravelWorthy
        - isTouring
        - primaryDescriptorInterests
        - title
        - fullAddress
        - address1
        - city
        - region
        - country
        - postalCode
        - latitude
        - longitude
        - distance
        - modifiedAt
        - createdAt
      title: Event
      description: An event returned by the Nearby Events API
    EventResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          allOf:
            - $ref: '#/components/schemas/EventResponseDtoEvent'
          nullable: true
      required:
        - success
        - data
    MarketStatsField:
      type: object
      properties:
        count:
          type: number
          description: >-
            Amount of non null and numeric values used to make statistics that
            is within the outlier range specified
          example: 10
        median:
          type: number
          description: >-
            Median of the non null and numeric values that is within the outlier
            range specified
          example: 500000
        average:
          type: number
          description: >-
            Mean average of the non null and numeric values that is within the
            outlier range specified
          example: 532561
        minimum:
          type: number
          description: >-
            Smallest value of the non null and numeric values that is within the
            outlier range specified
          example: 100000
        maximum:
          type: number
          description: >-
            Largest value of the non null and numeric values that is within the
            outlier range specified
          example: 20000000
        sum:
          type: number
          description: >-
            Total sum of the non null and numeric values that is within the
            outlier range specified
          example: 256373500
      required:
        - count
        - median
        - average
        - minimum
        - maximum
        - sum
    SoldStatisticsDto:
      type: object
      properties:
        count:
          type: number
          description: Total count of listings within the period
        ListPrice:
          description: >-
            Statistics about the price that the property was listed for when it
            sold
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        OriginalListPrice:
          description: Statistics about the First List Price before price adjustments
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        ClosePrice:
          description: Statistics about the price that the property was sold for
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        YearBuilt:
          description: Statistics about the year the properties were built
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        DaysOnMarket:
          description: >-
            Statistics about the number of days the property was on the market.
            This field is specified by an MLS, and can often be null. If Days On
            Market is missing from an MLS, either daysToClose or daysToContract
            should be used.
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        CumulativeDaysOnMarket:
          description: >-
            Statistics about the total number of days the property was on the
            market. This differs from Days On Market because Days On Market is
            reset when the property is temporarily removed from market, while
            Cumulative Days On Market never resets. The outlier parameters for
            Days On Market also remove outliers from Cumulative Days On Market.
            This field is specified by an MLS, and can often be null.
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        LivingArea:
          description: Statistics about the square footage of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        pricePerSquareFoot:
          description: Statistics about the price per square foot of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        daysToClose:
          description: >-
            Statistics about the number of days until the property was sold.
            This is calculated from the List Date to the Close Date, which is
            most often the date the title was changed, not the date the property
            was received an offer.
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        daysToContract:
          description: >-
            Statistics about the number of days until the property was sold.
            This is calculated from the List Date to the Contract Date, which is
            most often the date the property was received an offer, not the date
            the title was changed.
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        soldOverAskingCount:
          type: number
          description: >-
            Count of listings that the Sold Price was greater than the final
            List Price
          example: 15
        priceReductionCount:
          type: number
          description: >-
            Count of listings that the final List Price was less than the
            Original List Price
          example: 10
        priceReductionPercentage:
          type: number
          description: >-
            Percentage of listings that the final List Price was less than the
            Original List Price
          example: 3.23
        saleToListRatio:
          type: number
          description: Ratio of the final Sale Price divided by the List Price
          example: 1.05
      required:
        - count
        - ListPrice
        - OriginalListPrice
        - ClosePrice
        - YearBuilt
        - DaysOnMarket
        - CumulativeDaysOnMarket
        - LivingArea
        - pricePerSquareFoot
        - daysToClose
        - daysToContract
        - soldOverAskingCount
        - priceReductionCount
        - priceReductionPercentage
        - saleToListRatio
    SoldMarketStatisticsDto:
      type: object
      properties:
        period:
          type: string
          description: >-
            Time period these statistics are based on. In the format {full year}
            or {full year}-Q{quarter} or {full year}-M{month} or {full
            year}-W{week}
        priceRange:
          description: Price range of the properties
          type: array
          items:
            type: string
        boundaryId:
          type: string
          description: >-
            If the query is grouping by boundary id, this is the id of the
            boundary.
        SimplePropertyType:
          type: string
          description: >-
            If the query is grouping by simple property type, this is the simple
            property type.
        PropertySubType:
          type: string
          description: >-
            If the query is grouping by property sub type, this is the property
            sub type.
        PropertyType:
          type: string
          description: >-
            If the query is grouping by property type, this is the property
            type.
        metadata:
          type: object
          description: The MLSes that provided data for these statistics
          example:
            attribution:
              - name: North MLS
              - name: Northeast MLS
        data:
          $ref: '#/components/schemas/SoldStatisticsDto'
      required:
        - metadata
        - data
    ActiveStatisticsDto:
      type: object
      properties:
        count:
          type: number
          description: Total count of listings within the period
        ListPrice:
          description: >-
            Statistics about the price that the property was listed for when it
            sold
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        OriginalListPrice:
          description: Statistics about the First List Price before price adjustments
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        YearBuilt:
          description: Statistics about the year the properties were built
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        LivingArea:
          description: Statistics about the square footage of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        pricePerSquareFoot:
          description: Statistics about the price per square foot of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        daysOnSite:
          description: >-
            Statistics about the number of days from the On Market Date to
            today. This field is derived from the On Market Date specified by an
            MLS, and can be null. If daysOnSite is missing null, either
            daysToClose or daysToContract can be used.
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        priceReductionCount:
          type: number
          description: >-
            Count of listings that the final List Price was less than the
            Original List Price
          example: 10
        priceReductionPercentage:
          type: number
          description: >-
            Percentage of listings that the final List Price was less than the
            Original List Price
          example: 3.23
      required:
        - count
        - ListPrice
        - OriginalListPrice
        - YearBuilt
        - LivingArea
        - pricePerSquareFoot
        - daysOnSite
        - priceReductionCount
        - priceReductionPercentage
    ActiveMarketStatisticsDto:
      type: object
      properties:
        priceRange:
          description: Price range of the properties
          type: array
          items:
            type: string
        boundaryId:
          type: string
          description: >-
            If the query is grouping by boundary id, this is the id of the
            boundary.
        SimplePropertyType:
          type: string
          description: >-
            If the query is grouping by simple property type, this is the simple
            property type.
        PropertySubType:
          type: string
          description: >-
            If the query is grouping by property sub type, this is the property
            sub type.
        PropertyType:
          type: string
          description: >-
            If the query is grouping by property type, this is the property
            type.
        metadata:
          type: object
          description: The MLSes that provided data for these statistics
          example:
            attribution:
              - name: North MLS
              - name: Northeast MLS
        data:
          $ref: '#/components/schemas/ActiveStatisticsDto'
      required:
        - metadata
        - data
    AddedToMarketStatisticsDto:
      type: object
      properties:
        count:
          type: number
          description: Total count of listings within the period
        ListPrice:
          description: >-
            Statistics about the price that the property was listed for when it
            sold
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        OriginalListPrice:
          description: Statistics about the First List Price before price adjustments
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        YearBuilt:
          description: Statistics about the year the properties were built
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        LivingArea:
          description: Statistics about the square footage of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
        pricePerSquareFoot:
          description: Statistics about the price per square foot of the properties
          allOf:
            - $ref: '#/components/schemas/MarketStatsField'
      required:
        - count
        - ListPrice
        - OriginalListPrice
        - YearBuilt
        - LivingArea
        - pricePerSquareFoot
    AddedToMarketMarketStatisticsDto:
      type: object
      properties:
        period:
          type: string
          description: >-
            Time period these statistics are based on. In the format {full year}
            or {full year}-Q{quarter} or {full year}-M{month} or {full
            year}-W{week}
        priceRange:
          description: Price range of the properties
          type: array
          items:
            type: string
        boundaryId:
          type: string
          description: >-
            If the query is grouping by boundary id, this is the id of the
            boundary.
        SimplePropertyType:
          type: string
          description: >-
            If the query is grouping by simple property type, this is the simple
            property type.
        PropertySubType:
          type: string
          description: >-
            If the query is grouping by property sub type, this is the property
            sub type.
        PropertyType:
          type: string
          description: >-
            If the query is grouping by property type, this is the property
            type.
        metadata:
          type: object
          description: The MLSes that provided data for these statistics
          example:
            attribution:
              - name: North MLS
              - name: Northeast MLS
        data:
          $ref: '#/components/schemas/AddedToMarketStatisticsDto'
      required:
        - metadata
        - data
    MLSMemberResponseDto:
      type: object
      properties:
        Metadata:
          type: string
          description: Member Metadata
        AltMemberMlsId:
          type: string
          description: Alternate Member MLS ID
        JobTitle:
          type: string
          description: Job Title. Only available if provided by the MLS.
        MemberAddress1:
          type: string
          description: Member Address Line 1
        MemberAddress2:
          type: string
          description: Member Address Line 2
        MemberCity:
          type: string
          description: Member's City
        MemberCountry:
          type: string
          description: Member's Country
        MemberCountyOrParish:
          type: string
          description: Member's County or Parish
        MemberDesignation:
          type: string
          description: >-
            Designations and certifications acknowledging experience and
            expertise in various real estate sectors are awarded by NAR and each
            affiliated group upon completion of required courses.
        MemberDirectPhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberEmail:
          type: string
          description: The email address of the Member.
        MemberFax:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberFirstName:
          type: string
          description: The first name of the Member.
        MemberFullName:
          type: string
          description: >-
            The full name of the Member. (First Middle Last) or a alternate full
            name.
        MemberHomePhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberIsAssistantTo:
          type: string
          description: >-
            The MemberMlsId of the Agent/Broker that this member is an
            assistant. The typical use will be to add the agent's ID to this
            field when editing the member record of the assistant.
        MemberLanguages:
          type: string
          description: ''
        MemberLastName:
          type: string
          description: The last name of the Member.
        MemberMiddleName:
          type: string
          description: The middle name of the Member.
        MemberMlsAccessYN:
          type: string
          description: Does the member have access to the MLS system.
        MemberMlsId:
          type: string
          description: >-
            The local, well-known identifier for the member. This value is only
            unique for the MLS it originates from.
        MemberMlsSecurityClass:
          type: string
          description: The MLS security group or class given to the member.
        MemberMobilePhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberNamePrefix:
          type: string
          description: Prefix to the name (e.g. Dr. Mr. Ms. etc.)
        MemberNameSuffix:
          type: string
          description: Suffix to the surname (e.g. Esq., Jr., III etc.)
        MemberNationalAssociationId:
          type: string
          description: >-
            The national association ID of the member. i.e. in the U.S. is the
            NRDS number.
        MemberNickname:
          type: string
          description: >-
            An alternate name used by the Member, usually as a substitute for
            the first name.
        MemberOfficePhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberOfficePhoneExt:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberPager:
          type: string
          description: The extension of the given phone number (if applicable).
        MemberPostalCode:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberPostalCodePlus4:
          type: string
          description: The postal code of the member.
        MemberPreferredPhone:
          type: string
          description: The extension of the postal/zip code. i.e. +4
        MemberPreferredPhoneExt:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberStateLicense:
          type: string
          description: The extension of the given phone number (if applicable).
        MemberStateLicenseState:
          type: string
          description: >-
            The license of the Member. Separate multiple licenses with a comma
            and space.
        MemberStateOrProvince:
          type: string
          description: The state or province in which the member is addressed.
        MemberStatus:
          type: string
          description: Is the account active, inactive or under disciplinary action.
        MemberTollFreePhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        MemberType:
          type: string
          description: >-
            The type of member. i.e. Agent, Broker, Office Manager, Appraiser,
            Photographer, Assistants, MLO, Realtor, Association Staff, MLS
            Staff, etc.
        ModificationTimestamp:
          type: string
          description: Date/time the roster record was last modified.
        OfficeMlsId:
          type: string
          description: >-
            The local, well-known identifier. This value is only unique for the
            MLS it originates from.
        OfficeName:
          type: string
          description: The legal name of the brokerage.
        OriginalEntryTimestamp:
          type: string
          description: >-
            Date/time the roster record was originally input into the source
            system.
        mlsId:
          type: string
          description: The members's originating MLS's ID.
        SocialMediaTypeUrlOrId:
          type: string
          description: >-
            A list of types of sites, blogs and social media (e.g., Website,
            Blog, Facebook, Twitter, LinkedIn, Instagram).
        Office:
          type: object
          description: ''
        Media:
          type: object
          description: Member's Media URL. Usually a headshot image.
      required:
        - Metadata
        - AltMemberMlsId
        - JobTitle
        - MemberAddress1
        - MemberAddress2
        - MemberCity
        - MemberCountry
        - MemberCountyOrParish
        - MemberDesignation
        - MemberDirectPhone
        - MemberEmail
        - MemberFax
        - MemberFirstName
        - MemberFullName
        - MemberHomePhone
        - MemberIsAssistantTo
        - MemberLanguages
        - MemberLastName
        - MemberMiddleName
        - MemberMlsAccessYN
        - MemberMlsId
        - MemberMlsSecurityClass
        - MemberMobilePhone
        - MemberNamePrefix
        - MemberNameSuffix
        - MemberNationalAssociationId
        - MemberNickname
        - MemberOfficePhone
        - MemberOfficePhoneExt
        - MemberPager
        - MemberPostalCode
        - MemberPostalCodePlus4
        - MemberPreferredPhone
        - MemberPreferredPhoneExt
        - MemberStateLicense
        - MemberStateLicenseState
        - MemberStateOrProvince
        - MemberStatus
        - MemberTollFreePhone
        - MemberType
        - ModificationTimestamp
        - OfficeMlsId
        - OfficeName
        - OriginalEntryTimestamp
        - mlsId
        - SocialMediaTypeUrlOrId
        - Office
        - Media
    MLSOfficeResponseDto:
      type: object
      properties:
        AltOfficeMlsId:
          type: string
          description: Alternate Office MLS ID
        FranchiseAffiliation:
          type: string
          description: The name of the franchise to which the broker/office is contracted.
        IDXOfficeParticipationYN:
          type: object
          description: Does the Office/Broker participate in IDX.
        MainOfficeMlsId:
          type: string
          description: OfficeMlsId of the Main Office in a firm/company of offices.
        MainOfficeName:
          type: string
          description: The name of the main office associated with this office.
        ModificationTimestamp:
          type: string
          description: Date/time the office record was last modified.
        OfficeAddress1:
          type: string
          description: The street number, direction, name and suffix of the office.
        OfficeAddress2:
          type: string
          description: The unit/suite number of the office.
        OfficeAssociationComments:
          type: string
          description: Notes relating to the office.
        OfficeBranchType:
          type: string
          description: >-
            The level of the office in the hierarchy of Main, Branch, Stand
            Alone, etc.,
        OfficeBrokerMlsId:
          type: string
          description: The MemberMlsId of the responsible/owning broker.
        OfficeCity:
          type: string
          description: The city of the office.
        OfficeCorporateLicense:
          type: string
          description: >-
            When an office/firm is a corporation, an independent license number
            is issued.
        OfficeCountyOrParish:
          type: string
          description: The county or parish in which the offices is located.
        OfficeEmail:
          type: string
          description: The email address of the office.
        OfficeFax:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        OfficeManagerMlsId:
          type: string
          description: The lead Office Manager for the given office.
        OfficeMlsId:
          type: string
          description: >-
            The local, well-known identifier. This value is only unique for the
            MLS it originates from.
        OfficeName:
          type: string
          description: The legal name of the office.
        OfficeNationalAssociationId:
          type: string
          description: >-
            The national association ID of the office. i.e. in the U.S. is the
            NRDS number.
        OfficePhone:
          type: string
          description: >-
            North American 10 digit phone numbers should be in the format of
            ###-###-#### (separated by hyphens). Other conventions should use
            the common local standard. International numbers should be preceded
            by a plus symbol.
        OfficePhoneExt:
          type: string
          description: The extension of the given phone number (if applicable).
        OfficePostalCode:
          type: string
          description: The postal code of the office.
        OfficePostalCodePlus4:
          type: string
          description: The extension of the postal/zip code. i.e. +4
        OfficeStateOrProvince:
          type: string
          description: The state or province in which the office is located.
        OfficeStatus:
          type: string
          description: Is the office active, inactive or deleted.
          enum:
            - Active
            - Inactive
            - Pending
        OfficeType:
          type: string
          description: >-
            The type of business conducted by the office. i.e. Real Estate,
            Appraiser, etc.
        OriginalEntryTimestamp:
          type: string
          description: Date/time the office was originally created.
        mlsId:
          type: string
          description: The members's originating MLS's ID.
        SocialMediaTypeUrlOrId:
          type: string
          description: >-
            A list of types of sites, blogs and social media (e.g., Website,
            Blog, Facebook, Twitter, LinkedIn, Instagram).
        AttributionContact:
          type: string
          description: Contact information for the office when attribution is required.
        OfficeLeadEmail:
          type: string
          description: Email to send leads to for this office.
        OfficeLeadPhone:
          type: string
          description: Phone number to send leads to for this office.
      required:
        - AltOfficeMlsId
        - FranchiseAffiliation
        - IDXOfficeParticipationYN
        - MainOfficeMlsId
        - MainOfficeName
        - ModificationTimestamp
        - OfficeAddress1
        - OfficeAddress2
        - OfficeAssociationComments
        - OfficeBranchType
        - OfficeBrokerMlsId
        - OfficeCity
        - OfficeCorporateLicense
        - OfficeCountyOrParish
        - OfficeEmail
        - OfficeFax
        - OfficeManagerMlsId
        - OfficeMlsId
        - OfficeName
        - OfficeNationalAssociationId
        - OfficePhone
        - OfficePhoneExt
        - OfficePostalCode
        - OfficePostalCodePlus4
        - OfficeStateOrProvince
        - OfficeStatus
        - OfficeType
        - OriginalEntryTimestamp
        - mlsId
        - SocialMediaTypeUrlOrId
        - AttributionContact
        - OfficeLeadEmail
        - OfficeLeadPhone
    Listing:
      type: object
      properties:
        ListingId:
          type: string
          description: The Listing ID from the MLS.
        mlsId:
          type: string
          description: The MLS ID of the listing.
        ClosePrice:
          type: object
          description: The price the listing was sold for, if the listing has been sold
          example: 10
        ListPrice:
          type: number
          description: >-
            The price the listing is current selling for, or the last asking
            price, depending on the status of the listing.
          example: 1000000
        LivingArea:
          type: object
          description: >-
            The total living area of the property. Usually in square feet. Also
            called "Square Footage".
          example: 1500
        LotSizeArea:
          type: object
          description: The lot size area of the property. Usually in square feet.
        LotSizeUnits:
          type: object
          description: The units used for `LotSizeArea`.
        DaysOnMarket:
          type: object
          description: >-
            The number of days the listing has been on the market. Only updated
            when the listing is modified. If the listing is still on market, use
            the "daysOnSite" field instead.
          example: 30
        OriginalListPrice:
          type: object
          description: The original list price of the listing.
          example: 10
        OnMarketDate:
          type: string
          description: The date the listing was put on the market.
          example: '2023-01-01'
        BedroomsTotal:
          type: object
          nullable: true
          description: The total number of bedrooms in the listing.
          example: 3
        BathroomsTotal:
          type: object
          nullable: true
          description: The total number of bathrooms in the listing.
          example: 2
        daysOnSite:
          type: object
          nullable: true
          description: The number of days since the listing was put on the market.
          example: 30
        CloseDate:
          type: object
          description: >-
            The date the listing was transfered from the seller to the buyer. If
            the listing is still on the market, this will be null.
          example: '2023-01-01'
        Longitude:
          type: object
          description: The longitude of the listing.
          example: 37.7749
        Latitude:
          type: object
          description: The latitude of the listing.
          example: 37.7749
        MLSAreaMajor:
          type: object
          description: The MLS area of the listing.
          example: Fallbrook
        StandardStatus:
          type: string
          description: The MLS status of the listing.
          example: Active
        SimplePropertyType:
          type: string
          description: The simple property type of the listing.
          example: SINGLE_FAMILY
          enum:
            - LAND
            - COMMERCIAL
            - APARTMENT
            - RESIDENTIAL_RENTAL
            - MULTI_FAMILY
            - CONDO
            - SINGLE_FAMILY
            - TOWNHOUSE
            - MANUFACTURED_HOME
            - MOBILE_HOME
            - FARM
            - RANCH
            - BOAT_SLIP
            - PARKING
            - HOTEL
            - MIXED_USE
            - STOCK_COOPERATIVE
            - TIMESHARE
            - OFFICE
            - OTHER
        PropertySubType:
          type: string
          description: The property subtype of the listing.
          example: SingleFamilyResidential
        PropertyType:
          type: string
          description: The property type of the listing.
          example: Residential
        YearBuilt:
          type: object
          description: The year the property was built.
          example: 2000
        CumulativeDaysOnMarket:
          type: object
          description: >-
            The cumulative days the listing has been on the market. If the
            listing was removed from the market, and then added again, this will
            be the total days on market across all periods.
          example: 30
        UnparsedAddress:
          type: string
          description: The address of the listing.
          example: 123 Main St
        City:
          type: string
          description: The city of the listing.
          example: San Diego
        CountyOrParish:
          type: string
          description: The County, or equivalent of the listing.
          example: San Diego County
        StateOrProvince:
          type: string
          description: The state or province of the listing.
          example: CA
        PostalCode:
          type: string
          description: The postal code of the listing.
          example: '92101'
        Media:
          description: The media URLs of the listing. Usually photos.
          type: array
          items:
            type: string
        mlsName:
          type: string
          description: The MLS name of the listing.
          example: California Regional MLS
        metadata:
          type: object
          description: >-
            Additional metadata for listing fields, for information purposes
            only.
          example:
            ClosePrice: Restricted based on non-disclosure laws
          nullable: true
        ListAgentMlsId:
          type: string
          description: The MLS ID of the listing agent.
      required:
        - ListingId
        - mlsId
        - ClosePrice
        - ListPrice
        - LivingArea
        - LotSizeArea
        - LotSizeUnits
        - DaysOnMarket
        - OriginalListPrice
        - OnMarketDate
        - BedroomsTotal
        - BathroomsTotal
        - daysOnSite
        - CloseDate
        - Longitude
        - Latitude
        - MLSAreaMajor
        - StandardStatus
        - SimplePropertyType
        - PropertySubType
        - PropertyType
        - YearBuilt
        - CumulativeDaysOnMarket
        - UnparsedAddress
        - City
        - CountyOrParish
        - StateOrProvince
        - PostalCode
        - Media
        - mlsName
        - ListAgentMlsId
    OpenHouseResponseDto:
      type: object
      properties:
        ListingId:
          type: string
          description: Listing for this Open House.
        OpenHouseStartTime:
          type: string
          description: Open House start time.
        OpenHouseEndTime:
          type: string
          description: Open House end time.
        AppointmentRequiredYN:
          type: object
          nullable: true
          description: >-
            Indicates if an appointment is required for the Open House. Only
            about 3% of records have this field populated.
        MemberMlsId:
          type: string
          nullable: true
          description: >-
            Member MLS ID associated with the Open House. Only about about 30%
            of records have this field populated.
        ModificationTimestamp:
          type: string
          description: Timestamp of the last modification to the Open House record.
        OpenHouseDate:
          type: string
          nullable: true
          description: >-
            Date of the Open House. Only about 25% of records have this field
            populated.
        OpenHouseRemarks:
          type: string
          nullable: true
          description: >-
            Remarks or comments about the Open House. Only about 30% of records
            have this field populated.
        OpenHouseStatus:
          type: string
          enum:
            - Active
            - Canceled
            - Deleted
            - Ended
          description: Status of the Open House.
        OpenHouseType:
          type: string
          nullable: true
          enum:
            - Public
            - Broker
            - Office
          description: >-
            Type of the Open House. Only about 60% of records have this field
            populated.
        ShowingAgentFirstName:
          type: string
          nullable: true
          description: >-
            First name of the showing agent. Only about 5% of records have this
            field populated.
        ShowingAgentLastName:
          type: string
          nullable: true
          description: >-
            Last name of the showing agent. Only about 5% of records have this
            field populated.
        ShowingAgentMlsID:
          type: string
          nullable: true
          description: >-
            Showing agent MLS ID. Only about 15% of records have this field
            populated.
        mlsId:
          type: string
          nullable: true
          description: MLS ID associated with the Open House.
      required:
        - ListingId
        - OpenHouseStartTime
        - OpenHouseEndTime
        - AppointmentRequiredYN
        - MemberMlsId
        - ModificationTimestamp
        - OpenHouseDate
        - OpenHouseRemarks
        - OpenHouseStatus
        - OpenHouseType
        - ShowingAgentFirstName
        - ShowingAgentLastName
        - ShowingAgentMlsID
        - mlsId
    MLSMediaResponseDto:
      type: object
      properties:
        ModificationTimestamp:
          type: string
          description: Date/time the media was last modified.
        mlsId:
          type: string
          description: The members's originating MLS's ID.
        ResourceRecordID:
          type: string
          description: Listing ID associated with the media.
        Order:
          type: number
          description: The order in which the media should be displayed.
        MediaStatus:
          type: string
          description: Status of the media item.
        MediaURL:
          type: string
          nullable: true
          description: URL of the media item.
        MediaHTML:
          type: string
          nullable: true
          description: >-
            URL or HTML Code of the media. Usually used for videos and virtual
            tours.
        ShortDescription:
          type: string
          nullable: true
          description: >-
            A short description of the media item. Usually the original name of
            the media file.
        MediaCategory:
          type: string
          enum:
            - Branded Virtual Tour
            - Floor Plan
            - Photo
            - Unbranded Virtual Tour
            - Video
          description: Category of the media item.
      required:
        - ModificationTimestamp
        - mlsId
        - ResourceRecordID
        - Order
        - MediaStatus
        - MediaURL
        - MediaHTML
        - ShortDescription
        - MediaCategory
    PublicAccountResponseDtoAccount:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        website:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        social:
          type: object
          properties:
            facebook:
              type: string
            instagram:
              type: string
            linkedin:
              type: string
            twitter:
              type: string
          required:
            - facebook
            - instagram
            - linkedin
            - twitter
          nullable: true
        logoUrl:
          type: string
          nullable: true
        accountDesignation:
          type: string
          enum:
            - team
            - office
            - null
          nullable: true
        accountType:
          type: string
          enum:
            - individual
            - group
            - null
          nullable: true
        branding:
          type: object
          properties:
            primaryColor:
              type: string
              description: Hex color
            secondaryColor:
              type: string
              description: Hex color
            tertiaryColor:
              type: string
              description: Hex color
            fontStyle:
              type: string
              enum:
                - heritage-slab
                - urban-block
                - elegant-serif
                - whimsical-script
                - luxury-cursive
                - retro-vibes
                - minimalist-pro
                - liveby-default
                - minimal-luxe
            buttonStyle:
              type: object
              properties:
                buttonVariant:
                  type: string
                  enum:
                    - filled
                    - outlined
                cornerStyle:
                  type: string
                  enum:
                    - rounded
                    - sharp
                    - circle
            blockStyle:
              type: object
              properties:
                borderRadius:
                  type: number
                dropShadow:
                  type: string
                  enum:
                    - none
                    - standard
            graphStyle:
              type: object
              properties:
                color:
                  type: string
                  enum:
                    - primary
                    - secondary
                    - tertiary
                    - custom
                customColor:
                  type: string
          required:
            - primaryColor
            - secondaryColor
            - tertiaryColor
            - fontStyle
            - buttonStyle
            - blockStyle
            - graphStyle
          nullable: true
        brandingMetaData:
          type: object
          properties:
            isInherited:
              type: boolean
            usingSystemDefault:
              type: boolean
            hasParent:
              type: boolean
            hasChildren:
              type: boolean
          required:
            - isInherited
            - usingSystemDefault
            - hasParent
            - hasChildren
        address:
          type: object
          properties:
            street:
              type: array
              items:
                type: string
            city:
              type: string
            state:
              type: string
            zip:
              type: string
          required:
            - street
            - city
            - state
            - zip
          nullable: true
        lightLogoFile:
          type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            updatedAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            uploadedByUserId:
              type: number
              nullable: true
            assignedUserId:
              type: number
              nullable: true
            assignedAccountId:
              type: number
              nullable: true
            name:
              type: string
            url:
              type: string
            filetype:
              type: string
            bytes:
              type: number
            library:
              type: string
            metadata:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
              nullable: true
            category:
              type: string
              nullable: true
          required:
            - id
            - uploadedByUserId
            - assignedUserId
            - assignedAccountId
            - name
            - url
            - filetype
            - bytes
            - library
            - metadata
            - category
          nullable: true
        darkLogoFile:
          type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            updatedAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            uploadedByUserId:
              type: number
              nullable: true
            assignedUserId:
              type: number
              nullable: true
            assignedAccountId:
              type: number
              nullable: true
            name:
              type: string
            url:
              type: string
            filetype:
              type: string
            bytes:
              type: number
            library:
              type: string
            metadata:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
              nullable: true
            category:
              type: string
              nullable: true
          required:
            - id
            - uploadedByUserId
            - assignedUserId
            - assignedAccountId
            - name
            - url
            - filetype
            - bytes
            - library
            - metadata
            - category
          nullable: true
        teamPhotoFile:
          type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            updatedAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            uploadedByUserId:
              type: number
              nullable: true
            assignedUserId:
              type: number
              nullable: true
            assignedAccountId:
              type: number
              nullable: true
            name:
              type: string
            url:
              type: string
            filetype:
              type: string
            bytes:
              type: number
            library:
              type: string
            metadata:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
              nullable: true
            category:
              type: string
              nullable: true
          required:
            - id
            - uploadedByUserId
            - assignedUserId
            - assignedAccountId
            - name
            - url
            - filetype
            - bytes
            - library
            - metadata
            - category
          nullable: true
        originatingId:
          type: string
          nullable: true
        originatingSource:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        deletedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          nullable: true
        domains:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              updatedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              service:
                type: string
              externalServiceId:
                type: string
              usage:
                type: string
              domain:
                type: string
              status:
                type: string
              verified:
                type: boolean
              records:
                type: array
                items:
                  type: object
                  properties:
                    record:
                      type: string
                    name:
                      type: string
                    type:
                      type: string
                    ttl:
                      type: string
                    status:
                      type: string
                    value:
                      type: string
                    priority:
                      type: number
                  required:
                    - record
                    - name
                    - type
                    - ttl
                    - status
                    - value
            required:
              - id
              - service
              - externalServiceId
              - usage
              - domain
              - status
        linkTemplates:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              templateUrl:
                type: string
              type:
                type: string
            required:
              - id
              - templateUrl
              - type
        mlses:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              mlsMemberId:
                type: string
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              updatedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              mls:
                type: object
                properties:
                  id:
                    type: number
                  name:
                    type: string
                  resoPropertiesVendor:
                    type: string
                required:
                  - id
                  - name
                  - resoPropertiesVendor
            required:
              - id
              - mlsMemberId
              - mls
        settings:
          type: object
          properties:
            livebyLocalSettings:
              type: object
              properties: {}
        children:
          type: array
          items:
            type: object
            properties:
              id:
                type: number
              name:
                type: string
            required:
              - id
              - name
            description: The ID and name of this account's direct sub-accounts.
      required:
        - id
        - name
        - website
        - phone
        - email
        - children
      title: Account
      description: A LiveBy account
    PublicAccountResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/PublicAccountResponseDtoAccount'
      required:
        - success
        - data
    PublicApiKeyListResponseDtoApiKey:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          nullable: true
        key:
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        revokedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          nullable: true
      required:
        - id
        - name
        - key
      title: ApiKey
      description: An API key belonging to an account
    PublicApiKeyListResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiKeyListResponseDtoApiKey'
      required:
        - success
        - data
    CreateAccountApiKeyDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
      required:
        - name
    PublicApiKeyResponseDtoApiKey:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          nullable: true
        key:
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        revokedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          nullable: true
      required:
        - id
        - name
        - key
      title: ApiKey
      description: An API key belonging to an account
    PublicApiKeyResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/PublicApiKeyResponseDtoApiKey'
      required:
        - success
        - data
    UpdateAccountApiKeyDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
    MarketSummaryViewDto:
      type: object
      properties:
        status:
          type: string
          default: sold
          description: The status of the properties to include in the market summary view.
        timeFrame:
          type: string
          default: P12M
          enum:
            - P12M
            - P6M
            - P90D
            - P60D
            - P30D
          description: >-
            Selects the timeframe tab in the Market Summary block by default
            when the report loads if the Market Summary exists in the report.
    MarketReportDisplaySettingsDto:
      type: object
      properties:
        brandingType:
          type: string
          default: corporate
          enum:
            - corporate
            - agent
          description: >-
            Change how the report is branded, whether it’s company only or uses
            the agent’s details.
        marketSummaryView:
          description: A summary view of the report data.
          allOf:
            - $ref: '#/components/schemas/MarketSummaryViewDto'
        backgroundImageUrl:
          type: string
          description: Change the image that is used for the background.
    ReportMetadataDto:
      type: object
      properties:
        title:
          type: string
          description: >-
            The title of the report to use when sharing this report on social
            media.
        description:
          type: string
          description: >-
            The description of the report to use when sharing this report on
            social media.
        imageUrl:
          type: string
          description: The url of an image to use when sharing this report on social media.
    ReportFiltersDto:
      type: object
      properties:
        PropertySubTypes:
          type: array
          default:
            - SingleFamilyResidence
            - Townhouse
            - Condominium
          description: "The property sub type or sub types you want aggregated market statistics for. Sub types are used to distinguish between the types of residential or commercial data available.\n\nFor instance, the most common suburban home would be a SingleFamilyResidence. A Condominium is usually defined as a subsection of a building made to be a place of dwelling. The place of dwelling is usually only 1 story tall. A Townhouse is usually a multilevel building attached to other multilevel buildings with no dwelling above or below it. See the\_[RESO Standard Lookups](https://ddwiki.reso.org/display/DDW20/PropertySubType+Lookups)\_for more information on property sub types.\n\n**Disclaimer:**\_LiveBy ensures the availability of SingleFamilyResidence, Townhouse, and Condominium in each MLS. The availability of other PropertySubTypes may vary and is more limited by MLS.\n\nFor Residential Listings, we recommend using SingleFamilyResidence, Townhouse, and Condominium."
          items:
            type: string
            enum:
              - SingleFamilyResidence
              - Townhouse
              - Condominium
              - MultiFamily
              - Mobile
              - StockCooperative
        priceLow:
          type: number
          description: >
            This removes any listings that have a price less than the value
            specified.`
        priceHigh:
          type: number
          description: >
            This removes any listings that have a price greater than the value
            specified.`
        livingAreaLow:
          type: number
          description: >-
            This removes any listings that have a living area less than the
            value specified.
        livingAreaHigh:
          type: number
          description: >-
            This removes any listings that have a living area greater than the
            value specified.
    MarketReportForCampaignInput:
      type: object
      properties:
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/MarketReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        boundaryId:
          type: string
          description: The boundary ID for which you seek to generate the market report.
      required:
        - reportType
        - boundaryId
    ReportDisplaySettingsDto:
      type: object
      properties:
        brandingType:
          type: string
          default: corporate
          enum:
            - corporate
            - agent
          description: >-
            Change how the report is branded, whether it’s company only or uses
            the agent’s details.
        marketSummaryView:
          description: A summary view of the report data.
          allOf:
            - $ref: '#/components/schemas/MarketSummaryViewDto'
    ReportPropertyOverridesDto:
      type: object
      properties:
        estimatedLowValue:
          type: number
          description: >-
            This will override the estimated low valuation for the property
            referenced in the report.
        estimatedHighValue:
          type: number
          description: >-
            This will override the estimated high valuation for the property
            referenced in the report.
        totalBedrooms:
          type: number
          description: >-
            This will override the total bedrooms for the property referenced in
            the report.
        totalFullBaths:
          type: number
          description: >-
            This will override the total full bathrooms for the property
            referenced in the report.
        totalHalfBaths:
          type: number
          description: >-
            This will override the total half bathrooms for the property
            referenced in the report.
        totalLivingArea:
          type: number
          description: >-
            This will override the total living area for the property referenced
            in the report.
    PropertyReportForCampaignInput:
      type: object
      properties:
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/ReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        propertyOverrides:
          description: >-
            Settings that you can use to override specific property information
            if included in the report.
          allOf:
            - $ref: '#/components/schemas/ReportPropertyOverridesDto'
        fullAddress:
          type: string
          description: >-
            The address of the result containing the address number and street,
            place, region, country, and postal code. This or `addressId` is
            required for a property report.
          example: 1600 Pennsylvania Ave NW, Washington, DC 20500
        addressId:
          type: string
          description: >-
            The ID for the address to use for the report. This or `fullAddress`
            is required for a property report.
        boundaryId:
          type: string
          description: The boundary ID to use when generating this report.
      required:
        - reportType
        - fullAddress
        - addressId
        - boundaryId
    SellerActivityReportForCampaignInput:
      type: object
      properties:
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/ReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        propertyOverrides:
          description: >-
            Settings that you can use to override specific property information
            if included in the report.
          allOf:
            - $ref: '#/components/schemas/ReportPropertyOverridesDto'
        listingId:
          type: string
          description: The listing ID to use to generate the seller activity report.
        mlsId:
          type: string
          description: >-
            The MLS ID to use to generate the seller activity report. Listing
            IDs are often reused across different MLSes, this will help pinpoint
            the exact listing to use for the report.
      required:
        - reportType
        - listingId
        - mlsId
    ContactDto:
      type: object
      properties:
        email:
          type: string
          description: The email address of the contact.
        phone:
          type: string
          description: The phone number of the contact.
        firstName:
          type: string
          description: The first name of the contact.
        lastName:
          type: string
          description: The last name of the contact.
        isLead:
          type: boolean
          description: >-
            Whether to store this contact inside the leads table, send a lead
            notification.
        anonymousId:
          type: string
          description: Anonymous analytics identifier for contact stitching.
        sessionId:
          type: string
          description: Session analytics identifier for contact stitching.
      required:
        - email
    CreateCampaignPayloadDto:
      type: object
      properties:
        accountId:
          type: number
          description: The ID of the account you would like to create a report for.
        userId:
          type: number
          description: The ID of the user this campaign belongs to.
        frequency:
          type: string
          enum:
            - weekly
            - bimonthly
            - monthly
            - quarterly
          description: >-
            How often we want this campaign to send. Will be sent on this
            interval from the moment this campaign is created going forward.
        startDate:
          format: date-time
          type: string
          description: >-
            The date to start sending the campaign. If the start date is not
            provided, the campaign will be sent immediately.
        emailTemplate:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The template to use for the email.
        contactIds:
          description: >-
            An array of contact IDs to send this campaign to. This can be used
            on its own or in combination with `contacts`.
          type: array
          items:
            type: number
        contacts:
          description: >-
            An array of contacts to send this campaign to. This can be used on
            its own or in combination with `contactIds`.
          type: array
          items:
            $ref: '#/components/schemas/ContactDto'
        reportId:
          type: object
          description: >-
            The ID of the report to use for this campaign. This can be either a
            number (the report ID) or a string (the report slug).
        report:
          oneOf:
            - $ref: '#/components/schemas/MarketReportForCampaignInput'
            - $ref: '#/components/schemas/PropertyReportForCampaignInput'
            - $ref: '#/components/schemas/SellerActivityReportForCampaignInput'
          additionalProperties: false
          description: >-
            The report to include in the campaign. One report specification must
            be provided if `reportId` is not provided.
      required:
        - accountId
        - frequency
        - emailTemplate
        - contactIds
        - contacts
        - report
    ReportDto:
      type: object
      properties:
        id:
          type: number
        slug:
          type: string
        reportTypeId:
          type: number
        reportType:
          type: string
        reportUrl:
          type: string
        displaySettings:
          type: object
        filters:
          type: object
        propertyOverrides:
          type: object
        metadata:
          type: object
        boundaryId:
          type: string
        addressId:
          type: string
        mlsId:
          type: string
        listingId:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: object
        deletedAt:
          type: object
      required:
        - id
        - slug
        - reportTypeId
        - reportType
        - reportUrl
        - displaySettings
        - filters
        - propertyOverrides
        - metadata
        - boundaryId
        - addressId
        - mlsId
        - listingId
        - createdAt
        - updatedAt
        - deletedAt
    BrandingDetailsDto:
      type: object
      properties: {}
    AccountAddressDto:
      type: object
      properties: {}
    FilesDto:
      type: object
      properties:
        id:
          type: number
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          format: date-time
          type: string
        uploadedByUserId:
          type: object
        assignedUserId:
          type: object
        assignedAccountId:
          type: object
        name:
          type: string
          description: The original name of the file.
        url:
          type: string
          description: The url of where the file's location.
        filetype:
          type: string
          description: The filetype.
        bytes:
          type: number
          description: The size of the file in bytes.
        metadata:
          type: object
          description: >-
            Additional information unique to the file. For images, this includes
            height and width.
        library:
          type: string
          description: >-
            The name of the product or feature that uses this file. For
            instance, "profile-image" might be used to store a user's profile
            image.
        category:
          type: string
          description: >-
            If a library can be divided into categories, this determines which
            category. Examples might be "Neighborhoods" and "Cities" to divide
            photos into two different categories.
      required:
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - uploadedByUserId
        - assignedUserId
        - assignedAccountId
        - name
        - url
        - filetype
        - bytes
        - metadata
        - library
        - category
    AccountDto:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier for the account.
        name:
          type: string
          description: The name for the account.
        website:
          type: string
          description: The website for the account.
        phone:
          type: string
          description: The phone number for the account.
        email:
          type: string
          description: The email address of the account.
        social:
          type: object
          description: The social media links of the account.
        logoUrl:
          type: string
          deprecated: true
          description: Deprecated. Use lightLogoFile instead.
        accountDesignation:
          type: object
          description: The designation of the account (e.g., team, corporate)
        branding:
          description: The branding / theme for the account.
          allOf:
            - $ref: '#/components/schemas/BrandingDetailsDto'
        brandingMetaData:
          type: object
          description: Information about the branding for the account.
        address:
          description: The address for the account.
          allOf:
            - $ref: '#/components/schemas/AccountAddressDto'
        lightLogoFile:
          description: The accounts light logo image.
          allOf:
            - $ref: '#/components/schemas/FilesDto'
        darkLogoFile:
          description: The accounts dark logo image.
          allOf:
            - $ref: '#/components/schemas/FilesDto'
        teamPhotoFile:
          description: >-
            Team photos (only available if the account is designated as a
            "team") replace agent photos in public facing materials.
          allOf:
            - $ref: '#/components/schemas/FilesDto'
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          format: date-time
          type: string
      required:
        - id
        - name
        - website
        - address
        - createdAt
        - updatedAt
        - deletedAt
    UserDto:
      type: object
      properties:
        id:
          type: number
        firstName:
          type: string
          description: The first name of the user.
        lastName:
          type: string
          description: The last name of the user.
        email:
          type: string
          description: The email address of the user.
        phone:
          type: string
          description: The phone number of the user.
        title:
          type: string
          description: The title of the user.
        bio:
          type: string
          description: The bio of the user.
        profileImage:
          type: string
          deprecated: true
          description: Deprecated. Use profileImageFile instead.
        licenseNumber:
          type: string
          description: The license number of the user.
        licenseType:
          type: string
          enum:
            - license
            - DRE
          description: The license number type of the user.
        social:
          type: object
          description: The social media links of the user.
        website:
          type: string
          description: The website of the user.
        profileImageFile:
          description: The user's profile image.
          allOf:
            - $ref: '#/components/schemas/FilesDto'
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        deletedAt:
          format: date-time
          type: string
      required:
        - id
        - email
        - createdAt
    CampaignDto:
      type: object
      properties:
        id:
          type: number
        frequency:
          type: string
        emailTemplate:
          type: string
        subscriptions:
          type: array
          items:
            type: string
        report:
          $ref: '#/components/schemas/ReportDto'
        account:
          $ref: '#/components/schemas/AccountDto'
        user:
          $ref: '#/components/schemas/UserDto'
        createdAt:
          type: string
        updatedAt:
          type: object
        deletedAt:
          type: object
      required:
        - id
        - frequency
        - emailTemplate
        - subscriptions
        - report
        - account
        - user
        - createdAt
        - updatedAt
        - deletedAt
    CreateCampaignResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/CampaignDto'
      required:
        - success
        - data
    MarketReportInput:
      type: object
      properties:
        accountId:
          type: number
          description: '    The ID of the account you would like to create a report for.    '
        userId:
          type: number
          description: '  The ID of the user this campaign belongs to.  '
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/MarketReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        boundaryId:
          type: string
          description: The boundary ID for which you seek to generate the market report.
      required:
        - accountId
        - reportType
        - boundaryId
    PropertyReportInput:
      type: object
      properties:
        accountId:
          type: number
          description: '    The ID of the account you would like to create a report for.    '
        userId:
          type: number
          description: '  The ID of the user this campaign belongs to.  '
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/ReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        propertyOverrides:
          description: >-
            Settings that you can use to override specific property information
            if included in the report.
          allOf:
            - $ref: '#/components/schemas/ReportPropertyOverridesDto'
        fullAddress:
          type: string
          description: >-
            The address of the result containing the address number and street,
            place, region, country, and postal code. This or `addressId` is
            required for a property report.
          example: 1600 Pennsylvania Ave NW, Washington, DC 20500
        addressId:
          type: string
          description: >-
            The ID for the address to use for the report. This or `fullAddress`
            is required for a property report.
        boundaryId:
          type: string
          description: The boundary ID to use when generating this report.
      required:
        - accountId
        - reportType
        - fullAddress
        - addressId
        - boundaryId
    SellerActivityReportInput:
      type: object
      properties:
        accountId:
          type: number
          description: '    The ID of the account you would like to create a report for.    '
        userId:
          type: number
          description: '  The ID of the user this campaign belongs to.  '
        reportType:
          type: string
          enum:
            - market-report
            - property-report
            - seller-activity-report
          description: The type of report to generate.
        reportTypeId:
          type: number
          description: >-
            The ID of the report type you would like to create. This or
            `reportType` is required.
        displaySettings:
          description: >-
            Allows the configuration of certain charts and graphs to have
            default settings. 
          allOf:
            - $ref: '#/components/schemas/ReportDisplaySettingsDto'
        metadata:
          description: Metadata to use when sharing the report on social media.
          allOf:
            - $ref: '#/components/schemas/ReportMetadataDto'
        filters:
          description: >-
            Common filters applied to any report used to tailor the report to be
            more specific to a particular target.
          allOf:
            - $ref: '#/components/schemas/ReportFiltersDto'
        propertyOverrides:
          description: >-
            Settings that you can use to override specific property information
            if included in the report.
          allOf:
            - $ref: '#/components/schemas/ReportPropertyOverridesDto'
        listingId:
          type: string
          description: The listing ID to use to generate the seller activity report.
        mlsId:
          type: string
          description: >-
            The MLS ID to use to generate the seller activity report. Listing
            IDs are often reused across different MLSes, this will help pinpoint
            the exact listing to use for the report.
      required:
        - accountId
        - reportType
        - listingId
        - mlsId
    CreateReportResponseDto:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ReportDto'
      required:
        - success
        - data
externalDocs:
  description: LiveBy API Reference
  url: https://docs.liveby.com/
