casamundo api 1.2.1 (1)

59
CASAMUNDO API Documentation Release 1.2.1 CASAMUNDO GmbH, Drehbahn 7, 20354 Hamburg August 20, 2013

Upload: joseph-mami

Post on 31-Dec-2015

74 views

Category:

Documents


0 download

DESCRIPTION

cachier des charge

TRANSCRIPT

Page 1: Casamundo API 1.2.1 (1)

CASAMUNDO API DocumentationRelease 1.2.1

CASAMUNDO GmbH, Drehbahn 7, 20354 Hamburg

August 20, 2013

Page 2: Casamundo API 1.2.1 (1)
Page 3: Casamundo API 1.2.1 (1)

CONTENTS

1 Changelog 1

2 Introduction 52.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.5 HTTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.6 XML Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.7 Synchronisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Settings 93.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.5 Locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.6 Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.7 Lodging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.8 Availabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Facilities 134.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.3 Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.4 Geo data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.5 Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.6 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.7 Lodgings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.8 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Lodgings 195.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.3 Lodging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.4 Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.5 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.6 Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

i

Page 4: Casamundo API 1.2.1 (1)

5.7 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6 Weekly Availabilities 236.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.3 Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.4 Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

7 Daily Availabilities 257.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257.3 Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

8 Daily Prices 298.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298.3 Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308.4 Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

9 Extras / Discounts 319.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319.3 Extra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339.4 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339.5 Price . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349.6 Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

10 Seasons 3710.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3710.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

11 XML Schema (XSD) 3911.1 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3911.2 Facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4211.3 Lodgings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4611.4 Weekly Availabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4611.5 Daily Availabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4711.6 Daily Prices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4911.7 Extras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5011.8 Seasons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

ii

Page 5: Casamundo API 1.2.1 (1)

CHAPTER

ONE

CHANGELOG

1.2.1

• Extras: price attribute “calculation_level” added

1.2.0

• Extras: type “DISCOUNT” added

• Extras: boolean date attribute “fixed” replaced by enum attribute “coverage”

• Extras: “anticipation_days” restriction element added for last minute / early bird

1.1.0

Note: version 0.10.4 is stable and considered 1.0.0, therefore 1.0.0 is skipped

• Weekly Availabilities: individual changeover added

0.10.4

• Introduction: HTTP header recommendations added

0.10.3

• Facilities: example for encoded image URL added in XML

• Facilities: area and zip made optional

• Lodgings: name made optional

• Lodgings: new lodging types added: boat, castle, mobile home

• Lodgings: persons restricted (1 – 64)

• Lodgings: rooms restricted (positive byte, not 0), made optional

• Lodgings: floor restricted (-1 – 28)

• Lodgings: new criteria featured: detached house, no pets, smoker

• Images: priority fixed in XML schema (1 – 255)

• Images: clarify URL encoding in docs

• Daily Prices: persons restricted (1 – 64), considered max

• Weekly Availabilities: persons min/max restricted (1 – 64)

• Weekly Availabilities: clarify date range usage in docs

• Extras: min total made optional, don’t deliver if calculatable

1

Page 6: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

• Extras: amount now considerable as total price relative

• Extras: XML examples made more consistent

• Extras: persons min/max restricted (1 – 64)

• Extras: days min/max restricted (1 – 255), 28 max preferred

• Extras: age restricted (0 – 99)

• all: string (xs:token) lengths limited according to required state

0.10.2

• Weekly Availabilities: XML schema and examples fixed

• Extras: interval “STAY” deprecated, “NONE” introduced instead

0.10.1

• XML Schema added for all XML files

• Facilities: distance types added

• Lodgings: lodging types defined

• Extras: optional date restriction added

• attributes orderd in example XML

• documentation improved

0.10.0

• Prices, Extras, Weekly Availabilities: currency added to filenames

• Currencies: allow multiple currencies per language

• Appendix: Language and currency codes added, default currencies listed

0.9.0

• Versioning: changed and described within Introduction

• Changelog: added

• Introduction: About and Accessing the documentation written out

• Seasons: seasons.xml introduced, from_date and to_date added, season types removed

• Facilities: lodgings, units clarified, seasons made relation

• Lodgings: feature types in example XML adapted to Appendix list

0.85

• Appendix: list of feature keys added

• Facilities: lodgings listed in facilities.xml must occur only once

• Internals: first notes for Casamundo developers (not in PDF)

• Extras: age made own element, max age added

• Settings: availability renamed to availabilties in lodging element (1:n)

0.82

2 Chapter 1. Changelog

Page 7: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

• a lot of changes and initial notes

• first version to be handed out

3

Page 8: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

4 Chapter 1. Changelog

Page 9: Casamundo API 1.2.1 (1)

CHAPTER

TWO

INTRODUCTION

2.1 About

