Skip to content

Instantly share code, notes, and snippets.

@valexl
Last active June 7, 2018 17:42
Show Gist options
  • Save valexl/ad87ebd220ed35b22998410db06d6a88 to your computer and use it in GitHub Desktop.
Save valexl/ad87ebd220ed35b22998410db06d6a88 to your computer and use it in GitHub Desktop.
Minimum Content Validator
1) PublishedValidator
- published_at needs to be present
2) InstantlyBookableValidator
- rental needs to be instantly bookable
3) PhotosValidator
- minimal photo size is 7
4) StateValidator
for rentals from US we need state present
5) DescriptionValidator
- needs to be longer then 50 characters,
- can't contain only upcased letters
6) DescriptionLocalesValidator
- Rental's Headline, Summary and Description have to be translated into at least one language
7) AmenitiesValidator
- At least 5 airbnb amenities are required
- Essentials must be added for amentites
8) SummaryValidator
- Rental's summaries can't contain only upcased letters
- Rental's summaries can't be shorter than 50 characters
9) HeadlineValidator
- If headline is present - headlines can't be shorter than 8 characters
10) BedroomValidator
- Not enough bedrooms: at least one is required
- Bedroom details missing: at least one bed type required
11) AvailabilityValidator
- When rental is published and rental rates are present
- The listing does not have enough availability. The minimum is 30 days available for the next 12 months
12) DefaultDailyPriceValidator
- No future rates present, we need default daily price present
_________________________________
13) CancelationPolicyValidator
- cancellation Policy is missing
Property (Hotel)
1) HotelName - Name of the property as it should be displayed on Booking.com
optional - 2) HotelCode(HotelDescriptiveContent) - The unique property ID, as assigned by Booking.com upon creation of the property.
Required for existing properties.
optional - 3) ID(HotelDescriptiveContent) - The property ID as assigned by the provider upon creation of the property
4) ContactInfos
general
Names
Emails
Phones
PhysicalLocation
Addresses
Invoices
Names
Addresses
Emails
Phones
5) HotelInfo (may be optional)??
Room
1) HotelCode - The Booking.com property ID.
2) GuestRoom
Occupancy
RoomType (RentalType??)
Description
3) Amenities (optional)
AmenityCode
Value (required for some codes)
Configuration (required for bed types)
4) Description (optional)
LocalText - The room name, in the language specified in LocalText[@Language].
RatePlan
1) HotelCode - The Booking.com property ID.
2) RatePlan
RatePlanNotifType - Specifies the type of operation being performed on the rate plan. (Accepts: New, Overlay, Remove, Activate)
RatePlanID (optional) - The provider's custom ID for the rate plan. Only allowed when RatePlan[@RatePlanNotifType="New"]
Product
A combination of room rate, and policy details. This combined information is effectively what guests buy when they book a stay through the Booking.com website
1) PropertyID
2) RoomTypeID
3) RatePlanID
1) AddressValidator
- address1, city, country_code, zip
2) DescriptionValidator
- description can't be blank
- description has to have at least 400 chars
3) HeadlineValidator
- headline can't be blank
- headline has to have at least 20 chars
4) GeocodeValidator
- rental has to have info about geo code (lat + lng)
5) PhotosValidator
- rental has to have at least 6 pictures
6) BedroomValidator
- any not studio rentals have to have at least 1 bedroom
7) BathroomValidator
- rental has to have at least 1 bathroom
8) RentalTypeValidator
- rental type has to be set for rental
9) RatesValidator
- should be set at least 1 non zero rates
10) RentalAgreementValidator
- rental should be set rental aggreement for main lang (??? what should be in case of accounts support several languages)
11) CancelationPolicyValidator
- rental should be set rental_cancelation_policy
12) PayabilityValidator
- rental should allow either invoice payment or credit card
AddressValidator
- address1, city, country code, zip (required)
if post code is blank - it uses lat + lang to detect it + overwrite address, city, etc
can not be further than 250m from lat/lang
DescriptionValidator
- length 300 - 5000
HeadlineValidator
- length 1-80
GeocodedValidator
- it gets from address if lat and lang is blank
- can not be further than 250m from address
PhotosValidation
- only RGB colorspace (CMYK and other may produce some issues)
- The cover photo must not be portrait
- Max Photo dimensions allowed is 10000x10000
- Min resolution should be 640x480
BedroomValidation
- for studio can be 0
- maximum 50
BathroomValidator
value - 0/...
type - default uknown (there is not info about types)
RentalTypeValidator
Defaults to “house” if no valid type was available
Overrides “studio” type to “apartment” if there are more than zero bedrooms
Overrides any type to “studio” if there are zero
RatesValidator
Default Rate - Copies lowest seasonal rate when no default rate is provided.
MinimumStay(1/90) - When not provided, defaults to:
1 if nightly rate is provided.
7 if weekly rate if provided and no nightly rate is provided.
30 if monthly rate is provided and no nightly or weekly rate is provided
Nightly rate (10/) -
We also check if the rate is valid. We consider a rate valid when:
MinimumStay is less than 7 days and there is a weeknight rate, or
MinimumStay is less than 30 days and there is a weeknight or weekly rate, or
MinimumStay is less than 365 days and there is a weeknight, weekly, or monthly rate.
Weekly rate -
If min stay is between 7 and 29 days, weekly rate is required if no nightly rate is supplied. If min stay is 30 days or more, weekly rate is required if no nightly or monthly rate is supplied.
Must be lower than the monthly rate.
Required unless at least one of nightly or monthly rate is specified
Monthly rate (10/)
If min stay is 30 days or more, monthly rate is required if no nightly or weekly rate is supplied.
Ignored if minimum stay is lower than 30 days.
Required unless at least one of nightly or weekly rate is specified.
Weekend rate (10/)
Required if weekend dates are specified.
Must be lower than the weekly and monthly rates.
Required if weekend dates are specified.
Weekend days specified
Required if weekend rates are specified.
Allowed values, Friday, Saturday or Friday, Saturday, Sunday, or Saturday, Sunday or None
Start / end dates
Required for seasonal rates but not default rates.
Dates cannot overlap with other seasonal rates
1 day rates are permitted
RentalAgreementValidator
-
CancelationPolicyValidator
-
PayabilityValidator
-
OccupancyValidator
occupancy - 1/50 (max 50 min 1)
TouristLicenseAndExpiry
As of August 30th, required for: Cantabria (Spain), Balearic Islands (Spain), Catalunya (Spain), San Francisco (USA)
CurrencyValidator
Property will not be ingested if currency is not in this listone of: AUD, CAD, CHF, EUR, GBP, SEK, USD, THB, NZD
Required for property creation
ChangeoverDay
Defaults to flexible
Allowed values: flexible, or a day of the week
We don’t enforce checkout day, only checkin
FeesValidator
- Optional fees are ignored.
- Required if custom fee name or description exists
- Custom fee name (Defaults empty string)
- Custom fee description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment