Guest is the object that represents a person who will also use a reserved room, additionally to the customer.
| Resource | Description | 
|---|---|
| GET /v1/Guests | Get the stored data for all guests | 
| GET /v1/Guest/{id} | Get the stored data for a guest | 
| GET /v1/Guests/{reservationId} | Get the stored data for all guests of a reservation | 
| POST /v1/Guest | Add a new Guest | 
| PUT /v1/Guest | Update selected data of a guest | 
| DELETE /v1/Guest/{id} | Delete a guest | 
| Name | Type | Description | 
|---|---|---|
| id | int | Unique identifier of Guest | 
| firstName | string (100) | Guest's first name | 
| lastName | string (100) | Guest's last name | 
| lastName2 | string (100) | Guest's second last name | 
| dateOfBirth | date (YYYY-MM-DD) | Guest's date of birth | 
| idDocIssueDate | date (YYYY-MM-DD) | Date that the guest's identification document was issued | 
| idDocType | string (50) | Guest's identification document type identifier 1:Passport, 2:National ID, 3:Driving License, 4:National ID (other country), 5:Residence Permit, 6:Residence Permit (other country), 7:Foreigner ID, 8:Diplomatic Card Spanish police document types 1:PAS - Pasaporte, 2:NIF - Número de identificación fiscal, 5:NIE - Número de identidad de extranjero, 9:CIF - Código de identificación fiscal, 10:OTRO - Otro documento | 
| idDocNumber | string (50) | Guest's identification document number | 
| IdDocIssueCountryId | string (2) | Guest's identification document issue country code accordind to ISO 3166-1 alpha-2 | 
| IdDocExpirationDate | date (YYYY-MM-DD) | Guest's identification document expiration date | 
| nationalityCountryId | string (2) | Guest's nationality country code accordind to ISO 3166-1 alpha-2 | 
| provinceId | int | Unique identifier of guest's province | 
| isPrimaryGuest | int | Flag that shows if the guest is the primary one for a reservation or not (1/0) | 
| salutationId | int | Unique identifier of salutation message 1:Mr., 2:Mrs., 3:Ms., 4:Dr.(male), 5:Dr.(female) | 
| reservationId | int | Unique identifier of reservation | 
| string | Guest's e-mail | |
| phoneNumber | string | Guest's phone number | 
| phoneNumber2 | string | Guest's second phone number | 
| addressStreet | string | Guest's address | 
| addressStreetNumber | string | Guest's address street number | 
| addressZipCode | string | Guest's address zip code | 
| role | string | Guest role, values (TI – contract holder,VI – traveler) | 
| spanishProvinceCode | string (2) | Spanish province code | 
| spanishMunicipalityCode | string (3) | Spanish municipality code | 
| countryAlpha3Code | string (3) | Guest's nationality country code accordind to ISO 3166-1 alpha-3 | 
| residenceAlpha3Code | string (3) | Guest's identification document issue country code accordind to ISO 3166-1 alpha-3 | 
| supportDocNumber | string | Support document number | 
| relationshipToCustomer | string | Relathionship to the customer AB - Abuelo/a, BA - Bisabuelo/a, BN - Bisnieto/a, CD - Cuñado/a, CY - Cónyuge, HJ - Hijo/a, HR - Hermano/a, NI - Nieto/a, OT - Otro, PM - Padre o madre, SB - Sobrino/a, SG - Suegro/a, TI - Tío/a, TU - Tutor/a, YN - Yerno o nuera | 
Get the stored data for all Guests.
Request parameters
None
Response
The result is a list of Guest objects.
Example Response
<?xml version="1.0" ?>
<Guests>
<Guest>
    <Id>8</Id>
    <DateOfBirth>1990-06-03</DateOfBirth>
    <FirstName>Nicole</FirstName>
    <LastName>Kidman</LastName>
    <LastName2/>
    <IdDocType>1</IdDocType>
    <IdDocNumber>A12131</IdDocNumber>
    <IdDocIssueDate>2017-07-18</IdDocIssueDate>
    <IdDocExpirationDate>2026-01-12</IdDocExpirationDate>
    <IdDocIssueCountryId>GR</IdDocIssueCountryId>
    <NationalityCountryId>GR</NationalityCountryId>
    <ProvinceId>1599</ProvinceId>   
    <IsPrimaryGuest>1</IsPrimaryGuest>        
    <SalutationId>2</SalutationId> 
    <Email>test@hoteliga.com</Email> 
    <PhoneNumber>915111100</PhoneNumber> 
    <Role>VI</Role>