This documentation describes how to provide vacation lodgings and its related data for CASAMUNDOand its various platforms.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be in-terpreted as described in RFC 2119 (http://tools.ietf.org/html/rfc2119).

2.2 Access

The documentation is available as PDF and ZIP.

While the PDF is easy to distribute and access, the ZIP has

• each chapter as a restructuredText (rst) file,

• all XML examples as separate files, and

• separate XSD (XML schema) files for XML validation.

2.3 Versions

The CASAMUNDO API is under ongoing development. This document refers version 1.2.1.

The versioning follows the scheme [major].[minor].[patch].

A patch only fixes typos, clarifies things or improves structure and format of the documen-tation itself. Please use always the latest patch release of the API version you are workingwith.

A minor version change extends the existing API by new features without breaking com-patibility. That might be new XML elements, attributes or whole XML files, and using themwill always be optional.

A major version change introduces structural changes or new requirements that do breakcompatibility. In most cases that means you will have to modify the data export in order toadapt it to a new major version.

5

Page 10: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

Note: As from version 0.10.1, existing implementations are supported in longterms.

2.4 Files

The data are to provided in XML files, usually provided via HTTP.

Based on an URL like http://api.example.com/, the settings.xml should be provided within the rootdirectory. The other files must be placed within separate language folders, e. g.

|-- de| |-- availabilities_daily_eur.xml| |-- extras_eur.xml| |-- facilities.xml| |-- lodgings.xml| |-- prices_daily_eur.xml|-- en| |-- availabilities_daily_eur.xml| |-- availabilities_daily_gbp.xml| |-- extras_eur.xml| |-- extras_gbp.xml| |-- facilities.xml| |-- lodgings.xml| |-- prices_daily_eur.xml| |-- prices_daily_gbp.xml|-- seasons.xml|-- settings.xml

Example above: data in German (EUR) and English (EUR, GBP), availabilities on a daily base.

2.5 HTTP

To enable client-side caching, headers should contain Last-Modified and Content-Length:

HTTP/1.1 200 OKLast-Modified: Thu, 25 Apr 2013 06:52:17 GMTContent-Length: 286450

The usage of HTTP authentification is encouraged.

2.6 XML Requirements

The XML must match the following requirements:

• charset encoding: UTF-8

• line endings: can be either UNIX or DOS, must be consistent

• format: validated with tidy (indention: 2 spaces, no tabs)

• content:

6 Chapter 2. Introduction

Page 11: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

– validated against XML schema files, e. g. with xmllint

– only data for lodgings that are actually bookable

– HTML elements (where allowed) must be wrapped into <![CDATA[...]]>

Invalid XML is not supported.

2.7 Synchronisation

The imports at CASAMUNDO are done via cronjobs, each requesting data of one provider in onelanguage and currency.

Full imports cover all data delivered and are run every couple of nights (CET).

Availability imports update availabilities, prices and extras. Facilities and lodgings are kept as importedwith the lates full import. Availability imports are usually run every night (CET).

2.7. Synchronisation 7

Page 12: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

8 Chapter 2. Introduction

Page 13: Casamundo API 1.2.1 (1)

CHAPTER

THREE

SETTINGS

3.1 About

The settings.xml delivers meta information on:

• how the provided data are structured,

• what default values are used,

• and which API version the offer is refering to.

3.2 XML

A typical settings.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><settings>

<provider name="John Doe Travel Company"/><api>

<version>1.2</version></api><locales>

<locale language="DE" currency="EUR"/><locale language="EN" currency="EUR"/><locale language="EN" currency="GBP"/>

</locales><facility>

<lodgings>MULTIPLE</lodgings></facility><lodging seasons="true"><availabilities type="DAILY" changeover="MAP"/></lodging>

</settings>

3.3 Provider

The <provider name> attribute (string) contains the name of the company providing the data.

9

Page 14: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

3.4 API

The <version> (string) describes the version of the CASAMUNDO API reference implemented bythe provider. This document refers to version 1.2.1.

See Introduction Versions for details on how versions are referenced.

Note: The API version declared in settings.xml covers all XML files provided at a time.

3.5 Locales

The <locales> define languages and currencies that are delivered.

The following language codes are supported:

Code LanguageCZ CzechDE GermanEN EnglishES SpanishFR FrenchHU HungarianIT ItalianNL DutchPL PolishSK Slovakian

The currency codes must be ISO 4217 (http://en.wikipedia.org/wiki/ISO_4217) conform, e. g.:

Code CurrencyCZK Czech korunaEUR EuroGBP Pound sterlingPLN Polish zloty

The currencies declared in settings.xml must be referenced in some XML file names (lowercase):

• [language]/availabilities_daily_[currency].xml

• [language]/availabilities_weekly_[currency].xml

• [language]/extras_[currency].xml

• [language]/prices_daily_[currency].xml

The preferred currencies per language are:

10 Chapter 3. Settings

Page 15: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

Language Prefered currencyCZ CZKDE EUREN both EUR and GBPES EURFR EURHU EURIT EURNL EURPL PLNSK EUR

3.6 Facility

A <facility> can have have "MULTIPLE" lodgings or always equals a "SINGLE" one.

3.7 Lodging

The season attribute (boolean) must be "true" when one lodging (then called unit) is deliveredmultiple times, each for a different season.

3.8 Availabilities

There are two <availabilities type> options:

• delivered "DAILY", with changeover defined individually as "MAP", or

• delivered "WEEKLY", with default changeover one of "MON", "TUE", "WED", "THU","FRI", "SAT" or "SUN".

3.6. Facility 11

Page 16: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

12 Chapter 3. Settings

Page 17: Casamundo API 1.2.1 (1)

CHAPTER

FOUR

FACILITIES

4.1 About

Facilities are buildings of any kind that usually can’t be booked at whole. They contain bookablelodgings. There may be multiple lodgings within a facility.

4.2 XML

A typical facilities.xml has one <facilities> element that contains all facilities offered.

<?xml version="1.0" encoding="UTF-8"?><facilities>

<facility id="89" name="Villa del Sol"><geodata>

<location><country>ITALY</country><region>Amalfi Coast</region><area>Sorrento Coast</area><zip>80061</zip><place>Massa Lubrense</place>

</location><position>

<latitude>40.616667</latitude><longitude>14.35</longitude>

</position><distances>

<distance type="CITY">10000</distance><distance type="WATER">250</distance>

</distances><nearby>

<airport>Salerno Costa d’Amalfi Airport</airport><beach>Santa Croce</beach>

</nearby></geodata><descriptions>

<description type="FACILITY">An impressive, luxury villa situated in one of the most beloved areasand yet off to the landscape.

</description><description type="SURROUND">

Trees, mountains and a beach.

13

Page 18: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</description><description type="OTHER">

Children welcome! Playground, garden and pool. Babysitter on request.</description>

</descriptions><images>

<image priority="1" time_of_year="SUMMER" type="SURROUND"><url>http://example.com/images/47359_%5B1%5D.jpg?rev=5</url><title>

The beautiful Villa del Sol surrounded by wonderful mountains.</title>

</image><image priority="2" time_of_year="SUMMER">

<url>http://example.com/images/47359b.jpg</url><title>

The beautiful Villa del Sol surrounded by wonderful mountains.</title>

</image></images><lodgings>

<unit id="152"><lodging season_id="2012" id="152A"></lodging><lodging season_id="2013" id="152N"></lodging>

</unit><unit id="47">

<lodging season_id="2012" id="47A"></lodging><lodging season_id="2013" id="47N"></lodging>

</unit><unit id="734">

<lodging season_id="2012" id="734A"></lodging><lodging season_id="2013" id="734N"></lodging>

</unit></lodgings>

</facility></facilities>

4.3 Facility

The <facility id> (([a-zA-Z0-9.-])+) must be unique.

The facility name (string) is mandatory.

4.4 Geo data

4.4.1 Location

The <location> element is mandatory and must contain a <country>, a <region> and a<place> with non-empty strings.

The elements <area> and <zip> are optional.

All location names must be delivered in a consistent manner.

14 Chapter 4. Facilities

Page 19: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

4.4.2 Position

The <position> should be fully delivered, but may be delivered as emtpy element.

Both <latitude> and <longitude> (decimal) must be defined in WGS 84:

• latitude: "-90.0" – "90.0", and

• longitude: "-180.0" – "180.0".

4.4.3 Distances

The <distances> element may be delivered emtpy, or it must contain <distance> elements givenin meter and covering some or all types:

Type Description ofAIRPORT airportCITY nearest townFISHING fishing possibilitiesRESTAURANT restaurant, barSHOPPING shopping facilitiesSKIING skiing facilitiesWATER water (sea, lake)

4.4.4 Nearby

The <airport> and <beach> elements (both string) name the closest airport or beach. Both may beomitted.

4.5 Descriptions

The <descriptions> element is required, but it may be empty. It contains <description>elements with text and a type of:

Type Description ofFACILITY the facility in general, without lodging specific detailsSURROUND infrastructure and attractions within the areaVIEW visual impressions one cat get from the facilityDISTANCES distances to relevant points not listed in <distances>OTHER anything else that might be relevant (facility level only!).

Descriptions delivered with facilities must not be duplicated within its lodgings.

HTML elements allowed: <ul>, <li>, <br>, <b>, <strong>, <i>, <em>, <p>, <div>, all with-out style, if descriptions are wrapped in <![CDATA[...]]> sections.

4.6 Images

Images of the following formats are accepted: jpg/jpeg, png, gif.

4.5. Descriptions 15

Page 20: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

The image <url> must be encoded according to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html),thus characters like [ or ] must be replaced by %5B respectively %5D. It is recommended to replace +signs by %2B as well, even through not required by RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html).

The time_of_year can be "WINTER" or "SUMMER".

A priority ("1" – "255") should be used to sort images, starting by "1" for the first image to bedisplayed.

The image type (enumeration) can be one of:

INDOOR inside the buildingOUTDOOR around the building (default non-indoor)SURROUND sights and activities in the areaVIEW landscapesGROUNDPLAN a ground planSKIPLAN a ski plan

Images delivered with facilties must not be duplicated within lodgings.

4.7 Lodgings

The <lodgings> element contains all <lodging> references of a facility with their id.

<lodgings><lodging id="152"></lodging><lodging id="47"></lodging><lodging id="734"></lodging>

</lodgings>

Each lodging id (([a-zA-Z0-9.-])+) must be unique throughout all lodgings of all facilities.

4.8 Units

Some providers deliver the same lodging multiple times, once for a season such as a year or summer andwintertime.

If at least some lodgings of a provider are “duplicated” by seasons (see settings.xml), all facilities<lodgings> must be grouped into units:

A <unit> is an abstract lodging which describes the actual room, apartment or studio but does not takeseasons into account yet. Its <lodging> elements refer to the Seasons via the season_id.

Here is an example of how units and lodgings with seasons are listed:

<lodgings><unit id="152">

<lodging season_id="2012" id="152A"></lodging><lodging season_id="2013" id="152N"></lodging>

</unit><unit id="47">

<lodging season_id="2012" id="47A"></lodging><lodging season_id="2013" id="47N"></lodging>

