@windingtree/wt-write-api
Version:
API to write data to the Winding Tree platform
585 lines • 18.9 kB
JSON
{
"title": "Hotel description",
"description": "Basic properties of a hotel",
"type": "object",
"required": [
"name",
"description",
"contacts",
"address",
"timezone",
"currency",
"defaultCancellationAmount"
],
"properties": {
"location": {
"description": "Geo-location in GPS format",
"title": "GPS location",
"type": "object",
"required": [
"latitude",
"longitude"
],
"properties": {
"latitude": {
"type": "number",
"format": "float",
"minimum": -3.402823669209385e+38,
"maximum": 3.402823669209385e+38
},
"longitude": {
"type": "number",
"format": "float",
"minimum": -3.402823669209385e+38,
"maximum": 3.402823669209385e+38
}
}
},
"name": {
"description": "Name of the hotel to display to users",
"title": "Entity name",
"type": "string",
"maxLength": 150
},
"website": {
"description": "URL of a hotel website",
"title": "URI",
"type": "string",
"format": "uri",
"maxLength": 1500
},
"description": {
"description": "Short text description of the hotel to show to users.",
"title": "Markdown description",
"type": "string",
"maxLength": 3000
},
"contacts": {
"type": "object",
"description": "A set of contacts",
"required": [
"general"
],
"properties": {
"general": {
"description": "Primary contact",
"title": "Contact",
"type": "object",
"properties": {
"email": {
"description": "E-mail contact",
"type": "string",
"format": "email",
"maxLength": 150
},
"phone": {
"description": "Phone number (with country prefix and a leading + sign)",
"type": "string",
"maxLength": 18,
"format": "phone"
},
"url": {
"description": "Url to the contact web page",
"type": "string",
"format": "uri"
},
"ethereum": {
"description": "Address of wallet on Ethereum",
"title": "Ethereum address",
"type": "string",
"maxLength": 300
},
"additionalContacts": {
"description": "More contact options, such as Whatsapp, WeChat, Telegram, twitter handle, facebook address. Once we see high demand for a particular type of contact, we can promote them to regular contact types.",
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"value"
],
"properties": {
"title": {
"description": "Name of this contact options",
"type": "string",
"maxLength": 100
},
"value": {
"description": "The actual contact",
"type": "string",
"maxLength": 100
}
}
}
}
}
}
}
},
"address": {
"title": "Postal address",
"description": "Based on output of Open Street Map's [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim). For formatting, take a look [here](https://github.com/OpenCageData/address-formatting).",
"type": "object",
"required": [
"road",
"houseNumber",
"city",
"countryCode"
],
"properties": {
"houseNumber": {
"type": "string",
"maxLength": 150
},
"road": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 150
},
"county": {
"type": "string",
"maxLength": 150
},
"stateDistrict": {
"type": "string",
"maxLength": 150
},
"state": {
"type": "string",
"maxLength": 150
},
"postcode": {
"type": "string",
"maxLength": 13
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "ISO 3166-1 alpha-2 codes",
"format": "country-code"
}
}
},
"roomTypes": {
"description": "Room types in the hotel",
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"description",
"occupancy",
"totalQuantity"
],
"properties": {
"id": {
"description": "ID of the room type",
"title": "ID",
"type": "string",
"maxLength": 100
},
"name": {
"description": "Name of the room type to show to users",
"title": "Entity name",
"type": "string",
"maxLength": 150
},
"description": {
"description": "Room type description in plain text",
"title": "Markdown description",
"type": "string",
"maxLength": 3000
},
"category": {
"type": "string",
"description": "Room category for easier filtering. These values are placeholder strings that are coincidentally in English and should be localized by the end user interface.",
"enum": [
"apartment",
"barn",
"boat",
"bungalow",
"bunk",
"cabin",
"condominium",
"double or twin room",
"double room",
"double room single use",
"duplex",
"lodge",
"other",
"penthouse",
"quadruple room",
"recreation vehicle",
"room",
"shared room",
"single room",
"studio",
"suite",
"teepee",
"tent",
"tree house",
"triple room",
"twin room",
"villa",
"yurt"
]
},
"totalQuantity": {
"type": "integer",
"format": "int32",
"minimum": -2147483648,
"maximum": 2147483647
},
"occupancy": {
"type": "object",
"required": [
"max"
],
"properties": {
"min": {
"type": "integer",
"format": "int32",
"description": "Minimal number of occupants to rent the room.",
"default": 1,
"minimum": -2147483648,
"maximum": 2147483647
},
"max": {
"type": "integer",
"format": "int32",
"description": "Maximal number of occupants to rent the room.",
"minimum": -2147483648,
"maximum": 2147483647
}
}
},
"amenities": {
"description": "Room products/services provided to guests. If a service is stated here, it is provided.",
"type": "array",
"items": {
"title": "Room amenity",
"description": "A service/product offered to guests on the room level for free. These values are placeholder strings that are coincidentally in English and should be localized by the end user interface.",
"type": "string",
"enum": [
"air conditioning",
"balcony",
"crib",
"free toiletries",
"free wi-fi",
"hairdryer",
"kitchen",
"minibar",
"private bathroom",
"safe deposit box",
"terrace",
"towels",
"tv",
"wheelchair accessible"
]
}
},
"tags": {
"description": "Free form textual tags that can describe the room. These can be eventually used for searching.",
"type": "array",
"items": {
"type": "string"
}
},
"images": {
"description": "Images. We don't process them in any way, so they should be in the best quality available and in a common format such as JPEG. As we don't have any tagging, the most important picture should come first.",
"type": "array",
"minItems": 0,
"maxItems": 30,
"uniqueItems": true,
"items": {
"description": "image uri",
"title": "URI",
"type": "string",
"format": "uri",
"maxLength": 1500
}
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "Date-time when the data was last changed. Used by consumers to handle incremental updates and caching."
}
}
}
},
"operator": {
"title": "Legal entity",
"type": "object",
"description": "A legal entity that can be held responsible",
"required": [
"name",
"address",
"contact"
],
"properties": {
"name": {
"description": "Entity's name as registered with the authorities",
"type": "string",
"maxLength": 300
},
"address": {
"description": "Entity's postal address as registered with the authorities",
"title": "Postal address",
"type": "object",
"required": [
"road",
"houseNumber",
"city",
"countryCode"
],
"properties": {
"houseNumber": {
"type": "string",
"maxLength": 150
},
"road": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 150
},
"county": {
"type": "string",
"maxLength": 150
},
"stateDistrict": {
"type": "string",
"maxLength": 150
},
"state": {
"type": "string",
"maxLength": 150
},
"postcode": {
"type": "string",
"maxLength": 13
},
"countryCode": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "ISO 3166-1 alpha-2 codes",
"format": "country-code"
}
}
},
"contact": {
"description": "Any way of contacting the entity",
"title": "Contact",
"type": "object",
"properties": {
"email": {
"description": "E-mail contact",
"type": "string",
"format": "email",
"maxLength": 150
},
"phone": {
"description": "Phone number (with country prefix and a leading + sign)",
"type": "string",
"maxLength": 18,
"format": "phone"
},
"url": {
"description": "Url to the contact web page",
"type": "string",
"format": "uri"
},
"ethereum": {
"description": "Address of wallet on Ethereum",
"title": "Ethereum address",
"type": "string",
"maxLength": 300
},
"additionalContacts": {
"description": "More contact options, such as Whatsapp, WeChat, Telegram, twitter handle, facebook address. Once we see high demand for a particular type of contact, we can promote them to regular contact types.",
"type": "array",
"items": {
"type": "object",
"required": [
"title",
"value"
],
"properties": {
"title": {
"description": "Name of this contact options",
"type": "string",
"maxLength": 100
},
"value": {
"description": "The actual contact",
"type": "string",
"maxLength": 100
}
}
}
}
}
},
"vatin": {
"description": "VAT identification number ([EU](https://en.wikipedia.org/wiki/VAT_identification_number), [US](https://www.irs.gov/individuals/international-taxpayers/taxpayer-identification-numbers-tin), or equivalents)",
"type": "string",
"maxLength": 50
},
"lei": {
"description": "Legal Entity Identifier as defined in ISO 17442, https://en.wikipedia.org/wiki/Legal_Entity_Identifier",
"type": "string",
"length": 20
}
}
},
"timezone": {
"title": "Timezone code",
"description": "Timezone name according to https://www.iana.org/time-zones (refer to zone.tab)",
"type": "string",
"maxLength": 40,
"format": "timezone"
},
"currency": {
"title": "Currency code",
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Three letter ISO 4217 currency code.",
"format": "currency-code"
},
"spokenLanguages": {
"description": "List of languages that people can use when communicating with this hotel.",
"type": "array",
"items": {
"title": "Language code",
"description": "Two letter language code based on ISO 639-1 standard",
"type": "string",
"format": "language-code",
"length": 2
}
},
"category": {
"description": "Hotel category for easier filtering. These values are placeholder strings that are coincidentally in English and should be localized by the end user interface.",
"type": "string",
"enum": [
"apartment",
"bed and breakfast",
"boat",
"cabin",
"camp",
"holiday home",
"hostel",
"hotel",
"house",
"inn",
"mobile home",
"motel",
"other",
"spa"
]
},
"images": {
"description": "Images. We don't process them in any way, so they should be in the best quality available and in a common format such as JPEG. As we don't have any tagging, the most important picture should come first.",
"type": "array",
"items": {
"title": "URI",
"description": "URI for linking resources. The maximal length is 1500 to save space.",
"type": "string",
"format": "uri",
"maxLength": 1500
}
},
"amenities": {
"description": "Hotel products/services provided to guests. If a service is stated here, it is provided.",
"type": "array",
"items": {
"title": "Hotel amenity",
"description": "A service/product offered to guests on the hotel level for free. These values are placeholder strings that are coincidentally in English and should be localized by the end user interface.",
"type": "string",
"enum": [
"24-hour front desk",
"airport shuttle",
"air conditioning",
"bar",
"disco",
"dry cleaning",
"free parking",
"free wi-fi",
"safe deposit box",
"kid´s day care",
"pets allowed",
"pool",
"restaurant",
"room service",
"spa services",
"tennis court",
"terrace",
"wake up service",
"wheelchair accessible"
]
}
},
"tags": {
"description": "Free form textual tags that can describe the hotel. These can be eventually used for searching.",
"type": "array",
"items": {
"type": "string"
}
},
"updatedAt": {
"type": "string",
"description": "Date-time when the data was last changed. Used by consumers to handle incremental updates and caching.",
"format": "date-time"
},
"defaultCancellationAmount": {
"type": "number",
"format": "float",
"description": "Cost of cancellation in percents of the final price, 100 means non refundable. This is a default amount of how much money will the hotel keep if no other cancallation policy is applicable.",
"minimum": -3.402823669209385e+38,
"maximum": 3.402823669209385e+38
},
"cancellationPolicies": {
"description": "A list of policies under which it is possible to cancel a reservation.",
"type": "array",
"items": {
"title": "Cancellation policy",
"type": "object",
"description": "What is the penalty when a guest/passenger wants to cancel a reservation.",
"required": [
"amount"
],
"properties": {
"from": {
"description": "After which date does this cancellation policy apply (including). If not present, this policy applies since the beginning of time. This is related to arrival and departure dates, not the date of the booking.",
"type": "string",
"format": "date"
},
"to": {
"description": "Before which date does this cancellation policy apply(including). If not present, this policy applies until the end of the universe. This is related to arrival and departure dates, not the date of the booking.",
"type": "string",
"format": "date"
},
"deadline": {
"type": "integer",
"description": "How many days before hotel arrival or flight departure does this first apply. If not present, this policy applies any time."
},
"amount": {
"type": "number",
"format": "float",
"description": "Cost of cancellation in percents of the final price, 100 means non refundable. This means how much money will the hotel keep.",
"minimum": -3.402823669209385e+38,
"maximum": 3.402823669209385e+38
}
}
}
}
}
}