Bezplatná linka (pre hovory z pevnej linky)
Slovensko: 0800 606 223
Otváracia doba: Po - Pi 08:00h - 22:00h, So 08:00h - 14:00h
E-mail: info@adriatic.hr
API dokumentácia
Práve sa nachádzate v: Partneri > Affiliate program > JavaScript servis > API dokumentácia
This overview of Adriatic.hr web service API is intented for website developers interested in using web services. Some knowlege of HTML is assumed.
Javascript web service
Methods overview- GetPrivateAccommodationAtLocation
GetRecommendedPrivateAccommodation
GetRecommendedPrivateAccommodationObject
PrivateAccommodationSearchForm
PrivateAccommodationSearchFormLite
PrivateAccommodationSearchFormLocation
Javascript web serviceJavascript service renders its output as HTML and is used for publishing Adriatic.hr content on client's web site. Input parameters can be specified to customize HTML formatting style and other properties of content being displayed.
Usage
Service is invoked by calling a javascript. Method name and parameters are specified in javascript URL
Example:
<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getprivateaccommodationatlocation&
lang=en&
location=Hvar">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getprivateaccommodationatlocation&
lang=en&
location=Hvar">
</script>
This example calls GetPrivateAccommodationAtLocation method, passing lang and location parameters. Result output is HTML code, displaying a list of private accommodation on Hvar location, in English.
Notes
When using the Javascript service please note:
- It is required to set call parameter specifying method name being invoked - other parameters refer to service method parameters and can be ommited, if not explicitly required by method.
- HTML output is written to client's page, at the position of <script...> code block.
- Affiliate partners should specify their AffiliateSiteId parameter.
- Parameter and method names are not case sensitive so that bgcolor and BgColor refer to the same thing.
- In case of an error, a message describing the error is displayed. This is usually the result of incorrect user request, such as required paramter not being set, misspelled method name etc. To prevent error messages from showing set the Silent parameter.
- Formatting style can be customized by specifying parameters such as TextColor or Font, however, setting noFormat parameter indicates no styles are to be used and formatting of a page calling the javascript is applied.
Methods overviewThis is the overview of service methods provided by Javascript web service. Note that specifying method parameters is optional, unless stated otherwise.
GetPrivateAccommodationAtLocation
Displays offer of a private accommodation at a specified geographic location. This location is specified by location parameter.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| Location | string | Location name (or part of the location name) refering to either place, riviera or region. This parameter is required. |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Results | numeric | Number of results (items) displayed. Can be a number between 1-20. Default value is 5. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
| Width | string | Content size (width). |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getprivateaccommodationatlocation&
lang=en&
location=Hvar">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getprivateaccommodationatlocation&
lang=en&
location=Hvar">
</script>
Output:
| Adriatic.hr | Private accommodation |
Uvala Lozna, Hvar ![]() ![]() ![]() Capacity:6+2 • Beach:10 m From 73,00 € Mudri Dolac, Hvar ![]() ![]() ![]() Capacity:10+4 • Beach:15 m From 50,70 € Jelsa, Hvar ![]() ![]() ![]() Capacity:10+4 • Beach:600 m From 30,00 € Jelsa, Hvar ![]() ![]() ![]() Capacity:10+5 • Beach:750 m From 37,60 € Jelsa, Hvar ![]() ![]() ![]() Capacity:10+4 • Beach:600 m From 25,20 € |
|
GetRecommendedPrivateAccommodation
Displays offer of private accommodation objects which are recommended by Adriatic.hr.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Results | numeric | Number of results (items) displayed. Can be a number between 1-20. Default value is 5. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
| Width | string | Content size (width). |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getrecommendedprivateaccommodation&
lang=sk">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getrecommendedprivateaccommodation&
lang=sk">
</script>
Output:
| Adriatic.hr | Private accommodation |
Uvala Lozna, Hvar ![]() ![]() ![]() Capacity:6+2 • Beach:10 m From 73,00 € Mastrinka, Čiovo Capacity:8+5 • Beach:90 m From 48,00 € Mudri Dolac, Hvar ![]() ![]() ![]() Capacity:10+4 • Beach:15 m From 50,70 € Jelsa, Hvar ![]() ![]() ![]() Capacity:10+4 • Beach:600 m From 30,00 € Povljana, Pag Capacity:16+10 • Beach:800 m From 32,90 € |
|
GetRecommendedPrivateAccommodationObject
Displays random private accommodation object.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Results | numeric | Number of results (items) displayed. Can be a number between 1-20. Default value is 5. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getrecommendedprivateaccommodationobject&
lang=sk">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=getrecommendedprivateaccommodationobject&
lang=sk">
</script>
Output:
| Adriatic.hr | |
Mudri Dolac, Hvar ![]() ![]() ![]() Capacity:10+4 Beach:15 m From 50,70 € |
|
PrivateAccommodationSearchForm
Displays HTML search form for private accommodation offer.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| LocationFilter | string | Locations to include in a search. This limits the options user can select. Multiple location names can be specified by spearating them with comma. The names are case insesitive. If not set, no filter will be applied. Example: locationfilter=Hvar (include only the locations on Hvar), locationfilter=Split,Korcula (include locations on both Split and Korcula). |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
| Width | string | Content size (width). |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchform&
lang=sk">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchform&
lang=sk">
</script>
Output:
PrivateAccommodationSearchFormLite
Displays HTML search form for private accommodation offer.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| LocationFilter | string | Locations to include in a search. This limits the options user can select. Multiple location names can be specified by spearating them with comma. The names are case insesitive. If not set, no filter will be applied. Example: locationfilter=Hvar (include only the locations on Hvar), locationfilter=Split,Korcula (include locations on both Split and Korcula). |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
| Width | string | Content size (width). |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchformlite&
lang=sk">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchformlite&
lang=sk">
</script>
Output:
PrivateAccommodationSearchFormLocation
Displays HTML search form for private accommodation offer at a specified geographic location.
INPUT PARAMETERS
| AffiliateSiteId | numeric | Your affiliate site id number. |
| BgColor | numeric | Color value (in hex) used as background color. |
| BorderColor | numeric | Color value (in hex) used as border color. |
| Charset | string | Charset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually. |
| Font | string | Text font name. You can specify mulitple font names, separated by coma |
| FontSize | string | Text font size. |
| Lang | string | Language used for displaying text. It is advisable to set this parameter. |
| LocationFilter | string | Locations to include in a search. This limits the options user can select. Multiple location names can be specified by spearating them with comma. The names are case insesitive. If not set, no filter will be applied. Example: locationfilter=Hvar (include only the locations on Hvar), locationfilter=Split,Korcula (include locations on both Split and Korcula). |
| NoBorder | bool | Value of 1 displays content without surrounding border. Default value is 0. |
| NoTitle | bool | Value of 1 displays content without title section. Default value is 0. |
| Silent | bool | Value of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0. |
| Target | string | HTML form target. If not set form will be submitted to current window. |
| TextColor | numeric | Color value (in hex) used as text color. |
| Theme | string | A predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic. |
| TitleBgColor | numeric | Color value (in hex) used as background color. |
| TitleColor | numeric | Color value (in hex) used as title's text color. |
| UrlColor | numeric | Color value (in hex) used as url (links) color. |
| Width | string | Content size (width). |
EXAMPLE USAGE
Request:<script type="text/javascript"
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchformlocation&
lang=en&
locationfilter=Hvar">
</script>
src="http://www.adriatic.hr/services/b2b/javascript.php?
call=privateaccommodationsearchformlocation&
lang=en&
locationfilter=Hvar">
</script>
Output:

