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

# Download Dataset

> Request a complete ApartmentIQ dataset snapshot in Parquet or CSV format.

<Warning>This API is not available to all customers. Please reach out to your account representative if you would like to learn more.</Warning>

## How downloads work

By default, the endpoint returns JSON containing the selected dataset, file type, snapshot date, and a private, pre-signed download URL that expires after five minutes. Set <code>redirect_to_download</code> to <code>true</code> to receive a <code>303 See Other</code> redirect to the download URL instead.

If you omit <code>date</code>, the endpoint returns the newest available dataset.

Datasets refresh in the early morning, EST. Exact refresh timing can vary. Properties, Organizations, and Organization Properties datasets refresh daily, and the Contacts dataset refreshes monthly on the 5th day of the month.

## Properties dataset

One row per property visible in ApartmentIQ Explore, using the requested snapshot date.

| Field | Parquet type | Meaning |
|---|---|---|
| <code>property_name</code> | string | Property display name. |
| <code>market_name</code> | string | ApartmentIQ market name. |
| <code>submarket_name</code> | string | ApartmentIQ submarket name. |
| <code>property_id</code> | int64 | ApartmentIQ property ID. |
| <code>address</code> | string | Street address. |
| <code>city</code> | string | City. |
| <code>state</code> | string | State abbreviation. |
| <code>zip_code</code> | string | Postal code. |
| <code>latitude</code> | double | Latitude rounded to six decimal places. |
| <code>longitude</code> | double | Longitude rounded to six decimal places. |
| <code>unified_status</code> | string | Current ApartmentIQ property status. |
| <code>unit_count</code> | int64 | Known number of units. |
| <code>number_of_stories</code> | int64 | Known number of stories. |
| <code>year_built</code> | int64 | Year built. |
| <code>year_renovated</code> | int64 | Year most recently renovated. |
| <code>property_class</code> | string | ApartmentIQ property class. |
| <code>property_type</code> | string | ApartmentIQ property type. |
| <code>property_website</code> | string | Property website URL. |
| <code>on_revenue_management_tool</code> | boolean | Whether ApartmentIQ identifies the property as using a revenue management tool. |
| <code>management_company_names</code> | string | Current management company names, encoded as a pipe-delimited scalar list. |
| <code>management_change_date</code> | string | Most recent management change date in YYYY-MM-DD format, or an empty string. |
| <code>previous_management_company_names</code> | string | Management company names before the most recent change, encoded as a pipe-delimited scalar list. |
| <code>ownership_company_names</code> | string | Current ownership company names, encoded as a pipe-delimited scalar list. |
| <code>ownership_change_date</code> | string | Most recent ownership change date in YYYY-MM-DD format, or an empty string. |
| <code>previous_ownership_company_names</code> | string | Ownership company names before the most recent change, encoded as a pipe-delimited scalar list. |
| <code>rent</code> | double | Average asking rent over the trailing 30 days. |
| <code>rent_0_bed</code> | double | Average studio asking rent over the trailing 30 days. |
| <code>rent_1_bed</code> | double | Average one-bedroom asking rent over the trailing 30 days. |
| <code>rent_2_bed</code> | double | Average two-bedroom asking rent over the trailing 30 days. |
| <code>rent_3_bed</code> | double | Average three-bedroom asking rent over the trailing 30 days. |
| <code>ner</code> | double | Average net effective rent after concessions over the trailing 30 days. |
| <code>ner_0_bed</code> | double | Average studio net effective rent over the trailing 30 days. |
| <code>ner_1_bed</code> | double | Average one-bedroom net effective rent over the trailing 30 days. |
| <code>ner_2_bed</code> | double | Average two-bedroom net effective rent over the trailing 30 days. |
| <code>ner_3_bed</code> | double | Average three-bedroom net effective rent over the trailing 30 days. |
| <code>rent_psf</code> | double | Average asking rent per square foot over the trailing 30 days. |
| <code>rent_0_bed_psf</code> | double | Average studio asking rent per square foot over the trailing 30 days. |
| <code>rent_1_bed_psf</code> | double | Average one-bedroom asking rent per square foot over the trailing 30 days. |
| <code>rent_2_bed_psf</code> | double | Average two-bedroom asking rent per square foot over the trailing 30 days. |
| <code>rent_3_bed_psf</code> | double | Average three-bedroom asking rent per square foot over the trailing 30 days. |
| <code>ner_psf</code> | double | Average net effective rent per square foot over the trailing 30 days. |
| <code>ner_0_bed_psf</code> | double | Average studio net effective rent per square foot over the trailing 30 days. |
| <code>ner_1_bed_psf</code> | double | Average one-bedroom net effective rent per square foot over the trailing 30 days. |
| <code>ner_2_bed_psf</code> | double | Average two-bedroom net effective rent per square foot over the trailing 30 days. |
| <code>ner_3_bed_psf</code> | double | Average three-bedroom net effective rent per square foot over the trailing 30 days. |
| <code>rent_growth_rate_yoy</code> | double | Year-over-year asking rent growth rate. |
| <code>ner_growth_rate_yoy</code> | double | Year-over-year net effective rent growth rate. |
| <code>concession_value</code> | double | Average concession value over the trailing 30 days. |
| <code>concession_percent</code> | double | Average concession as a share of rent over the trailing 30 days. |
| <code>days_on_market</code> | double | Average days on market for available units over the trailing 30 days. |
| <code>occupancy_percent</code> | double | Average occupancy share over the trailing 30 days. |
| <code>leased_percent</code> | double | Average leased share over the trailing 30 days. |
| <code>exposure_percent</code> | double | Average share of units exposed for lease over the trailing 30 days. |