</unit><unit id="734">

16 Chapter 4. Facilities

Page 21: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<lodging season_id="2012" id="734A"></lodging><lodging season_id="2013" id="734N"></lodging>

</unit></lodgings>

The unit id (([a-zA-Z0-9.-])+) must be unique within one facility.

4.8. Units 17

Page 22: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

18 Chapter 4. Facilities

Page 23: Casamundo API 1.2.1 (1)

CHAPTER

FIVE

LODGINGS

5.1 About

Lodgings are bookable objects. A lodging always belongs to one facility.

5.2 XML

A typical lodgings.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><lodgings>

<lodging id="152A" facility_id="89" name="Apartment A" type="APARTMENT"stars="4" floor="1"><capacity>

<size>105</size><persons min="2" max_with_children="8">6</persons><rooms sleeping="2" bath="2" other="2">6</rooms><cots>2</cots>

</capacity><features>

<feature type="GARAGE"></feature><feature type="AIRCON"></feature><feature type="TELEV"></feature><feature type="MICROW"></feature><feature type="DISHW"></feature>

</features><descriptions>

<description type="LODGING">First floor, first class. Lodging with terrace, kitchen, two bathroomsand camin.

</description></descriptions><images>

<image priority="1" time_of_year="SUMMER" type="INDOOR"><url>http://example.com/images/47360.jpg</url><title>The living room with wooden terrace.</title>

</image><image priority="2" time_of_year="SUMMER" type="OUTDOOR">

<url>http://example.com/images/47361.jpg</url><title>The beautiful garden, with sunflowers.</title>

</image></images>

19

Page 24: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</lodging></lodgings>

5.3 Lodging

The id (([a-zA-Z0-9.-])+) is mandatory must be unique over all lodgings of one provider. A lodgingmay have the same id as its facility.

Delivering a name (string) is recommended.

The lodging type (enumeration) must be one of:

Type MeaningAPARTMENT apartment, holiday flatBOAT boatCASTLE castleFARMHOUSE farm house, farm holidaysHOLIDPARK holiday parkHOTEL hotelHOUSE holiday house, vacation homeMOBILEHOME mobile homeVILLA villa, country residence

Optional attributes are stars ("1" – "5") and floor ("-1" – "28").

5.4 Capacity

5.4.1 Size

The <size> (unsigned short, in m²) is optional, but preferably should be provided.

5.4.2 Persons

The <persons> element ("1" – "64") gives the maximum amount of grown-up persons that gener-ally can book a lodging. Periods with fewer persons are allowed.

The maximum amount of persons including children must be given via the max_with_childrenattribute ("1" – "64"). The value can be the same as the <persons> element itself, but must not belower.

The min amount of persons ("1" – "64") must always be delivered. It may equal the maximumamount, but may not be higher.

5.4.3 Rooms

The <rooms> element (positive byte) gives the total amount of rooms a lodging has. It may be left outif the amount of rooms is unknown, but should be delivered.

Rooms can be specified by the attributes sleeping, bath and other (all unsigned byte, including0). If all three are delivered, they must sum up to the total amount of rooms.

20 Chapter 5. Lodgings

Page 25: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

5.4.4 Cots

The amount of <cots> (unsigned byte) is optional, but should be provided if possible.

5.5 Features

The <features> element is required, but it may be empty. It contains a set of <feature> declara-tions, each naming a type (enumeration) of:

Type FeatureAIRCON airconditionBARBEC barbecueBOAT boatDETACHD detached (free-standing) houseDISHW dishwasherFIREPL fireplaceFISHING fishingGARAGE garageGOLF golfGROUND private groundHANDACC handicapped accessibleINTERN internetMICROW microwaveNPETS no petsNSMOKE non smokerPETS petsSAUNA saunaSKIING skiingSMOKE smokerSOLAR solariumSWPOOL swimming poolTELEV televisionTENNIS tennisTERRACE terraceWASHM washing machineWATER water (sea, lake)

5.6 Descriptions

The <descriptions> element is required, but it may be empty. It contains a set of<description> (string) elements of a type (enumeration):

5.5. Features 21

Page 26: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

Type Description ofLODGING Lodging specific details without repeating general facility info.VIEW Visual impressions one cat get from the lodging.COSTS General info on extra or inclusive costs.EXTRA Costs that are non-obligatory and non-inclusive.INCLUSIVE Costs that are already included in the base price.DEPOSIT A deposit note (with currency), may contain details.DISCOUNT Discounts that are offered and their conditions.BOOKING Booking relevant information.OTHER Anything else that might be relevant.

HTML elements allowed: <ul>, <li>, <br>, <b>, <strong>, <i>, <em>, <p>, <div>, all with-out style, if descriptions are wrapped in <![CDATA[...]]> sections.

Descriptions already delivered with a facility must not be repeated within its lodging.

5.7 Images

The <images> element within a <lodging> has the same structure as the one used in Facilities.

Images already delivered with a facility must not be repeated within its lodging.

22 Chapter 5. Lodgings

Page 27: Casamundo API 1.2.1 (1)

CHAPTER

SIX

WEEKLY AVAILABILITIES

6.1 About

Weekly Availabilities define vacancies and prices for lodgings on a weekly base.

For daily availabilities to be imported, <availabilities type="WEEKLY"> must be declaredwithin the Settings.

6.2 XML

A typical availabilties_weekly_[currency].xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><availabilities>

<lodging id="152A"><availability type="VACANT" from_date="2012-02-11" to_date="2012-03-27">

<price persons_min="2" persons_max="2">840</price><price persons_min="3" persons_max="4">1050</price><price persons_min="5" persons_max="6">1260</price>

</availability><availability type="VACANT" from_date="2012-04-08" to_date="2012-04-15">

<price persons_min="4" persons_max="4">1400</price><price persons_min="5" persons_max="5">1540</price><price persons_min="6" persons_max="6">1680</price>

</availability></lodging><lodging id="47A" changeover="SUN"><availability type="REQUEST" from_date="2012-02-01" to_date="2012-04-15">

<price persons_min="2" persons_max="2">1330</price><price persons_min="3" persons_max="4">1540</price>

</availability><availability type="VACANT" from_date="2012-04-16" to_date="2012-04-30">

<price persons_min="2" persons_max="2">1540</price><price persons_min="3" persons_max="4">1750</price>

</availability></lodging>

</availabilities>

23

Page 28: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

6.3 Availability

Each <lodging> element can have multiple <availability> declarations.

Optionally, its changover attribute may overwrite the general changeover defined within the Settings.

The date range defined with from_date and to_date (date) must not intersect with other<availability> date ranges of the same lodging.

The to_date is considered as the last possible day of a week-based stay including the night, thusdeparture will usually be on the day after.

Date ranges delivered must cover at least one week (considering the changeover day). They don’t needto represent single weeks and should cover date ranges as long as possible. Both from_date andto_date do not need to be actual changeover days.

The type (enumeration) must be either "VACANT" or "REQUEST".

6.4 Price

Each <availability> must have at least one <price> (decimal).

The currency is the one given with the filename.

The persons_min and persons_max attributes ("1" – "64") are mandatory and define the personrange the price is valid for.

Prices are always understood as total price per week, not by one person.

Extras / Discounts must be defined separately.

24 Chapter 6. Weekly Availabilities

Page 29: Casamundo API 1.2.1 (1)

CHAPTER

SEVEN

DAILY AVAILABILITIES

7.1 About

Daily availabilities contain vacancy, changeover and minstay information for a lodging.

For daily availabilities to be imported, <availabilities type="DAILY"> must be declaredwithin the Settings.

7.2 XML

A typical availabilties_daily.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><availabilities type="DAILY"><availability lodging_id="152A">

<from_date>2012-02-21</from_date><vacancy type="PER_DAY">00000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111000000000001111111111111111111111111111111111111111000000000000000011100111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000111111111111111111111111110000000000000

</vacancy><changeover type="ALL_DAYS">1</changeover><minstay type="ALL_DAYS">A</minstay>

