---
agentTools:
  projectIndex: https://dtravel.readme.io/llms.txt
---

# List propertyTypes

Query all supported propertyTypes

# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "version": "v1",
    "title": "Dtravel OpenApi",
    "contact": {
      "name": "API Support",
      "email": "support@dtravel.com"
    },
    "x-logo": {
      "url": "./Logo.png",
      "backgroundColor": "#253237",
      "altText": "DTravel OpenApi"
    },
    "description": "# Introduction\nWelcome to the Dtravel OpenAPI! This API allows Dtravel users to create, update listings and reservations, read listing calendars, block and unblock calendar days.\n\nDtravel OpenAPI is JSON data format is used in both requests and responses bodies, only HTTPS protocol is allowed.\n\nPlease notice that:\n\n- All time values should be specified in UTC timezone (except for checkInTimeStart, checkInTimeEnd and checkOutTime fields of Listing object, which have to be specified in listing’s local timezone)\n\n- All country code values are ISO 3166-2 standard\n\n## Source header (X-source)\nEvery request to our APIs should include a custom header.\n\n```YAML\nX-source=partner_name\n```\n\n## Standard Response\nWe have the following data structure of response for the most of the endpoints:\n\n```JSON\n{\n   \"success\":true,\n   \"data\":[\n\n   ],\n   \"paging\":{\n      \"page\":1,\n      \"pageSize\":20,\n      \"total\":0,\n      \"totalPages\":0\n   }\n}\n```\n\n- **success** can be one of:\n  - true if case of no errors occurred or\n  - false in case of any error.\n- **data** contains endpoint result\n\n**paging** data - met in retrieve list responses\n  - **page**: page number\n  - **pageSize**: the maximum number of records retrieved per page\n  - **total**: count of all records with specified filters,\n  - **totalPages**: total pages number\n\n## Questions and bug reporting\n\nIf you have any questions regarding API, feel free to send them by email to support@dtravel.com.\n\nIf you ever notice a bug, please send a report to support@dtravel.com. Report should include cURL request with endpoint URL, time of the request with timezone, header, payload, response and expected result.\n\n\n## Changelog\n\n- **2022-08-01**: V1 is released\n- **2022-09-16**:\n  - **Create/update Listing:**\n    - Address object: doesn't support field \"**address**\" and require new fields: **country**, **countryCode**, **lat** and **lng**. The **address** field will be generated based on other fields.\n    - Price Object: Some fee and tax-related fields have been deprecated. To adjust fees and taxes, you should utilize different APIs.\n  - **Upload image:**\n    - Fix timeout while uploading many huge photos.\n    - Allow no more than 30 photos, each with a maximum file size of **25 MB**.\n  - **Update fee/tax setting:** change some required fields to optional fields.\n  - **Calendar:**\n    - Add API to support updating calendar by multi range of date.\n    - Support updating two additional fields: **closedOnArrival** and **closedOnDeparture**.\n    - Updating the base price also changes the price on the calendar.\n  - **Reservation:**\n    - Add support cancel reservation Api. Due to some limitation, this API only works when the reservation was booked with **STRIPE**, and it only marks the reservation as cancelled in our system with no refund.\n  - **Webhook Setting:** Add support create/get webhook setting APIs.\n  - **Update documentation:** Include more explanations, examples, and value constraints.\n- **2022-09-30**:\n  - Reservation Webhook payload:\n    - Convert **checkin_date** and **checkout_date** format to Date format\n    - Add fields: **origin_final_price** and **origin_currency**\n  - Add account APIs\n- **2023-05-11**:\n  - Update documentation to advise partners to use a source header\n"
  },
  "servers": [
    {
      "url": "https://openapi.dataismist.com/v1"
    },
    {
      "url": "https://openapi.dtravel.com/v1"
    }
  ],
  "tags": [
    {
      "name": "Listings",
      "description": "Listings are the core of the Dtravel platform. They are the places where guests can stay and hosts can list their space.\n"
    }
  ],
  "x-tagGroups": [
    {
      "name": "General",
      "tags": [
        "Authentication",
        "Listings",
        "Accounts",
        "Calendars",
        "Reservations",
        "Partner"
      ]
    },
    {
      "name": "Webhooks",
      "tags": [
        "Webhook",
        "ReservationWebhookModel"
      ]
    }
  ],
  "paths": {
    "/listings/property-types": {
      "get": {
        "summary": "List propertyTypes",
        "description": "Query all supported propertyTypes",
        "operationId": "propertytypes",
        "tags": [
          "Listings"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sample response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "default": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/PropertyTypesResponseDto"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PropertyTypeResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "apartment"
          }
        }
      },
      "PropertyTypesResponseDto": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PropertyTypeResponseDto"
        },
        "example": [
          {
            "id": 1,
            "name": "Dorm"
          },
          {
            "id": 2,
            "name": "Bed & Breakfast"
          },
          {
            "id": 3,
            "name": "House"
          },
          {
            "id": 4,
            "name": "Townhouse"
          }
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "default": false
          },
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "default": "Unexpected error"
              },
              "code": {
                "type": "string",
                "default": "BadRequestException"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "Contact Dtravel to retrieve clientId and clientSecret\n",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 251,
      "2": 169,
      "3": 186,
      "4": 214,
      "5": 213,
      "6": 238,
      "7": 0,
      "8": 37,
      "9": 32,
      "10": 60,
      "11": 221
    }
  }
}
````