## Organizations dataset

One row per stakeholder organization associated with at least one property. Profile fields describe the organization, while property and unit counts reflect the requested snapshot date. Breakdown fields are flattened into fixed scalar columns.

| Field | Parquet type | Meaning |
|---|---|---|
| <code>id</code> | int64 | ApartmentIQ stakeholder entity ID. |
| <code>name</code> | string | Organization display name. |
| <code>entity_type</code> | string | Stakeholder entity type, such as Property Manager or Owner. |
| <code>image_url</code> | string | Organization logo or image URL. |
| <code>website_url</code> | string | Organization website URL. |
| <code>domain_name</code> | string | Organization domain name. |
| <code>linkedin_url</code> | string | Organization LinkedIn URL. |
| <code>description</code> | string | Organization description. |
| <code>company_entity_type</code> | string | Company entity classification. |
| <code>company_legal_type</code> | string | Company legal structure. |
| <code>year_founded</code> | string | Year the organization was founded. |
| <code>phone_number</code> | string | Organization phone number. |
| <code>employee_count_range</code> | string | Known employee count range. |
| <code>headquarters_address</code> | string | Headquarters street address. |
| <code>headquarters_city</code> | string | Headquarters city. |
| <code>headquarters_state</code> | string | Headquarters state. |
| <code>headquarters_zip_code</code> | string | Headquarters postal code. |
| <code>headquarters_country</code> | string | Headquarters country. |
| <code>property_count</code> | int64 | Number of associated properties on the snapshot date. |
| <code>total_unit_count</code> | int64 | Total units across associated properties on the snapshot date. |
| <code>units_by_property_class_a_unit_count</code> | int64 | Units in associated class A properties. |
| <code>units_by_property_class_b_unit_count</code> | int64 | Units in associated class B properties. |
| <code>units_by_property_class_c_unit_count</code> | int64 | Units in associated class C properties. |
| <code>units_by_property_class_d_unit_count</code> | int64 | Units in associated class D properties. |
| <code>units_by_property_type_conventional_unit_count</code> | int64 | Units in associated conventional properties. |
| <code>units_by_property_type_student_unit_count</code> | int64 | Units in associated student housing properties. |
| <code>units_by_property_type_senior_unit_count</code> | int64 | Units in associated senior living properties. |
| <code>units_by_property_type_build_to_rent_unit_count</code> | int64 | Units in associated build-to-rent properties. |
| <code>units_by_property_type_affordable_unit_count</code> | int64 | Units in associated income-restricted properties. |

## Organization Properties dataset

Use this dataset to connect properties to their current organizations without matching organization names. Each row links one property to one organization, so a property associated with multiple organizations appears in multiple rows. Join <code>property_id</code> to <code>properties.property_id</code> and <code>organization_id</code> to <code>organizations.id</code>. Use <code>organizations.entity_type</code> to determine each organization's role. Historical organization relationships are not included.

| Field | Parquet type | Meaning |
|---|---|---|
| <code>property_id</code> | int64 | ApartmentIQ property ID. Joins to <code>property_id</code> in the Properties dataset. |
| <code>organization_id</code> | int64 | ApartmentIQ stakeholder entity ID. Joins to <code>id</code> in the Organizations dataset. |