</availability><availability lodging_id="152N">

<from_date>2013-01-01</from_date><vacancy type="PER_DAY">0000000011111111111111111111111111111111111000000001111111111111111111110001111111111111111111111111100111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

</vacancy><changeover type="ALL_DAYS">1</changeover><minstay type="ALL_DAYS">A</minstay>

</availability><availability lodging_id="47A">

<from_date>2012-02-21</from_date><vacancy type="ALL_DAYS">2</vacancy><changeover type="ALL_DAYS">1</changeover>

25

Page 30: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<minstay type="ALL_DAYS">A</minstay></availability><availability lodging_id="47N"><from_date>2013-01-01</from_date><vacancy type="ALL_DAYS">2</vacancy><changeover type="ALL_DAYS">1</changeover><minstay type="ALL_DAYS">A</minstay>

</availability><availability lodging_id="734A"><from_date>2012-02-21</from_date><vacancy type="PER_DAY">

00000000000000000000000000000000000000000000000011100000001111111000000000000000000000000000000000111111111000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000001111111111111111111111111111111111111111111111100000000000000000001110000000000000

</vacancy><changeover type="PER_DAY">

11111111111111111111111111111111111111111111111111111111111111111111111111111111111000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

</changeover><minstay type="PER_DAY">

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

</minstay></availability><availability lodging_id="734N">

<from_date>2013-01-01</from_date><vacancy type="PER_DAY">

0000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

</vacancy><changeover type="PER_DAY">

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

</changeover><minstay type="PER_DAY">

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

</minstay></availability>

</availabilities>

26 Chapter 7. Daily Availabilities

Page 31: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

7.3 Availability

Each lodging may have only one availability entry, so the lodging_id (see Lodgings) must be uniqueover all daily availabilities .

The <vacancy>, <changeover> and <minstay> elements contain maps that represent statusinformation by day, starting with <from_date>.

If one of those maps would be the same character repeated by every day, those must be grouped to onecharacter using the type="ALL_DAYS" with only one character. Otherwise it’s type="PER_DAY".

The map length (amount of days) must be equal for all three maps.

7.3.1 Vacancy

The <vacancy> map consists of chars describing how days are available.

char vacancy0 not available1 available2 on request only

7.3.2 Changeover

The <changeover> map consists of chars describing which days are valid for arrival and departure.

char change0 no change at all1 arrival and departure2 arrival only3 departure only

7.3.3 Minstay

The <minstay> map consists of chars describing how many days must be booked at least, dependingon the day the residence begins.

char daysA 1B 2C 3. .. .Z 26

7.3. Availability 27

Page 32: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

28 Chapter 7. Daily Availabilities

Page 33: Casamundo API 1.2.1 (1)

CHAPTER

EIGHT

DAILY PRICES

8.1 About

Daily prices are delivered for lodgings booked with Daily Availabilities.

This chapter is about daily prices only. Prices for weekly booked lodgings are embedded into WeeklyAvailabilities.

For daily prices to be imported, <availabilities type="DAILY"> must be declared within theSettings.

8.2 XML

A typical prices_daily_[currency].xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><prices>

<lodging id="152A"><period date_from="2012-02-01" date_to="2012-03-31">

<price persons="2">120</price><price persons="4">150</price><price persons="6">180</price>

</period><period date_from="2012-04-01" date_to="2012-04-15">

<price persons="4">200</price><price persons="5">220</price><price persons="6">240</price>

</period></lodging><lodging id="47A">

<period date_from="2012-02-01" date_to="2012-04-15"><price persons="2">190</price><price persons="4">220</price>

</period><period date_from="2012-04-16" date_to="2012-04-30">

<price persons="2">220</price><price persons="4">250</price>

</period></lodging>

</prices>

29

Page 34: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

8.3 Period

Each lodging may have multiple periods with prices that can be defined for multiple persons.

A <period> is described by date_from and a (never earlier) date_to (date). The date range mustbe distinct from all other period’s of the same lodging.

Periods should be sorted towards the future, and should not have the same prices as precedentperiods.

8.4 Price

Each <period> must have at least one <price> (decimal).

The currency is the one given with the filename.

Prices can be defined in multiple steps within a <period>, depending on the number of persons ("1"– "64").

The persons (mandatory attribute) given for one <price> are always considered as max persons forthat amount.

Within a <lodging> element, no prices should be defined for persons lower than the general minpersons defined within the lodging itself.

Prices are always understood as total price per day, not by one person.

Extras / Discounts must be defined separately.

30 Chapter 8. Daily Prices

Page 35: Casamundo API 1.2.1 (1)

CHAPTER

NINE

EXTRAS / DISCOUNTS

9.1 About

Extras are side costs and additional offers. They must be delivered separately to ensure a total pricefor a booking can be offered, with details on how the price is composed.

Discounts are extras that apply under certain restrictions, and whose amount is subtracted from thetotal price.

9.2 XML

A typical extras_[currency].xml looks like this:

<?xml version="1.0" encoding="UTF-8"?><extras>

<lodging id="152A"><extra name="Final cleaning" type="CLEANING" mandatory="true" inclusive="false"><restrictions>

<persons min="2" max="5"/></restrictions><price paid_on_spot="true">

<interval>NONE</interval><unit>PERSON</unit><amount min_total="80">20</amount>

</price><descriptions>

<summary>Final cleaning: C20.00 per person, with C80.00 minimum for all.

</summary></descriptions>

</extra><extra name="Final cleaning" type="CLEANING" mandatory="true" inclusive="false"><restrictions>

<persons min="6" max="6"/></restrictions><price paid_on_spot="true">

<interval>NONE</interval><unit>PERSON</unit><amount>25</amount>

</price><descriptions>

<summary>Final cleaning: C25.00 per person.</summary>

31

Page 36: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</descriptions></extra><extra name="Extra bed" type="OTHER" mandatory="false" inclusive="false">

<restrictions/><price paid_on_spot="false">

<interval>DAY</interval><unit>BED</unit><amount>10</amount>

</price><descriptions>

<note>Bedlinen included.</note><summary>Extra bed: C10.00 each bed per day (bedlinen included).</summary>

</descriptions></extra><extra name="Visitor’s tax" type="TAX" mandatory="true" inclusive="false">

<restrictions><age min="16" max="99"/><days min="1" max="7"/>

</restrictions><price paid_on_spot="true">

<interval>DAY</interval><unit>PERSON</unit><amount>2.5</amount>

</price><descriptions>

<note>No tax to be paid for children up to 15 years.</note><summary>

Local taxes: C2.50 per person (included for children up to 15 years).</summary>

</descriptions></extra><extra name="Visitor’s tax" type="TAX" mandatory="true" inclusive="false">

<restrictions><age min="16" max="99"/><days min="8" max="28"/>

</restrictions><price paid_on_spot="true"><interval>DAY</interval><unit>PERSON</unit><amount>2.0</amount>

</price><descriptions>

<note>No tax to be paid for children up to 15 years.</note><summary>

Local taxes: C2.00 per person (included for children up to 15 years).</summary>

</descriptions></extra><extra name="Short stay charge" type="OTHER" mandatory="true" inclusive="false"><restrictions>

<days min="1" max="4"/><date from="2013-04-01" to="2013-09-30" coverage="full"/>

</restrictions><price paid_on_spot="false">

<interval>NONE</interval><unit>BOOKING</unit><amount relative="true">33.33</amount>

32 Chapter 9. Extras / Discounts

Page 37: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</price><descriptions>

<summary>Short stay extra charge 33.33 % on total price.</summary></descriptions>

</extra><extra name="Last Minute Discount" type="DISCOUNT" mandatory="false" inclusive="false">

<restrictions><anticipation_days min="0" max="3"/>

</restrictions><price paid_on_spot="false" calculation_level="1">

<interval>NONE</interval><unit>BOOKING</unit><amount relative="true">50.0</amount>

</price><descriptions>

<summary>Last minute discount: 50 % off for bookings up to 3 days before begin.</summary></descriptions>

