Należy zaktualizować przeglądarkę internetową

Państwa przeglądarka nie obsługuje nowości, które wprowadziliśmy! Prosimy ją zaktualizować lub skorzystać z innej.

Google Chrome Mozilla Firefox Microsoft Edge Opera
+385 21 456-456
Mówimy po polsku
Pon - Sob
08:00h - 22:00h
Niedz.
14:00h - 22:00h

Dokumentacja API

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="https://api.adriatic.hr/javascript-service?
  call=GetRecommendedPrivateAccommodation&
  lang=en&
  location=Hvar">
</script>

This example calls GetRecommendedPrivateAccommodation 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.

GetRecommendedPrivateAccommodation

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

Input parameters

AffiliateSiteId numeric Your affiliate site id number.
Lang string Language used for displaying text. It is advisable to set this parameter. Default value is en (english).
Location string Location name (or part of the location name) refering to either place, riviera or region. (Examples: 'Brac', 'Hvar', 'Istria', 'Dalmatia').
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 3.
Target string HTML form target. If not set form will be submitted to current window.
Theme string A predefined color theme. Possible values: adriatic, orange, white. Default value is 'adriatic'.
Width string Content size (width).

Example usage

Output:
GetRecommendedPrivateAccommodation

Request:
<script type="text/javascript"
  src="https://api.adriatic.hr/javascript-service?
  call=getrecommendedprivateaccommodation&
  results=2">
</script>

PrivateAccommodationSearchForm

Displays HTML search form for private accommodation offer.

Input parameters

AffiliateSiteId numeric Your affiliate site id number.
Lang string Language used for displaying text. It is advisable to set this parameter. Default value is en (english).
Location string Location name (or part of the location name) refering to either place, riviera or region. (Examples: 'Brac', 'Hvar', 'Istria', 'Dalmatia').
NoTitle bool Value of 1 displays content without title section. Default value is 0.
Target string HTML form target. If not set form will be submitted to current window.
Theme string A predefined color theme. Possible values: adriatic, orange, white. Default value is 'adriatic'.
Width string Content size (width).

Example usage

Output:
PrivateAccommodationSearchForm

Request:
<script type="text/javascript"
  src="https://api.adriatic.hr/javascript-service?
  call=privateaccommodationsearchform&
  lang=pl">
</script>

PrivateAccommodationSearchFormLite

Displays HTML search form for private accommodation offer.

Input parameters

AffiliateSiteId numeric Your affiliate site id number.
Lang string Language used for displaying text. It is advisable to set this parameter. Default value is en (english).
Location string Location name (or part of the location name) refering to either place, riviera or region. (Examples: 'Brac', 'Hvar', 'Istria', 'Dalmatia').
NoTitle bool Value of 1 displays content without title section. Default value is 0.
Target string HTML form target. If not set form will be submitted to current window.
Theme string A predefined color theme. Possible values: adriatic, orange, white. Default value is 'adriatic'.
Width string Content size (width).

Example usage

Output:
PrivateAccommodationSearchFormLite

Request:
<script type="text/javascript"
  src="https://api.adriatic.hr/javascript-service?
  call=privateaccommodationsearchformlite&
  lang=pl">
</script>

PrivateAccommodationSearchFormLocation

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

Input parameters

AffiliateSiteId numeric Your affiliate site id number.
Lang string Language used for displaying text. It is advisable to set this parameter. Default value is en (english).
Location string Location name (or part of the location name) refering to either place, riviera or region. (Examples: 'Brac', 'Hvar', 'Istria', 'Dalmatia').
NoTitle bool Value of 1 displays content without title section. Default value is 0.
Target string HTML form target. If not set form will be submitted to current window.
Theme string A predefined color theme. Possible values: adriatic, orange, white. Default value is 'adriatic'.
Width string Content size (width).

Example usage

Output:
PrivateAccommodationSearchFormLocation

Request:
<script type="text/javascript"
  src="https://api.adriatic.hr/javascript-service?
  call=privateaccommodationsearchformlocation&
  location=Hvar">
</script>

Istniejący użytkownik

Otwierając konto lub logując się na istniejące konto, zgadzasz się na nasze Warunki użytkowania i Ochronę prywatności.

Te witryny używają plików cookie, aby zapewnić lepszą obsługę i funkcjonalność. Ponadto pliki cookie są wykorzystywane do reklam dostosowanych do Ciebie, zarówno w naszej witrynie, jak i poza nią, za pośrednictwem zaufanych partnerów. Przeczytaj więcej o plikach cookie i o tym, jak ich używamy tutaj. Klikając przycisk „OK”, wyrażasz zgodę na użycie wszystkich plików cookie.

W porządku