## Contacts dataset

One row per contact and linked stakeholder organization. A person linked to multiple qualifying organizations can appear once for each organization.

| Field | Parquet type | Meaning |
|---|---|---|
| <code>name</code> | string | Contact name. |
| <code>job_title</code> | string | Contact job title. |
| <code>linkedin_url</code> | string | Contact LinkedIn URL. |
| <code>email_address</code> | string | Contact email address. |
| <code>phone_number</code> | string | Contact phone number. |
| <code>stakeholder_entity_id</code> | int64 | ApartmentIQ stakeholder entity ID for the linked organization. |
| <code>stakeholder_entity_name</code> | string | Display name of the linked stakeholder organization. |



## OpenAPI

````yaml /openapi/v2/schema.json post /datasets/download
openapi: 3.1.0
info:
  title: ApartmentIQ API V2
  version: 2.4.0
  termsOfService: https://www.getapartmentiq.com/terms
  x-logo:
    url: https://developers.apartmentiq.io/logo.svg
    altText: ApartmentIQ
  description: >-
    ApartmentIQ API V2 endpoints for account discovery, search, organization
    details, bulk Explore data, and dataset downloads.
servers:
  - url: https://data.apartmentiq.io/apartmentiq/api/v2
security:
  - bearerAuth: []
tags:
  - name: Accounts
    description: Account discovery endpoints.
  - name: Amenities
    description: Amenity discovery endpoints.
  - name: Properties
    description: Property search endpoints.
  - name: Markets
    description: Market and geo-boundary search endpoints.
  - name: Organizations
    description: Organization search endpoints.
  - name: Datasets
    description: Complete dataset snapshot downloads.
  - name: Bulk
    description: Bulk property, market, quota, and forecast exports.