</extra></lodging>

</extras>

9.3 Extra

Each lodging may have multiple <extra> declarations.

The name (string) must be translated into the right language. It should be delivered if possible.

There must be a type (enumeration) defined as one of:

Type Costs related to ...BOARD meals (e. g. breakfast, half-board, full-board)CLEANING cleaning (e. g. final cleaning, intermediate cleaning)DEPOSIT depositDISCOUNT amount is subtracted from total price when restrictions applyOTHER everything not matching the other types (to be used as default)PET petsTAX taxes and public fees

The mandatory attribute (boolean) is required. It must be set to "true" for obligatory extras.

The inclusive (boolean) shall indicate whether an extra is already part of the total price which isdefined in Weekly Availabilities or Daily Prices. Both inclusive and exclusive extras are listed separatelyon CASAMUNDO to make prices more transparent and better comparable.

9.4 Restrictions

The <restrictions> element is mandatory, but may be left empty. It’s used to make apply an extracost for bookings matching certain conditions only.

9.3. Extra 33

Page 38: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

9.4.1 Persons

The <persons> attributes min and max ("1" – "64") define a persons range the extra is valid for.If an extra has different amounts for different person ranges, multiple extras must be delivered with theright ranges set. Both attributes must be set if the element is used.

9.4.2 Age

The <age> attributes min and max ("0" – "99") define an age range. Only persons matching thatage range are counted as person the extra may be applied on. Both attributes must be set if the elementis used.

9.4.3 Days

If the extra applies only for bookings with certain durations, the <days> element must be used to set arange of min and max (positive byte, usually not more than 28) days. Both attributes must be set if theelement is used. They may both have the same value.

9.4.4 Anticipation Days

The anticipation_days element allows specifying the min and max amount of days before thestart of the holiday. Only when a booking is made within that range, the discount (or extra) can apply.That way, last minute and early bird discounts can be defined.

9.4.5 Date

A <date> restriction limits the validity of an extra to a certain period, such as Seasons do for wholelodgings. The date given as to may equal from, but not be earlier.

The coverage attribute indicates, how from and to must be matched:

coverage holiday (accomodation) date range must ...fixed ... match exactly the date range of the extra / discountfull ... start and end within the extra / discount date rangebegin ... start within the extra / discount date rangeend ... end within the extra / discount date range

If the date coverage does not matter at all, omit the whole date element.

All three attributes must be set if the element is used.

9.5 Price

The <price> and all its child elements are mandatory. It must occur exactly one time within an extra.

The paid_on_spot attribute (boolean) must be "true" when the extra is to be paid on site (afterthe arrival, not in advance with the booking).

Optionally, a calculation_level (positive byte) may indicate at which stage of the price calcula-tion the extra or discount is to be considered. By default, items are taken into account at level “1”, thus

34 Chapter 9. Extras / Discounts

Page 39: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

directly added to / subtracted from the base price. The total price of level 1 will then become the baseprice for all items of level 2, and so on. The order of calculations is always relevant when there is atleast one relative amount to consider.

9.5.1 Interval

The <interval> defines the frequency an amount is due: every DAY, HOUR, WEEK or WEEKEND oronly once (NONE – no interval).

9.5.2 Unit

The <unit> defines the reference the amount is based on and to be multiplied with.

Unit Costs per ...APARTMENT apartmentBOOKING booking (should be used if no other unit applies)BASKET basketBED bed (if not DBLBED)BIKE bike, bicycleBOAT boatCAR carCHANGE change (bedlinen)CONSUMPT consumption (if not CUBMETER, KWHOUR, LITER, METER, SQRMETER)COURSE course (lesson, workshop)CUBMETER m³DBLBED double bedEXERTION exertionGAME gameHORSE horseITEM a named itemKILOGRAM kgKWHOUR kWhLITER lMETER mOBJECT objectPACKAGE packagePERSON person (will be directly applied to the number of persons booked)PET petROOM roomSQRMETER m²WASH wachingWAY way

9.5.3 Amount

The <amount> (decimal) of a price refers to its interval and its unit.

An amount can be marked as relative with relative="true". The amount will then be calculatedin percent of the total price (for all persons and the whole stay, without any other extras).

9.5. Price 35

Page 40: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

An amount may have a min_total amount (decimal) that always is used as charge for that extra, ifthe amount calculated by unit and interval would be lower. It should not be delivered if the calculatedamount is always valid. The min_total value is always considered absolute, even if the amount itselfis declared relative (see above).

9.6 Descriptions

The <descriptions> element is mandatory, but may be left empty.

A <note> (string) can be used to add details that are not yet covered by the structured informationgiven in the extra (such as: "bedlinen included" for unit "BED").

The <summary> (string) may outline the characteristics of an extra cost in a few words.

36 Chapter 9. Extras / Discounts

Page 41: Casamundo API 1.2.1 (1)

CHAPTER

TEN

SEASONS

10.1 About

Seasons can be used to deliver the same lodging several times, each with adaptions to the period oftime it is offered in. The lodgings are called unit when regarded season independent.

If seasons are used for any lodgings (which must be declared in the Settings), season ids are used to binda lodging to a season (see Facilities).

10.2 XML

The seasons itself are defined within a separate seasons.xml:

<?xml version="1.0" encoding="UTF-8"?><seasons>

<season id="A" from_date="2012-04-01" to_date="2012-09-30">Summer 2012</season><season id="B" from_date="2012-10-01" to_date="2013-03-31">Winter 2012/13</season>

</seasons>

The <season id> (([a-zA-Z0-9.-])+) must be unique over all seasons.

The to_date must not be earlier than the from_date of the same season.

The date ranges of different seasons may overlap as long as overlapping seasons are not refered bythe same lodging.

37

Page 42: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

38 Chapter 10. Seasons

Page 43: Casamundo API 1.2.1 (1)

CHAPTER

ELEVEN

XML SCHEMA (XSD)

The XML Schema (XSD) files should be used for validation and detailed reference.

11.1 Settings

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="settings">

<xs:complexType><xs:sequence>

<xs:element ref="provider" maxOccurs="1"/><xs:element ref="api" maxOccurs="1"/><xs:element ref="locales" maxOccurs="1"/><xs:element ref="facility" maxOccurs="1"/><xs:element ref="lodging" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="provider"><xs:complexType>

<!-- id is deprecated, invalid as of v1.0.0 --><xs:attribute name="id" use="optional" type="providerIdType"/><xs:attribute name="name" use="required" type="notEmptyStringType"/>

</xs:complexType></xs:element><xs:simpleType name="providerIdType">

<xs:restriction base="xs:NMTOKEN"><xs:minLength value="2" /><xs:maxLength value="50" />

</xs:restriction></xs:simpleType><xs:element name="api">

<xs:complexType><xs:sequence>

<xs:element ref="version" maxOccurs="1"/><!-- extensions are deprecated, probably invalid as of v1.0.0 --><xs:element ref="extensions" minOccurs="0" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="version">

<xs:simpleType>

39

Page 44: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:restriction base="xs:token"><xs:pattern value="1\.2"/><xs:pattern value="1\.2\.\d"/>

</xs:restriction></xs:simpleType>

</xs:element><xs:element name="extensions"><xs:complexType/>

</xs:element><xs:element name="locales"><xs:complexType>

<xs:sequence><xs:element ref="locale" maxOccurs="unbounded"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="locale">

<xs:complexType><xs:attribute name="currency" use="required">

<xs:simpleType><xs:restriction base="xs:NCName"><xs:enumeration value="CZK"/><xs:enumeration value="EUR"/><xs:enumeration value="GBP"/><xs:enumeration value="PLN"/>

</xs:restriction></xs:simpleType>

</xs:attribute><xs:attribute name="language" use="required">

<xs:simpleType><xs:restriction base="xs:NCName"><xs:enumeration value="CZ"/><xs:enumeration value="DE"/><xs:enumeration value="EN"/><xs:enumeration value="ES"/><xs:enumeration value="FR"/><xs:enumeration value="HU"/><xs:enumeration value="IT"/><xs:enumeration value="NL"/><xs:enumeration value="PL"/><xs:enumeration value="SK"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:complexType>