</Guest>
...
</Guests>
[
    {
        "id":8, 
        "dateOfBirth":"1990-06-03",
        "firstName":"Nicole",     
        "lastName":"Kidman",  
        "lastName2":"",    
        "idDocType":1, 
        "idDocNumber":"A12131",
        "idDocIssueDate":"2017-07-18",
        "idDocExpirationDate": "2026-01-12",  
        "idDocIssueCountryId": "GR",
        "nationalityCountryId": "GR",
        "provinceId":1599,
        "isPrimaryGuest" : 1,
        "salutationId":2,
        "email": "test@hoteliga.com",
        "phoneNumber": "915111100",
        "role": "VI"
    },
    ...
]
        
        
        Get the stored data for a guest.
Request parameters
| Name | Value | 
|---|---|
| id | The ID of the requested guest | 
Response
The result is a Guest object.
Example Response
<?xml version="1.0" ?>
<Guest>
    <Id>8</Id>
    <DateOfBirth>1990-06-03</DateOfBirth>
    <FirstName>Nicole</FirstName>
    <LastName>Kidman</LastName>
    <LastName2/>
    <IdDocType>1</IdDocType>
    <IdDocNumber>A12131</IdDocNumber>
    <IdDocIssueDate>2017-07-18</IdDocIssueDate>
    <IdDocExpirationDate>2026-01-12</IdDocExpirationDate>
    <IdDocIssueCountryId>GR</IdDocIssueCountryId>
    <NationalityCountryId>GR</NationalityCountryId>
    <ProvinceId>1599</ProvinceId>   
    <IsPrimaryGuest>1</IsPrimaryGuest>        
    <SalutationId>2</SalutationId>
</Guest>
{
    "id":8, 
    "dateOfBirth":"1990-06-03",
    "firstName":"Nicole",     
    "lastName":"Kidman",  
    "lastName2":"",    
    "idDocType":1, 
    "idDocNumber":"A12131",
    "idDocIssueDate":"2017-07-18",
    "idDocExpirationDate": "2026-01-12",  
    "idDocIssueCountryId": "GR",  
    "nationalityCountryId": "GR",
    "provinceId":1599,
    "isPrimaryGuest" : 1,
    "salutationId":2 
}
        
        
        Get the stored data for all guests of a reservation.
Request parameters
| Name | Value | 
|---|---|
| reservationId | Unique identifier of reservation. | 
Response
The result is a list of Guest objects.
Example Response
<?xml version="1.0" ?>
<Guests>
<Guest>
    <Id>8</Id>
    <DateOfBirth>1990-06-03</DateOfBirth>
    <FirstName>Nicole</FirstName>
    <LastName>Kidman</LastName>
    <LastName2/>
    <IdDocType>1</IdDocType>
    <IdDocNumber>A12131</IdDocNumber>
    <IdDocIssueDate>2017-07-18</IdDocIssueDate>
    <IdDocExpirationDate>2026-01-12</IdDocExpirationDate>
    <IdDocIssueCountryId>GR</IdDocIssueCountryId>
    <NationalityCountryId>GR</NationalityCountryId>
    <ProvinceId>1599</ProvinceId>   
    <IsPrimaryGuest>1</IsPrimaryGuest>
    <SalutationId>2</SalutationId>