paths:
  /datasets/download:
    post:
      tags:
        - Datasets
      summary: Download Dataset
      description: >-
        Request a complete ApartmentIQ dataset snapshot in Parquet or CSV
        format.


        <Warning>This API is not available to all customers. Please reach out to
        your account representative if you would like to learn more.</Warning>


        ## How downloads work


        By default, the endpoint returns JSON containing the selected dataset,
        file type, snapshot date, and a private, pre-signed download URL that
        expires after five minutes. Set <code>redirect_to_download</code> to
        <code>true</code> to receive a <code>303 See Other</code> redirect to
        the download URL instead.


        If you omit <code>date</code>, the endpoint returns the newest available
        dataset.


        Datasets refresh in the early morning, EST. Exact refresh timing can
        vary. Properties, Organizations, and Organization Properties datasets
        refresh daily, and the Contacts dataset refreshes monthly on the 5th day
        of the month.


        ## Properties dataset


        One row per property visible in ApartmentIQ Explore, using the requested
        snapshot date.


        | Field | Parquet type | Meaning |

        |---|---|---|

        | <code>property_name</code> | string | Property display name. |

        | <code>market_name</code> | string | ApartmentIQ market name. |

        | <code>submarket_name</code> | string | ApartmentIQ submarket name. |

        | <code>property_id</code> | int64 | ApartmentIQ property ID. |

        | <code>address</code> | string | Street address. |

        | <code>city</code> | string | City. |

        | <code>state</code> | string | State abbreviation. |

        | <code>zip_code</code> | string | Postal code. |

        | <code>latitude</code> | double | Latitude rounded to six decimal
        places. |

        | <code>longitude</code> | double | Longitude rounded to six decimal
        places. |

        | <code>unified_status</code> | string | Current ApartmentIQ property
        status. |

        | <code>unit_count</code> | int64 | Known number of units. |

        | <code>number_of_stories</code> | int64 | Known number of stories. |

        | <code>year_built</code> | int64 | Year built. |

        | <code>year_renovated</code> | int64 | Year most recently renovated. |

        | <code>property_class</code> | string | ApartmentIQ property class. |

        | <code>property_type</code> | string | ApartmentIQ property type. |

        | <code>property_website</code> | string | Property website URL. |

        | <code>on_revenue_management_tool</code> | boolean | Whether
        ApartmentIQ identifies the property as using a revenue management tool.
        |

        | <code>management_company_names</code> | string | Current management
        company names, encoded as a pipe-delimited scalar list. |

        | <code>management_change_date</code> | string | Most recent management
        change date in YYYY-MM-DD format, or an empty string. |

        | <code>previous_management_company_names</code> | string | Management
        company names before the most recent change, encoded as a pipe-delimited
        scalar list. |

        | <code>ownership_company_names</code> | string | Current ownership
        company names, encoded as a pipe-delimited scalar list. |

        | <code>ownership_change_date</code> | string | Most recent ownership
        change date in YYYY-MM-DD format, or an empty string. |

        | <code>previous_ownership_company_names</code> | string | Ownership
        company names before the most recent change, encoded as a pipe-delimited
        scalar list. |

        | <code>rent</code> | double | Average asking rent over the trailing 30
        days. |

        | <code>rent_0_bed</code> | double | Average studio asking rent over the
        trailing 30 days. |

        | <code>rent_1_bed</code> | double | Average one-bedroom asking rent
        over the trailing 30 days. |

        | <code>rent_2_bed</code> | double | Average two-bedroom asking rent
        over the trailing 30 days. |

        | <code>rent_3_bed</code> | double | Average three-bedroom asking rent
        over the trailing 30 days. |

        | <code>ner</code> | double | Average net effective rent after
        concessions over the trailing 30 days. |

        | <code>ner_0_bed</code> | double | Average studio net effective rent
        over the trailing 30 days. |

        | <code>ner_1_bed</code> | double | Average one-bedroom net effective
        rent over the trailing 30 days. |

        | <code>ner_2_bed</code> | double | Average two-bedroom net effective
        rent over the trailing 30 days. |

        | <code>ner_3_bed</code> | double | Average three-bedroom net effective
        rent over the trailing 30 days. |

        | <code>rent_psf</code> | double | Average asking rent per square foot
        over the trailing 30 days. |

        | <code>rent_0_bed_psf</code> | double | Average studio asking rent per
        square foot over the trailing 30 days. |

        | <code>rent_1_bed_psf</code> | double | Average one-bedroom asking rent
        per square foot over the trailing 30 days. |

        | <code>rent_2_bed_psf</code> | double | Average two-bedroom asking rent
        per square foot over the trailing 30 days. |

        | <code>rent_3_bed_psf</code> | double | Average three-bedroom asking
        rent per square foot over the trailing 30 days. |

        | <code>ner_psf</code> | double | Average net effective rent per square
        foot over the trailing 30 days. |

        | <code>ner_0_bed_psf</code> | double | Average studio net effective
        rent per square foot over the trailing 30 days. |

        | <code>ner_1_bed_psf</code> | double | Average one-bedroom net
        effective rent per square foot over the trailing 30 days. |

        | <code>ner_2_bed_psf</code> | double | Average two-bedroom net
        effective rent per square foot over the trailing 30 days. |

        | <code>ner_3_bed_psf</code> | double | Average three-bedroom net
        effective rent per square foot over the trailing 30 days. |

        | <code>rent_growth_rate_yoy</code> | double | Year-over-year asking
        rent growth rate. |

        | <code>ner_growth_rate_yoy</code> | double | Year-over-year net
        effective rent growth rate. |

        | <code>concession_value</code> | double | Average concession value over
        the trailing 30 days. |

        | <code>concession_percent</code> | double | Average concession as a
        share of rent over the trailing 30 days. |

        | <code>days_on_market</code> | double | Average days on market for
        available units over the trailing 30 days. |

        | <code>occupancy_percent</code> | double | Average occupancy share over
        the trailing 30 days. |

        | <code>leased_percent</code> | double | Average leased share over the
        trailing 30 days. |

        | <code>exposure_percent</code> | double | Average share of units
        exposed for lease over the trailing 30 days. |


        ## Organizations dataset


        One row per stakeholder organization associated with at least one
        property. Profile fields describe the organization, while property and
        unit counts reflect the requested snapshot date. Breakdown fields are
        flattened into fixed scalar columns.


        | Field | Parquet type | Meaning |

        |---|---|---|

        | <code>id</code> | int64 | ApartmentIQ stakeholder entity ID. |

        | <code>name</code> | string | Organization display name. |

        | <code>entity_type</code> | string | Stakeholder entity type, such as
        Property Manager or Owner. |

        | <code>image_url</code> | string | Organization logo or image URL. |

        | <code>website_url</code> | string | Organization website URL. |

        | <code>domain_name</code> | string | Organization domain name. |

        | <code>linkedin_url</code> | string | Organization LinkedIn URL. |

        | <code>description</code> | string | Organization description. |

        | <code>company_entity_type</code> | string | Company entity
        classification. |

        | <code>company_legal_type</code> | string | Company legal structure. |

        | <code>year_founded</code> | string | Year the organization was
        founded. |

        | <code>phone_number</code> | string | Organization phone number. |

        | <code>employee_count_range</code> | string | Known employee count
        range. |

        | <code>headquarters_address</code> | string | Headquarters street
        address. |

        | <code>headquarters_city</code> | string | Headquarters city. |

        | <code>headquarters_state</code> | string | Headquarters state. |

        | <code>headquarters_zip_code</code> | string | Headquarters postal
        code. |

        | <code>headquarters_country</code> | string | Headquarters country. |

        | <code>property_count</code> | int64 | Number of associated properties
        on the snapshot date. |

        | <code>total_unit_count</code> | int64 | Total units across associated
        properties on the snapshot date. |

        | <code>units_by_property_class_a_unit_count</code> | int64 | Units in
        associated class A properties. |

        | <code>units_by_property_class_b_unit_count</code> | int64 | Units in
        associated class B properties. |

        | <code>units_by_property_class_c_unit_count</code> | int64 | Units in
        associated class C properties. |

        | <code>units_by_property_class_d_unit_count</code> | int64 | Units in
        associated class D properties. |

        | <code>units_by_property_type_conventional_unit_count</code> | int64 |
        Units in associated conventional properties. |

        | <code>units_by_property_type_student_unit_count</code> | int64 | Units
        in associated student housing properties. |

        | <code>units_by_property_type_senior_unit_count</code> | int64 | Units
        in associated senior living properties. |

        | <code>units_by_property_type_build_to_rent_unit_count</code> | int64 |
        Units in associated build-to-rent properties. |

        | <code>units_by_property_type_affordable_unit_count</code> | int64 |
        Units in associated income-restricted properties. |


        ## Organization Properties dataset


        Use this dataset to connect properties to their current organizations
        without matching organization names. Each row links one property to one
        organization, so a property associated with multiple organizations
        appears in multiple rows. Join <code>property_id</code> to
        <code>properties.property_id</code> and <code>organization_id</code> to
        <code>organizations.id</code>. Use
        <code>organizations.entity_type</code> to determine each organization's
        role. Historical organization relationships are not included.


        | Field | Parquet type | Meaning |

        |---|---|---|

        | <code>property_id</code> | int64 | ApartmentIQ property ID. Joins to
        <code>property_id</code> in the Properties dataset. |

        | <code>organization_id</code> | int64 | ApartmentIQ stakeholder entity
        ID. Joins to <code>id</code> in the Organizations dataset. |


        ## Contacts dataset


        One row per contact and linked stakeholder organization. A person linked
        to multiple qualifying organizations can appear once for each
        organization.


        | Field | Parquet type | Meaning |

        |---|---|---|

        | <code>name</code> | string | Contact name. |

        | <code>job_title</code> | string | Contact job title. |

        | <code>linkedin_url</code> | string | Contact LinkedIn URL. |

        | <code>email_address</code> | string | Contact email address. |

        | <code>phone_number</code> | string | Contact phone number. |

        | <code>stakeholder_entity_id</code> | int64 | ApartmentIQ stakeholder
        entity ID for the linked organization. |

        | <code>stakeholder_entity_name</code> | string | Display name of the
        linked stakeholder organization. |
      operationId: downloadV2Dataset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetDownloadRequest'
            example:
              account_id: '{account_id}'
              dataset: properties
              file_type: parquet
              date: '2026-07-21'
              redirect_to_download: false
      responses:
        '200':
          description: >-
            Download details for the requested dataset. The private pre-signed
            URL expires after five minutes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetDownloadResponse'
              example:
                dataset: properties
                file_type: parquet
                dataset_date: '2026-07-21'
                download_url: >-
                  https://secure-downloads.example.com/properties-2026-07-21.parquet?signature=...
        '303':
          description: >-
            Returned when redirect_to_download is true. Follow the private URL
            in the Location header within five minutes to download the file.
          headers:
            Location:
              required: true
              description: Five-minute pre-signed download URL.
              schema:
                type: string
                format: uri
              example: >-
                https://secure-downloads.example.com/properties-2026-07-21.parquet?signature=...
        '400':
          description: A required parameter is missing or a parameter value is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingDataset:
                  summary: Missing dataset
                  value:
                    error: dataset is required
                invalidDataset:
                  summary: Unsupported dataset
                  value:
                    error: >-
                      dataset must be one of: properties, organizations,
                      contacts, organization_properties
                missingFileType:
                  summary: Missing file type
                  value:
                    error: file_type is required
                invalidFileType:
                  summary: Unsupported file type
                  value:
                    error: 'file_type must be one of: parquet, csv'
                invalidDate:
                  summary: Invalid date
                  value:
                    error: date must use YYYY-MM-DD format
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Forbidden with an empty response body. The authenticated user does
            not have permission to access the requested account or endpoint.
        '404':
          description: >-
            No eligible export exists. An exact-date request includes the
            closest completed snapshot date, or null when no completed snapshot
            exists. A request without a date returns only the error message.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DatasetDateNotFoundError'
                  - $ref: '#/components/schemas/DatasetNoCompletedExportError'
              examples:
                exactDateMissing:
                  summary: Exact date unavailable
                  value:
                    error: No properties export exists for 2026-07-20
                    closest_available_dataset_date: '2026-07-21'
                noCompletedExport:
                  summary: No completed export
                  value:
                    error: No completed properties export exists
        '409':
          description: >-
            The exact-date export exists but is pending or actively processing.
            Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: The properties export for 2026-07-21 is still processing
        '429':
          description: >-
            A general API rate limit or account trial API quota was exceeded.
            For a trial quota response, quota_usage is the number of requests
            already counted and quota_limit is the account limit.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying when supplied by the active rate
                limiter.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Trial API quota limit exceeded
                quota_limit: 1000
                quota_usage: 1000
            text/plain:
              schema:
                type: string
              example: |
                You have exceeded the rate limit for this API.
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: >-
            The exact-date export could not be created, or the requested file is
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                generationFailed:
                  summary: Export generation failed
                  value:
                    error: >-
                      The properties export for 2026-07-21 could not be
                      generated
                fileUnavailable:
                  summary: Requested file unavailable
                  value:
                    error: The properties csv export for 2026-07-21 is unavailable