</xs:element><xs:element name="facility"><xs:complexType>

<xs:sequence><xs:element ref="lodgings" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="lodgings"><xs:simpleType>

<xs:restriction base="xs:token"><xs:enumeration value="SINGLE"/>

40 Chapter 11. XML Schema (XSD)

Page 45: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:enumeration value="MULTIPLE"/></xs:restriction>

</xs:simpleType></xs:element><xs:element name="lodging"><xs:complexType>

<xs:sequence><!-- deliver both only if weekly availabilities can not be calculated from daily availabilities --><xs:element ref="availabilities" maxOccurs="2"/>

</xs:sequence><xs:attribute name="seasons" use="required" type="booleanType"/>

</xs:complexType></xs:element><xs:element name="availabilities">

<xs:complexType><xs:attribute name="type" use="required" type="availabilitiesTypeType"/><xs:attribute name="changeover" use="required" type="availabilitiesChangeoverType"/>

</xs:complexType></xs:element><xs:simpleType name="availabilitiesTypeType">

<xs:restriction base="xs:token"><xs:enumeration value="DAILY"/><xs:enumeration value="WEEKLY"/>

</xs:restriction></xs:simpleType><xs:simpleType name="availabilitiesChangeoverType"><xs:restriction base="xs:token"><!-- use "MAP" for daily availabilities only --><xs:enumeration value="MAP"/><!-- use the weekday for weekly availabilities only --><xs:enumeration value="MON"/><xs:enumeration value="TUE"/><xs:enumeration value="WED"/><xs:enumeration value="THU"/><xs:enumeration value="FRI"/><xs:enumeration value="SAT"/><xs:enumeration value="SUN"/>

</xs:restriction></xs:simpleType><xs:simpleType name="booleanType">

<xs:restriction base="xs:NCName"><xs:enumeration value="TRUE"/><xs:enumeration value="FALSE"/><xs:enumeration value="true"/><xs:enumeration value="false"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType">

<xs:restriction base="xs:token"><xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.1. Settings 41

Page 46: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

11.2 Facilities

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="facilities">

<xs:complexType><xs:sequence>

<xs:element ref="facility" maxOccurs="unbounded"/></xs:sequence>

</xs:complexType></xs:element><xs:element name="facility">

<xs:complexType><xs:sequence>

<xs:element ref="geodata" maxOccurs="1"/><xs:element ref="descriptions" maxOccurs="1"/><xs:element ref="images" maxOccurs="1"/><xs:element ref="lodgings" maxOccurs="1"/>

</xs:sequence><xs:attribute name="id" use="required" type="idType"/><xs:attribute name="name" use="required" type="notEmptyStringType"/>

</xs:complexType></xs:element><xs:element name="geodata">

<xs:complexType><xs:sequence>

<xs:element ref="location" maxOccurs="1"/><xs:element ref="position" maxOccurs="1"/><xs:element ref="distances" maxOccurs="1"/><xs:element ref="nearby" minOccurs="0" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="location">

<xs:complexType><xs:sequence>

<xs:element ref="country" maxOccurs="1"/><xs:element ref="region" maxOccurs="1"/><xs:element ref="area" minOccurs="0" maxOccurs="1"/><xs:element ref="zip" minOccurs="0" maxOccurs="1"/><xs:element ref="place" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="country" type="notEmptyStringType"/><xs:element name="region" type="notEmptyStringType"/><xs:element name="area" type="limitedStringType"/><xs:element name="zip" type="limitedStringType"/><xs:element name="place" type="notEmptyStringType"/><xs:element name="position">

<xs:complexType><xs:sequence>

<xs:element ref="latitude" minOccurs="0" maxOccurs="1"/><xs:element ref="longitude" minOccurs="0" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element>

42 Chapter 11. XML Schema (XSD)

Page 47: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:element name="latitude"><xs:simpleType>

<xs:restriction base="xs:decimal"><xs:minInclusive value="-90.0"/><xs:maxInclusive value="90.0"/>

</xs:restriction></xs:simpleType>

</xs:element><xs:element name="longitude">

<xs:simpleType><xs:restriction base="xs:decimal">

<xs:minInclusive value="-180.0"/><xs:maxInclusive value="180.0"/>

</xs:restriction></xs:simpleType>

</xs:element><xs:element name="distances"><xs:complexType>

<xs:sequence><xs:element ref="distance" minOccurs="0" maxOccurs="5"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="distance">

<xs:complexType><xs:simpleContent>

<xs:extension base="xs:unsignedInt"><xs:attribute name="type" use="required">

<xs:simpleType><xs:restriction base="xs:NCName"><xs:enumeration value="AIRPORT"/><xs:enumeration value="CITY"/><xs:enumeration value="FISHING"/><xs:enumeration value="RESTAURANT"/><xs:enumeration value="SHOPPING"/><xs:enumeration value="SKIING"/><xs:enumeration value="WATER"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:extension>

</xs:simpleContent></xs:complexType>

</xs:element><xs:element name="nearby">

<xs:complexType><xs:sequence>

<xs:element ref="airport" minOccurs="0" maxOccurs="1"/><xs:element ref="beach" minOccurs="0" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="airport" type="limitedStringType"/><xs:element name="beach" type="limitedStringType"/><xs:element name="descriptions"><xs:complexType>

<xs:sequence>

11.2. Facilities 43

Page 48: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:element ref="description" minOccurs="0" maxOccurs="5"/></xs:sequence>

</xs:complexType></xs:element><xs:element name="description">

<xs:complexType><xs:simpleContent>

<xs:extension base="xs:string"><xs:attribute name="type" use="required">

<xs:simpleType><xs:restriction base="xs:NCName"><xs:enumeration value="FACILITY"/><xs:enumeration value="SURROUND"/><xs:enumeration value="VIEW"/><xs:enumeration value="DISTANCES"/><xs:enumeration value="OTHER"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:extension>

</xs:simpleContent></xs:complexType>

</xs:element><xs:element name="images">

<xs:complexType><xs:sequence>

<xs:element ref="image" minOccurs="0" maxOccurs="unbounded"/></xs:sequence>

</xs:complexType></xs:element><xs:element name="image">

<xs:complexType><xs:sequence>

<xs:element ref="url" maxOccurs="1"/><xs:element ref="title" minOccurs="0" maxOccurs="1"/>

</xs:sequence><!-- preview is listed here for backward compatibility only,

use priority instead --><xs:attribute name="preview" use="optional" type="booleanType"/><xs:attribute name="priority" use="optional" type="positiveByteType"/><!-- season is listed here for backward compatibility only,

use time_of_year instead --><xs:attribute name="season" use="optional" type="limitedStringType"/><xs:attribute name="time_of_year" use="optional">

<xs:simpleType><xs:restriction base="xs:NCName"><xs:enumeration value="SUMMER"/><xs:enumeration value="WINTER"/>

</xs:restriction></xs:simpleType>

</xs:attribute><xs:attribute name="type" use="optional"><xs:simpleType>

<xs:restriction base="xs:NCName"><xs:enumeration value="INDOOR"/><xs:enumeration value="OUTDOOR"/><xs:enumeration value="SURROUND"/>

44 Chapter 11. XML Schema (XSD)

Page 49: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:enumeration value="VIEW"/><xs:enumeration value="GROUNDPLAN"/><xs:enumeration value="SKIPLAN"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:complexType>

</xs:element><xs:element name="url" type="xs:anyURI"/><xs:element name="title" type="limitedStringType"/><xs:element name="lodgings">

<xs:complexType><xs:choice>

<xs:element ref="unit" maxOccurs="unbounded"/><xs:element ref="lodging" maxOccurs="unbounded"/>

</xs:choice><!-- deprecated, naming kind of seasons is not used --><xs:attribute name="seasons" use="optional" type="xs:token"/>

