API

About

visser.io provides free usage of its API in JSON format. You are free to use the provided tools and resources for non-commercial use.

Commercial use is not allowed without prior approval.

Resources

Convert country code to country name

  • Slug: convert-country-code-to-country-name
  • Description: Convert two-letter ISO 3166-1 country code to country name (e.g. AF to Afghanistan)
  • Arguments: country_code
  • Response: country
  • Sample:
    ?format=json&resource=convert-country-code-to-country-name&country_code=AF

Convert country code and city to PHP timezone

  • Slug: convert-city-country-to-timezone
  • Description: Convert city and country name to PHP timezone (e.g. Hamburg Germany to Europe/Berlin)
  • Arguments: country_code, city
  • Response: timezone
  • Sample:
    ?format=json&resource=convert-city-country-to-timezone&country_code=DE&city=Berlin

Usage

To receive the response in JSON format, send a GET request to:

https://visser.io/tools/api/?format=json&resource=...

Replace … with the slug of the resource (e.g. convert-country-code-to-country-name) add add the required arguments after (e.g. country_code, etc.) depending on the resource.

Response

A successful request will return the following:

{
    "status": "success",
    ...
}

A failed request will return the following:

{
    "status": "fail",
    "message": "ERROR MESSAGE",
}