Currency Service

Cluster Hotel provide foreign exchange services. The exchange rate data are taken from a reliable source. This value may be different in each country. For example: the value of the Rupiah against the U.S. Dollar in Singapore may be different from the value of the Rupiah against the U.S. Dollar in France.

Cluster Hotel will check the latest exchange data every 6 hours. Data exchange will only be updated if new data is available. If the relationship between a server outage or server provider is in the offline state, then the data can not be updated even after the latest data available from the provider to the exchange value of the relationship to normal again.

Currency API

Cluster Hotel provide Appilcation Programming Interface (API) to update the exchange rate. The API is provided in three formats is as follows:

  1. Extensible Markup Language (XML)
  2. JavaScript Object Notation (JSON)
  3. JavaScript Object Notation (JSON) with Base64 encoding

The data rate can be accessed by URL:

http://hotel.planetbiru.net/update-currency.php

Query:

  1. type (option values​​: xml, json) the default xml
  2. encode (option value: base64)

Default (XML)

http://hotel.planetbiru.net/update-currency.php

JSON

http://hotel.planetbiru.net/update-currency.php?type=json

JSON + Base64

http://hotel.planetbiru.net/update-currency.php?type=json&encode=base64

Parsing Data

Data can be parsed using an XML parser or JSON Decode. For JSON data with base64, data must first be decoded by base64 decoding before decoded the JSON decoding. JSON data (without the base64 encoding) can be executed directly by JavaScript.