</xs:complexType></xs:element><xs:element name="unit">

<xs:complexType><xs:sequence>

<xs:element ref="lodging" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="id" use="required" type="idType"/>

</xs:complexType></xs:element><xs:element name="lodging">

<xs:complexType><xs:attribute name="id" use="required" type="idType"/><xs:attribute name="season_id" use="optional" type="idType"/>

</xs:complexType></xs:element><xs:simpleType name="idType"><xs:restriction base="notEmptyStringType">

<xs:pattern value="([a-zA-Z0-9.-])+"/></xs:restriction>

</xs:simpleType><xs:simpleType name="booleanType">

<xs:restriction base="xs:NCName"><xs:enumeration value="TRUE"/><xs:enumeration value="FALSE"/><xs:enumeration value="true"/><xs:enumeration value="false"/>

</xs:restriction></xs:simpleType><xs:simpleType name="positiveByteType">

<xs:restriction base="xs:unsignedByte"><xs:minInclusive value="1"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType">

<xs:restriction base="xs:token"><xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction>

11.2. Facilities 45

Page 50: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</xs:simpleType><xs:simpleType name="limitedStringType"><xs:restriction base="xs:token">

<xs:minLength value="0"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.3 Lodgings

11.4 Weekly Availabilities

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="availabilities">

<xs:complexType><xs:sequence>

<xs:element ref="lodging" maxOccurs="unbounded"/></xs:sequence><!-- type="WEEKLY" is deprecated --><xs:attribute name="type" use="optional" type="xs:token"/>

</xs:complexType></xs:element><xs:element name="lodging">

<xs:complexType><xs:sequence>

<xs:element ref="availability" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="id" use="required" type="idType"/><xs:attribute name="changeover" use="optional">

<xs:simpleType><xs:restriction base="xs:NCName">

<xs:enumeration value="MON"/><xs:enumeration value="TUE"/><xs:enumeration value="WED"/><xs:enumeration value="THU"/><xs:enumeration value="FRI"/><xs:enumeration value="SAT"/><xs:enumeration value="SUN"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:complexType>

</xs:element><xs:element name="availability">

<xs:complexType><xs:sequence>

<xs:element ref="price" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="from_date" use="required" type="xs:date"/><xs:attribute name="to_date" use="required" type="xs:date"/><xs:attribute name="type" use="required">

<xs:simpleType>

46 Chapter 11. XML Schema (XSD)

Page 51: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:restriction base="xs:NCName"><xs:enumeration value="VACANT"/><xs:enumeration value="REQUEST"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:complexType>

</xs:element><xs:element name="price"><xs:complexType>

<xs:simpleContent><xs:extension base="priceType">

<xs:attribute name="persons_max" use="required" type="personsType"/><xs:attribute name="persons_min" use="required" type="personsType"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:simpleType name="idType">

<xs:restriction base="notEmptyStringType"><xs:pattern value="([a-zA-Z0-9.-])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="priceType"><xs:restriction base="xs:decimal">

<xs:minExclusive value="0.0"/></xs:restriction>

</xs:simpleType><xs:simpleType name="personsType">

<xs:restriction base="xs:unsignedByte"><xs:minInclusive value="1"/><xs:maxInclusive value="64"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType">

<xs:restriction base="xs:token"><xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.5 Daily Availabilities

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="availabilities">

<xs:complexType><xs:sequence>

<xs:element ref="availability" maxOccurs="unbounded"/></xs:sequence><!-- type="DAILY" is deprecated --><xs:attribute name="type" use="optional" type="xs:token"/>

</xs:complexType></xs:element>

11.5. Daily Availabilities 47

Page 52: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:element name="availability"><xs:complexType>

<xs:sequence><xs:element ref="from_date" maxOccurs="1"/><xs:element ref="vacancy" maxOccurs="1"/><xs:element ref="changeover" maxOccurs="1"/><xs:element ref="minstay" maxOccurs="1"/>

</xs:sequence><xs:attribute name="lodging_id" use="required" type="idType"/>

</xs:complexType></xs:element><xs:element name="from_date" type="xs:date"/><xs:element name="vacancy"><xs:complexType mixed="true">

<xs:simpleContent><xs:extension base="vacancyType">

<xs:attribute name="type" use="required" type="perDayAllDaysType"/></xs:extension>

</xs:simpleContent></xs:complexType>

</xs:element><xs:element name="changeover">

<xs:complexType mixed="true"><xs:simpleContent>

<xs:extension base="changeoverType"><xs:attribute name="type" use="required" type="perDayAllDaysType"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:element name="minstay"><xs:complexType mixed="true"><xs:simpleContent>

<xs:extension base="minstayType"><xs:attribute name="type" use="required" type="perDayAllDaysType"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:simpleType name="idType">

<xs:restriction base="notEmptyStringType"><xs:pattern value="([a-zA-Z0-9.-])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="perDayAllDaysType">

<xs:restriction base="xs:token"><xs:enumeration value="ALL_DAYS"/><xs:enumeration value="PER_DAY"/>

</xs:restriction></xs:simpleType><xs:simpleType name="vacancyType">

<xs:restriction base="xs:normalizedString"><xs:pattern value="([012 ])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="changeoverType">

<xs:restriction base="xs:normalizedString">

48 Chapter 11. XML Schema (XSD)

Page 53: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:pattern value="([0123 ])+"/></xs:restriction>

</xs:simpleType><xs:simpleType name="minstayType">

<xs:restriction base="xs:normalizedString"><xs:pattern value="([A-Z ])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType"><xs:restriction base="xs:token">

<xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.6 Daily Prices

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="prices">

<xs:complexType><xs:sequence>

<xs:element ref="lodging" maxOccurs="unbounded"/></xs:sequence>

</xs:complexType></xs:element><xs:element name="lodging">

<xs:complexType><xs:sequence>

<xs:element ref="period" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="id" use="required" type="idType"/>

</xs:complexType></xs:element><xs:element name="period">

<xs:complexType><xs:sequence>

<xs:element ref="price" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="date_from" use="required" type="xs:date"/><xs:attribute name="date_to" use="required" type="xs:date"/>

</xs:complexType></xs:element><xs:element name="price">

<xs:complexType><xs:simpleContent>

<xs:extension base="priceType"><xs:attribute name="persons" use="required" type="personsType"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:simpleType name="idType">

<xs:restriction base="notEmptyStringType">

11.6. Daily Prices 49

Page 54: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:pattern value="([a-zA-Z0-9.-])+"/></xs:restriction>

</xs:simpleType><xs:simpleType name="priceType"><xs:restriction base="xs:decimal">

<xs:minExclusive value="0.0"/></xs:restriction>

</xs:simpleType><xs:simpleType name="personsType">

<xs:restriction base="xs:unsignedByte"><xs:minInclusive value="1"/><xs:maxInclusive value="64"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType"><xs:restriction base="xs:token">

<xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.7 Extras

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="extras">

<xs:complexType><xs:sequence>

<xs:element ref="lodging" maxOccurs="unbounded"/></xs:sequence>

</xs:complexType></xs:element><xs:element name="lodging">

<xs:complexType><xs:sequence>

<xs:element ref="extra" maxOccurs="unbounded"/></xs:sequence><xs:attribute name="id" use="required" type="idType"/>

</xs:complexType></xs:element><xs:element name="extra">

<xs:complexType><xs:sequence>

<xs:element ref="restrictions" maxOccurs="1"/><xs:element ref="price" maxOccurs="1"/><xs:element ref="descriptions" maxOccurs="1"/>

</xs:sequence>

<!-- the name will be required and notEmptyStringType as from 1.0.0 --><xs:attribute name="name" use="optional" type="limitedStringType"/>

<!-- booleans must be lowercase as of 1.0.0 --><xs:attribute name="inclusive" use="required" type="booleanType"/><xs:attribute name="mandatory" use="required" type="booleanType"/>

50 Chapter 11. XML Schema (XSD)