</Guest>
...
<Guests>
[
    {
        "id":8, 
        "dateOfBirth":"1990-06-03",
        "firstName":"Nicole",     
        "lastName":"Kidman",  
        "lastName2":"",    
        "idDocType":1, 
        "idDocNumber":"A12131",
        "idDocIssueDate":"2017-07-18",  
        "idDocExpirationDate": "2026-01-12",  
        "idDocIssueCountryId": "GR",
        "nationalityCountryId": "GR",
        "provinceId":1599,
        "isPrimaryGuest" : 1,
        "salutationId":2 
    },...
]
        
        
        Add a new Guest.
Request parameters
| Name | Value | 
|---|---|
| FirstName | Guest's first name. | 
| LastName | Guest's last name. | 
If reservation ID is sent in the request the new guest will be connected with the reservation, otherwise just a new guest will be added.
Response
The result is the ID of the newly created guest.
Example Request
<?xml version="1.0" ?>
<Guest>
    <DateOfBirth>1990-06-03</DateOfBirth>
    <FirstName>Nicole</FirstName>
    <LastName>Kidman</LastName>
    <LastName2/>
    <IdDocType>1</IdDocType>
    <IdDocNumber>A12131</IdDocNumber>
    <IdDocIssueDate>2017-07-18</IdDocIssueDate>
    <IdDocExpirationDate>2026-01-12</IdDocExpirationDate>
    <IdDocIssueCountryId>GR</IdDocIssueCountryId>
    <NationalityCountryId>GR</NationalityCountryId>
    <ProvinceId>1599</ProvinceId>   
    <IsPrimaryGuest>1</IsPrimaryGuest>        
    <SalutationId>2</SalutationId>
</Guest>
{
    "dateOfBirth":"1990-06-03",
    "firstName":"Nicole",     
    "lastName":"Kidman",  
    "lastName2":"",    
    "idDocType":1, 
    "idDocNumber":"A12131",
    "idDocIssueDate":"2017-07-18",  
    "idDocExpirationDate": "2026-01-12",  
    "idDocIssueCountryId": "GR",
    "nationalityCountryId": "GR",
    "provinceId":1599,
    "isPrimaryGuest" : 1,
    "salutationId":2 
}
        
        
        Example Response
<?xml version="1.0" ?>
<Guest>
    <Id> 429 </Id>
</Guest>
{
    "id":429
}
        
        
        Update selected data of Guest.
Request parameters
| Name | Value | 
|---|---|
| id | Unique identifier of guest. | 
* The rest of Guest's object fields are optional.
Response
Result is the status code of the request.
Example Request
<?xml version="1.0"?> <LastName>Tarantino</LastName>
{"LastName":"Tarantino"}
    
        
        Example Response
<?xml version="1.0" ?>
<Guest>
    <DateOfBirth>1990-06-03</DateOfBirth>
    <FirstName>Nicole</FirstName>
    <LastName>Tarantino</LastName>
    <LastName2/>
    <IdDocType>1</IdDocType>
    <IdDocNumber>A12131</IdDocNumber>
    <IdDocIssueDate>2017-07-18</IdDocIssueDate>
    <IdDocExpirationDate>2026-01-12</IdDocExpirationDate>
    <IdDocIssueCountryId>GR</IdDocIssueCountryId>
    <NationalityCountryId>GR</NationalityCountryId>
    <ProvinceId>1599</ProvinceId>   
    <IsPrimaryGuest>1</IsPrimaryGuest>        
    <SalutationId>2</SalutationId>
</Guest>
{
    "dateOfBirth":"1990-06-03",
    "firstName":"Nicole",     
    "lastName":"Tarantino",  
    "lastName2":"",    
    "idDocType":1, 
    "idDocNumber":"A12131",
    "idDocIssueDate":"2017-07-18",  
    "idDocExpirationDate": "2026-01-12",  
    "idDocIssueCountryId": "GR",
    "nationalityCountryId": "GR",
    "provinceId":1599,
    "isPrimaryGuest" : 1,
    "salutationId":2 
}
        
        
        Delete a Guest.
Request parameters
| Name | Value | 
|---|---|
| id | The ID of the requested guest | 
Response
Result is the status code of the request.