components:
  schemas:
    DatasetDownloadRequest:
      type: object
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        dataset:
          $ref: '#/components/schemas/DatasetType'
        file_type:
          $ref: '#/components/schemas/DatasetFileType'
        date:
          type: string
          format: date
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Optional exact snapshot date in YYYY-MM-DD format. Omit it to
            download the newest completed snapshot.
        redirect_to_download:
          type: boolean
          default: false
          description: >-
            Set to true to return a 303 redirect to the download URL instead of
            the default JSON response.
      required:
        - account_id
        - dataset
        - file_type
      additionalProperties: false
    DatasetDownloadResponse:
      type: object
      properties:
        dataset:
          $ref: '#/components/schemas/DatasetType'
        file_type:
          $ref: '#/components/schemas/DatasetFileType'
        dataset_date:
          type: string
          format: date
          description: Snapshot date selected for the download.
        download_url:
          type: string
          format: uri
          description: Private pre-signed download URL that expires after five minutes.
      required:
        - dataset
        - file_type
        - dataset_date
        - download_url
      additionalProperties: false
    Error:
      type: object
      description: Error response payload.
      properties:
        error:
          type: string
          description: Short error message.
        message:
          type: string
          description: Additional error details, when available.
        quota_limit:
          type: integer
          description: Quota limit that applied to the request, when relevant.
        quota_usage:
          type: integer
          description: Quota already used, when relevant.
      required:
        - error
      additionalProperties: true
    DatasetDateNotFoundError:
      type: object
      properties:
        error:
          type: string
          description: Exact snapshot date error.
        closest_available_dataset_date:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Closest completed snapshot date. Null when no completed snapshot
            exists.
      required:
        - error
        - closest_available_dataset_date
      additionalProperties: false
    DatasetNoCompletedExportError:
      type: object
      properties:
        error:
          type: string
          description: No completed export error.
      required:
        - error
      additionalProperties: false
    AccountId:
      anyOf:
        - type: integer
        - type: string
      description: ApartmentIQ account ID used to set the request account context.
    DatasetType:
      type: string
      enum:
        - properties
        - organizations
        - contacts
        - organization_properties
      description: Dataset snapshot to download.
    DatasetFileType:
      type: string
      enum:
        - parquet
        - csv
      description: Output file format.
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: An unexpected error occurred while processing the request.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````