E-mailová adresa
Heslo
 
Zabudli ste heslo? ?
E-mailová adresa
Využite príležitosť na veľkú zľavu až do 30%
Privátne ubytovanie charter

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


 Javascript web service

Javascript 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>

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 overview

This 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

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
LocationstringLocation name (or part of the location name) refering to either place, riviera or region. This parameter is required.
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
ResultsnumericNumber of results (items) displayed. Can be a number between 1-20. Default value is 5.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor value (in hex) used as url (links) color.
WidthstringContent 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>

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 €

more facilities »


GetRecommendedPrivateAccommodation

Displays offer of private accommodation objects which are recommended by Adriatic.hr.

INPUT PARAMETERS

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
ResultsnumericNumber of results (items) displayed. Can be a number between 1-20. Default value is 5.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor value (in hex) used as url (links) color.
WidthstringContent size (width).


EXAMPLE USAGE

Request:
<script type="text/javascript"
  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 €

more facilities »


GetRecommendedPrivateAccommodationObject

Displays random private accommodation object.

INPUT PARAMETERS

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
ResultsnumericNumber of results (items) displayed. Can be a number between 1-20. Default value is 5.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor 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>

Output:
Adriatic.hr

Mudri Dolac, Hvar

Capacity:10+4
Beach:15 m
From 50,70 €

more facilities »


PrivateAccommodationSearchForm

Displays HTML search form for private accommodation offer.

INPUT PARAMETERS

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
LocationFilterstringLocations 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).
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor value (in hex) used as url (links) color.
WidthstringContent size (width).


EXAMPLE USAGE

Request:
<script type="text/javascript"
  src="http://www.adriatic.hr/services/b2b/javascript.php?
    call=privateaccommodationsearchform&
    lang=sk">
</script>

Output:
Adriatic.hr Find accommodation
Termín: -
 
Počet osôb:
 
Druh ubytovania:
Kategória:
Pozícia:
Celková cena na deň od: do:
 
 
Oblasť, riviéra alebo miesto:
Ostrov alebo pevnina:
Vzdialenosť od pláže:
Stravovanie:
 
 
 
 
 
 
 
 
 


PrivateAccommodationSearchFormLite

Displays HTML search form for private accommodation offer.

INPUT PARAMETERS

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
LocationFilterstringLocations 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).
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor value (in hex) used as url (links) color.
WidthstringContent size (width).


EXAMPLE USAGE

Request:
<script type="text/javascript"
  src="http://www.adriatic.hr/services/b2b/javascript.php?
    call=privateaccommodationsearchformlite&
    lang=sk">
</script>

Output:
Adriatic.hr Find accommodation
Termín: -
Počet osôb:
 
Druh ubytovania:
 
 
Oblasť, riviéra alebo miesto:


PrivateAccommodationSearchFormLocation

Displays HTML search form for private accommodation offer at a specified geographic location.

INPUT PARAMETERS

AffiliateSiteIdnumericYour affiliate site id number.
BgColornumericColor value (in hex) used as background color.
BorderColornumericColor value (in hex) used as border color.
CharsetstringCharset used for displaying text. This should match the charset of your HTML page. It is recommended to set this parameter manually.
FontstringText font name. You can specify mulitple font names, separated by coma
FontSizestringText font size.
LangstringLanguage used for displaying text. It is advisable to set this parameter.
LocationFilterstringLocations 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).
NoBorderboolValue of 1 displays content without surrounding border. Default value is 0.
NoTitleboolValue of 1 displays content without title section. Default value is 0.
SilentboolValue of 1 turns off any error reporting, displaying no messages upon service failure. Default value is 0.
TargetstringHTML form target. If not set form will be submitted to current window.
TextColornumericColor value (in hex) used as text color.
ThemestringA predefined color theme. Possible values: adriatic, desert, green, midnight, orange. Default value is adriatic.
TitleBgColornumericColor value (in hex) used as background color.
TitleColornumericColor value (in hex) used as title's text color.
UrlColornumericColor value (in hex) used as url (links) color.
WidthstringContent 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>

Output:
Adriatic.hr Geografické vyhľadávanie