### Room Type Data in XML Format
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This is an example of the API response for the 'room_type' resource in XML format, showcasing how localized fields like 'name' and 'description' are represented with language-specific content.
```xml
...
King Size rooms for 2 adults and 2 children.
]]>
Chambres King Size pour 2 adultes et 2 enfants.]]>
...
```
--------------------------------
### Get Booking Information (JSON)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet shows the structure of a JSON response when requesting booking details from the Qloapps API. It includes customer information, pricing details, and room reservations.
```json
{
"booking": {
"id": 1,
"id_property": 1,
"currency": "USD",
"source": "qloapps.com",
"booking_date": "2025-07-10 11:59:24",
"id_language": 1,
"associations": {
"customer_detail": {
"id_customer": 1,
"firstname": "John",
"lastname": "Doe",
"email": "pub@qloapps.com",
"phone": "1234567890"
},
"price_details": {
"total_paid": 1125,
"total_price_without_tax": 1000,
"total_tax": 125
},
"cart_rules": [],
"remarks": [
"Manual order -- Employee: D. Demo"
],
"room_types": [
{
"id_room_type": 1,
"checkin_date": "2025-07-08 00:00:00",
"checkout_date": "2025-07-09 00:00:00",
"total_tax": 112.5,
"number_of_rooms": 1,
"name": "General Rooms",
"rooms": [
{
"id_room": 1,
"id_hotel_booking": 1,
"adults": 1,
"child": 0,
"unit_price_without_tax": 900,
"total_tax": 112.5,
"services": [
{
"id_service": 11,
"name": "Transport",
"quantity": 1,
"unit_price_without_tax": 100,
"total_price_without_tax": 100,
"total_tax": 12.5,
"per_night": 0,
"price_mode": 1
}
]
}
]
}
]
}
}
}
```
--------------------------------
### Get Availability & Rates for Entire Date Range (XML)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet demonstrates how to construct an XML request to the Qloapps API to retrieve availability and rates for a specified date range. It includes parameters for fetching different room statuses and defining room occupancies.
```XML
12022-12-282022-12-3011112032
```
--------------------------------
### HTTP GET Request for Booking Information
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This demonstrates how to retrieve booking details from the Qloapps API using an HTTP GET request. The URL includes the booking ID and a web services key for authentication.
```HTTP
GET http://example.com/api/bookings/1?ws_key=MNBDHALDK122DA879ADAD12ASKSK12W3
```
--------------------------------
### Room Type Data in JSON Format (Multilanguage)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This example shows the API response for the 'room_type' resource in JSON format when multiple languages are installed. Localized fields are presented as an array of objects, each containing a language ID and its corresponding value.
```json
{
"room_type": {
"id": 5,
...
"name": [
{
"id": "1",
"value": "Delux Rooms"
},
{
"id": "2",
"value": "Chambre de luxe"
}
],
"description": [
{
"id": "1",
"value": "
King Size rooms for 2 adults and 2 children.
"
},
{
"id": "2",
"value": "
Chambres King Size pour 2 adultes et 2 enfants.
"
}
],
...
}
}
```
--------------------------------
### Get Hotel ARI Data (JSON)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet shows how to make a POST request to the QloApps API to retrieve hotel availability, rates, and inventory (ARI) data in JSON format. It requires a webservice key and specifies the output format.
```HTTP
GET http://example.com/api/hotel_ari?ws_key=MNBDHALDK122DA879ADAD12ASKSK12W3&output_format=JSON
```
--------------------------------
### Room Type Data in JSON Format (Single Language)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This JSON response illustrates the format when only a single language is installed on the website. Localized fields are directly represented by their string values.
```json
{
"room_type": {
"id": 5,
...
"name": "Delux Rooms",
"description": "
King Size rooms for 2 adults and 2 children.
",
...
}
}
```
--------------------------------
### QloApps Hotel ARI Response Structure
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This is an example of the JSON response received from the QloApps API for hotel ARI data. It details hotel information, date ranges, room types, and the availability status (available, booked, unavailable) of individual rooms.
```JSON
{
"hotel_aris": [
{
"id_hotel": "1",
"date_from": "2022-12-28",
"date_to": "2022-12-29",
"currency": "EUR",
"total_rooms": 10,
"total_available_rooms": 6,
"total_unavailable_rooms": 2,
"total_booked_rooms": 2,
"room_types": [
{
"id_room_type": "1",
"base_price": 1000,
"base_price_with_tax": 1200,
"total_price": 1000,
"total_price_with_tax": 1200,
"name": [
{
"id": "1",
"value": "General Rooms"
},
{
"id": "4",
"value": "General Rooms"
}
],
"rooms": {
"unavailable": [
{
"id_room": "4",
"room_number": "A-104"
}
],
"booked": [
{
"id_room": "1",
"room_number": "A-101"
}
],
"available": [
{
"id_room": "2",
"room_number": "A-102"
},
{
"id_room": "3",
"room_number": "A-103"
},
{
"id_room": "5",
"room_number": "A-105"
}
]
}
},
{
"id_room_type": "2",
"base_price": 1500,
"base_price_with_tax": 1800,
"total_price": 1500,
"total_price_with_tax": 1800,
"name": [
{
"id": "1",
"value": "Delux Rooms"
},
{
"id": "4",
"value": "Delux Rooms"
}
],
"rooms": {
"unavailable": [
{
"id_room": "9",
"room_number": "B-104"
}
],
"booked": [
{
"id_room": "6",
"room_number": "B-101"
}
],
"available": [
{
"id_room": "7",
"room_number": "B-102"
},
{
"id_room": "8",
"room_number": "B-103"
},
{
"id_room": "10",
"room_number": "B-105"
},
{
"id_room": "8",
"room_number": "B-103"
}
]
}
}
]
},
{
"id_hotel": "1",
"date_from": "2022-12-29",
"date_to": "2022-12-30",
"currency": "EUR",
"total_rooms": 10,
"total_available_rooms": 4,
"total_unavailable_rooms": 2,
"total_booked_rooms": 4,
"room_types": [
{
"id_room_type": "1",
"base_price": 1000,
"base_price_with_tax": 1200,
"total_price": 1000,
"total_price_with_tax": 1200,
"name": [
{
"id": "1",
"value": "General Rooms"
},
{
"id": "4",
"value": "General Rooms"
}
],
"rooms": {
"unavailable": [
{
"id_room": "3",
"room_number": "A-103"
}
],
"booked": [
{
"id_room": "2",
"room_number": "A-102"
},
{
"id_room": "5",
"room_number": "A-105"
}
],
"available": [
{
"id_room": "1",
"room_number": "A-101"
},
{
"id_room": "4",
"room_number": "A-104"
}
]
}
},
{
"id_room_type": "2",
"base_price": 1500,
"base_price_with_tax": 1800,
"total_price": 1500,
"total_price_with_tax": 1800,
"name": [
{
"id": "1",
"value": "Delux Rooms"
},
{
"id": "4",
"value": "Delux Rooms"
}
],
"rooms": {
"unavailable": [
{
"id_room": "8",
"room_number": "B-103"
}
],
"booked": [
{
"id_room": "6",
"room_number": "B-101"
},
{
"id_room": "7",
"room_number": "B-102"
}
],
"available": [
{
"id_room": "9",
"room_number": "B-104"
},
{
"id_room": "10",
"room_number": "B-105"
}
]
}
}
]
}
]
}
```
--------------------------------
### XML: Create Configuration
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML snippet demonstrates how to create a new configuration entry in QloApps via the API. It includes the 'name' and 'value' for the configuration, such as setting the default language ('PS_LANG_DEFAULT') to '3'.
```XML
3PS_LANG_DEFAULT
```
--------------------------------
### QloApps API Synopsis
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
The XML synopsis for the QloApps availability and rates search API. This outlines the parameters and their requirements for API requests.
```xml
```
--------------------------------
### XML: Check Configuration Existence
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML snippet represents an empty response from the QloApps API when checking for the existence of a configuration, such as 'PS_LANG_DEFAULT'. An empty 'configurations' tag indicates that the configuration was not found.
```XML
```
--------------------------------
### XML Synopsis Format for Qloapps Booking
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML structure represents the synopsis of availability and rates as returned by the Qloapps API. It includes details about the booking, customer information, pricing, payment, and room configurations.
```XML
```
--------------------------------
### Fetch Qloapps API Synopsis
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet demonstrates how to retrieve the synopsis of the Qloapps API. It uses the 'schema=synopsis' parameter along with the webservice access key.
```HTTP
GET http://example.com/api/bookings?ws_key=MNBDHALDK122DA879ADAD12ASKSK12W3&schema=synopsis
```
--------------------------------
### Retrieve Room Type Pricing and Details
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet demonstrates how to extract pricing information and names for different room types from the API response. It includes base price, price with tax, total price, and the name of the room type in multiple languages.
```XML
```
--------------------------------
### Create/Update Configuration using QloApps PHP Webservice Library
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This PHP code utilizes the QloApps Webservice library to manage configurations. It first checks if a configuration exists by its name. If it exists, it updates the value; otherwise, it creates a new configuration. Error handling for API requests is included.
```PHP
get([
'resource' => 'configurations',
'filter[name]' => '['. $configName . ']',
]);
$configurationId = null;
if ($xml->configurations->configuration->count() > 0) {
$configurationId = (int) $xml->configurations->configuration[0]->attributes()['id'];
}
// Check if id is black or exists already
if (null === $configurationId) {
$configXml = $webServiceObj->get(['url' => $webServiceUrl . 'api/configurations?schema=blank']);
} else {
$configXml = $webServiceObj->get([
'resource' => 'configurations',
'id' => $configurationId,
]);
}
// Update configuration name and value
$configXml->configuration[0]->name = $configName;
$configXml->configuration[0]->value = $configValue;
} catch (PrestaShopWebserviceException $e) {
echo 'Error:' . $e->getMessage() . PHP_EOL;
}
// if blank the create a new configuration
if (null === $configurationId) {
try {
$webServiceObj->add([
'resource' => 'configurations',
'postXml' => $configXml->asXML(),
]);
echo 'Created configuration successfully ' . $configName . ' = ' . $configValue . PHP_EOL;
} catch (PrestaShopWebserviceException $e) {
echo 'Error while configuration creation : ' . $e->getMessage() . PHP_EOL;
}
} else {
// if configuration exists then update the configuration
try {
$webServiceObj->edit([
'resource' => 'configurations',
'id' => $configurationId,
'putXml' => $configXml->asXML(),
]);
echo 'Updated configuration successfully ' . $configName . ' = ' . $configValue . PHP_EOL;
} catch (PrestaShopWebserviceException $e) {
echo 'Error while configuration updation : ' . $e->getMessage() . PHP_EOL;
}
}
```
--------------------------------
### Qloapps Booking XML Response
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML snippet represents a complete booking response from the Qloapps API. It includes essential details such as booking ID, property information, currency, dates, customer contact information, pricing breakdown (paid, without tax, tax), and detailed room type configurations including services offered.
```XML
```
--------------------------------
### Qloapps Image Format (XML)
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML structure defines the format for image types and lists returned by the Qloapps API. It includes image type identifiers and links to image resources.
```XML
```
--------------------------------
### Request XML for Date-Wise Availability Breakdown
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This XML structure is used to request detailed availability and rates for each date within a specified range. It includes hotel details, date parameters, room occupancy information, and the crucial `` flag set to 1.
```XML
12022-12-282022-12-3011112032
```
--------------------------------
### QloApps API Schema
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
The XML schema for the QloApps availability and rates search API. This defines the structure of the data that can be requested.
```xml
```
--------------------------------
### Fetch Qloapps API Schema
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet shows how to request the API schema for Qloapps bookings. It requires a valid webservice access key and specifies the 'schema=blank' parameter.
```HTTP
GET http://example.com/api/bookings?ws_key=MNBDHALDK122DA879ADAD12ASKSK12W3&schema=blank
```
--------------------------------
### Add Image using HTML Form
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This HTML form demonstrates how to upload a new image for a resource (e.g., room type) using a POST request with multipart/form-data encoding.
```HTML
```
--------------------------------
### Qloapps Booking API XML Schema
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This is the XML schema returned by the Qloapps API for booking details. It outlines the structure for booking information, customer details, pricing, payment, cart rules, room types, and services.
```XML
```
--------------------------------
### Update Image using HTML Form
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This HTML form illustrates how to update an existing image for a resource using a POST request with the 'ps_method' parameter set to 'PUT'.
```HTML
```
--------------------------------
### PHP: Set State Limit with Offset
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This PHP code snippet shows how to retrieve a specific range of states from the QloApps API. It allows you to define an offset and a limit to fetch a subset of the states resource.
```PHP
$opt = array(
'resource' => 'states',
'display' => 'full',
'limit' => '9,5'
);
```
--------------------------------
### PHP: Set State Limit
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This PHP code snippet demonstrates how to set a limit for retrieving states from the QloApps API. It utilizes an options array to specify the resource, display format, and the limit for the results.
```PHP
$opt = array(
'resource' => 'states',
'display' => 'full',
'limit' => '3'
);
```
--------------------------------
### Hotel ARI XML Structure
Source: https://devdocs.qloapps.com/webservice/advanced-api-uses
This snippet shows the XML structure for Hotel ARI data. It includes pricing information (base price, price with tax, total price, total price with tax) and details about room types, including multi-language names and availability status (available, unavailable, booked, partial available).
```XML
```