Page 55: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:attribute name="type" use="required"><xs:simpleType>

<xs:restriction base="xs:NCName"><xs:enumeration value="BOARD"/><xs:enumeration value="CLEANING"/><xs:enumeration value="DEPOSIT"/><xs:enumeration value="DISCOUNT"/><xs:enumeration value="OTHER"/><xs:enumeration value="PET"/><xs:enumeration value="TAX"/>

</xs:restriction></xs:simpleType>

</xs:attribute></xs:complexType>

</xs:element><xs:element name="restrictions">

<xs:complexType><xs:choice minOccurs="0" maxOccurs="5">

<xs:element ref="age" minOccurs="0" maxOccurs="1"/><xs:element ref="anticipation_days" minOccurs="0" maxOccurs="1"/><xs:element ref="date" minOccurs="0" maxOccurs="1"/><xs:element ref="days" minOccurs="0" maxOccurs="1"/><xs:element ref="persons" minOccurs="0" maxOccurs="1"/>

</xs:choice></xs:complexType>

</xs:element><xs:element name="persons">

<xs:complexType><xs:attribute name="max" use="required" type="personsType"/><xs:attribute name="min" use="required" type="personsType"/>

</xs:complexType></xs:element><xs:element name="age">

<xs:complexType><xs:attribute name="max" use="required" type="ageType"/><xs:attribute name="min" use="required" type="ageType"/>

</xs:complexType></xs:element><xs:element name="days">

<xs:complexType><xs:attribute name="max" use="required" type="positiveByteType"/><xs:attribute name="min" use="required" type="positiveByteType"/>

</xs:complexType></xs:element><xs:element name="anticipation_days">

<xs:complexType><xs:attribute name="max" use="required" type="xs:unsignedByte"/><xs:attribute name="min" use="required" type="xs:unsignedByte"/>

</xs:complexType></xs:element><xs:element name="date"><xs:complexType>

<!-- booleans must be lowercase as of 1.0.0 --><!--

fixed deprecated as of 1.2.0, use coverage attribute instead:fixed="true" => coverage="fixed"fixed="false" => coverage="full"

11.7. Extras 51

Page 56: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

//--><xs:attribute name="coverage" use="required" type="coverageType"/><xs:attribute name="fixed" use="optional" type="booleanType"/><xs:attribute name="from" use="required" type="xs:date"/><xs:attribute name="to" use="required" type="xs:date"/>

</xs:complexType></xs:element><xs:element name="price">

<xs:complexType><xs:sequence>

<xs:element ref="interval" maxOccurs="1"/><xs:element ref="unit" maxOccurs="1"/><xs:element ref="amount" maxOccurs="1"/>

</xs:sequence><!-- booleans must be lowercase as of 1.0.0 --><xs:attribute name="paid_on_spot" use="required" type="booleanType"/><xs:attribute name="calculation_level" use="optional" type="positiveByteType"/>

</xs:complexType></xs:element><xs:element name="interval">

<xs:simpleType><xs:restriction base="xs:NCName">

<xs:enumeration value="NONE"/><xs:enumeration value="DAY"/><xs:enumeration value="HOUR"/><!-- STAY is deprecated, use NONE instead --><xs:enumeration value="STAY"/><xs:enumeration value="WEEK"/><xs:enumeration value="WEEKEND"/>

</xs:restriction></xs:simpleType>

</xs:element><xs:element name="unit">

<xs:simpleType><xs:restriction base="xs:NCName">

<xs:enumeration value="APARTMENT"/><xs:enumeration value="BOOKING"/><xs:enumeration value="BASKET"/><xs:enumeration value="BED"/><xs:enumeration value="BIKE"/><xs:enumeration value="BOAT"/><xs:enumeration value="CAR"/><xs:enumeration value="CHANGE"/><xs:enumeration value="CONSUMPT"/><xs:enumeration value="COURSE"/><xs:enumeration value="CUBMETER"/><xs:enumeration value="DBLBED"/><!-- EACH is deprecated, use ITEM instead --><xs:enumeration value="EACH"/><xs:enumeration value="EXERTION"/><xs:enumeration value="GAME"/><xs:enumeration value="HORSE"/><xs:enumeration value="ITEM"/><xs:enumeration value="KILOGRAM"/><xs:enumeration value="KWHOUR"/><xs:enumeration value="LITER"/><xs:enumeration value="METER"/>

52 Chapter 11. XML Schema (XSD)

Page 57: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:enumeration value="OBJECT"/><xs:enumeration value="PACKAGE"/><xs:enumeration value="PERSON"/><xs:enumeration value="PET"/><xs:enumeration value="ROOM"/><xs:enumeration value="SQRMETER"/><xs:enumeration value="WASH"/><xs:enumeration value="WAY"/>

</xs:restriction></xs:simpleType>

</xs:element><xs:element name="amount">

<xs:complexType><xs:simpleContent>

<xs:extension base="priceType"><xs:attribute name="min_total" use="optional" type="priceType"/><xs:attribute name="relative" use="optional" type="xs:boolean"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:element name="descriptions"><xs:complexType>

<xs:sequence><xs:element ref="note" minOccurs="0" maxOccurs="1"/><xs:element ref="summary" minOccurs="0" maxOccurs="1"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="note" type="limitedStringType"/><xs:element name="summary" type="limitedStringType"/><xs:simpleType name="idType">

<xs:restriction base="notEmptyStringType"><xs:pattern value="([a-zA-Z0-9.-])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="priceType"><xs:restriction base="xs:decimal">

<xs:fractionDigits value="2"/><xs:minInclusive value="0.00"/>

</xs:restriction></xs:simpleType><xs:simpleType name="booleanType">

<xs:restriction base="xs:NCName"><xs:enumeration value="TRUE"/><xs:enumeration value="FALSE"/><xs:enumeration value="true"/><xs:enumeration value="false"/>

</xs:restriction></xs:simpleType><xs:simpleType name="coverageType"><xs:restriction base="xs:NCName">

<xs:enumeration value="fixed"/><xs:enumeration value="full"/><xs:enumeration value="begin"/><xs:enumeration value="end"/>

</xs:restriction>

11.7. Extras 53

Page 58: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

</xs:simpleType><xs:simpleType name="personsType">

<xs:restriction base="xs:unsignedByte"><xs:minInclusive value="1"/><xs:maxInclusive value="64"/>

</xs:restriction></xs:simpleType><xs:simpleType name="ageType"><xs:restriction base="xs:unsignedByte">

<xs:minInclusive value="0"/><xs:maxInclusive value="99"/>

</xs:restriction></xs:simpleType><xs:simpleType name="positiveByteType">

<xs:restriction base="xs:unsignedByte"><xs:minInclusive value="1"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType">

<xs:restriction base="xs:token"><xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType><xs:simpleType name="limitedStringType">

<xs:restriction base="xs:token"><xs:minLength value="0"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.8 Seasons

<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="seasons"><xs:complexType>

<xs:sequence><xs:element ref="season" maxOccurs="unbounded"/>

</xs:sequence></xs:complexType>

</xs:element><xs:element name="season">

<xs:complexType><xs:simpleContent>

<xs:extension base="xs:token"><xs:attribute name="id" use="required" type="idType"/><xs:attribute name="from_date" use="required" type="xs:date"/><xs:attribute name="to_date" use="required" type="xs:date"/>

</xs:extension></xs:simpleContent>

</xs:complexType></xs:element><xs:simpleType name="idType">

54 Chapter 11. XML Schema (XSD)

Page 59: Casamundo API 1.2.1 (1)

CASAMUNDO API Documentation, Release 1.2.1

<xs:restriction base="notEmptyStringType"><xs:pattern value="([a-zA-Z0-9.-])+"/>

</xs:restriction></xs:simpleType><xs:simpleType name="notEmptyStringType">

<xs:restriction base="xs:token"><xs:minLength value="1"/><xs:maxLength value="255"/>

</xs:restriction></xs:simpleType>

</xs:schema>

11.8. Seasons 55