After obtaining the access to Booking Manager SOAP web service create a local database where you will store most of the data for all the boats to reduce the number of requests to web service and to increase the response time when availability request is required
Starting the integration
- Use call GetResources and fetch the data company by company
- Store that info in your local database.
Local database
- Retrieve the data from your local database, not directly from the server because most of the data from the boats can be stored and retrieved in that way.
- Perform an overnight update of the database.
- All of our clients due to logistical and technical reasons update the database during the night, and there were no problems with it regarding the data volume and update, so you should be fine with this.
- Store the info you get from getResources (prices, boats, pictures etc), example
but the availability can/will change very fast so it's not recommendable to store.
Equipment, pictures, extras can easily be stored form your side in your local database and rechecked e.g. once per week, so when a guest comes to your web page, you will have cached data.
When the guest selects the criteria for search or booking, then you're making a call to check availability. This way, you will hugely reduce the number of calls and improve your response time, because it is normal to store the data and then check the real-time availability of the boats.
With GetSearchResultsFilter you search the availability through the database and also retrieve all resources that meet the set parameters with their availability status, price and discount data.
When you are fetching the complete database, you'll notice that database is quite big.
Therefore you may need to adjust your script in order to process the data of that volume.
Tips for data type and parsing them with your database.
- Discounts with/without subtotals.
If discountshavesubtotals is 1, the calculation goes like this:
-
- Original price: 1000
- Discounts: 5% and 10%
- 5% applied to 1000 leaves 950
- 10% applied to 950 leaves 855
- Final price: 855
If discountshavesubtotals is 0, the calculation goes like this:
-
- Original price: 1000
- Discounts: 5% and 10%
- 15% applied to 1000 leaves 850
- Final price: 850
As for the calculation of the discount, please check our documentation under section 4. Discount Calculation for a detailed explanation.
- Availability Search 1
One method is getSearchResultsFilter, check the manual under section 1.6. for the details of the call elements.
Also, you will notice that the 4th element needs to be inserted as XML values.
Here is the example of the call how it needs to look like:
<cbm:in3>
<![CDATA[
<filter>
<element id="datefrom">2019-06-15T00:00:00</element>
<element id="dateto">2019-06-22T00:00:00</element>
<element id="flexibility">1</element
</filter>
]]>
</cbm:in3>
</cbm:getSearchResultsFilter>
</soapenv:Body>
</soapenv:Envelope>
Note: first 3 elements (long _userId, String _username, String _password,) from the request are always the same (your id, username and password) in all your requests.
You will also notice that with this method you can use the flexibility element which gives you more possibilities to search the boat/s availability within a whole year (e.g flexibility - 6 – in a year).
- Availability Search 2
Use another method, getShortAvailabilityInfo check the manual under section 1.5.
With this method, you can see boat status for the whole year.
Using type 3 status as a response ( 3. Statuses – use “3” to get results in binary format), will give you the status of the boat on each day of the year - e.g. if availabilityInfo is “2222 2220 0000...” it means that the boat is under status Option from January 1 until January 8, and it is free from January 8 etc
- Check-in day of the boat
Some boats can be rented on a particular day of the week such as:
-only from Saturday to Saturday, or Friday to Friday, or any day of the week...
Some boats can have a different duration of the charter can be different:
-on a weekly bases or for any number of days
To identify from what day of the week the charter can start and for what duration in GetResources check
defaultcheckinday=""
One small notice for this call -
if you use flexibility parameter 6 ( in year) , like:
<cbm:in3>
<![CDATA[
<filter>
<element id="datefrom">2021-06-28T00:00:00</element>
<element id="dateto">2019-07-05T00:00:00</element>
<element id="flexibility">6</element>
</filter>
]]>
</cbm:in3>
</cbm:getSearchResultsFilter>
</soapenv:Body>
</soapenv:Envelope>
this response will return the boats with the check in day Saturday , since this is complete availability for whole year.
Comments
0 comments
Please sign in to leave a comment.