Startseite Funktionen Preisangabe Kontakt Login


Getting started

Welcome to the 'Hello World' tutorial of the APi. The API is an universal REST API, this means every developer can use it and it can communicatie with almost all scripting languages. In this tutorial we will use PHP as example language.


Requirements to get started with the REST API

  • Composer (To install the SDK)
  • PHP SDK (Optional)
  • PHP 5.5 (Or higher) webserver
  • API Key

1: Install the SDK

Composer install

Install composer if you don't have it installed.

Get the SDK by running the following command

composer require CampingCare/campingcare-php-sdk

Manual install

Download the source code via Github:

2: Get your API key

  • Be sure you have an active park and inlog.
  • Go to API Settings of your park.
  • Create an API key

3: Make your first API request

Once you have your API key we are almost ready. In this tutorial we will get the list of your accommodations, it's very easy by running the following code.

// Load your vendor Autoloader
// if you installed the SDK manual load the Autoloader.php directly from the SDK


$campingcare = new campingcare_api ;
$campingcare->set_api_key("YOUR SECRET API KEY");

	$park = $campingcare->get_park();

    echo "
    echo "
"; }catch(Exception $e){ echo "API call failed: " . htmlspecialchars($e->getMessage()); }

If everything is right, you will get a response like this.

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

	    "id": "1",
	    "name": "Standard Place",
	    "id": "2",
	    "name": "Comfort Place",

You're done! That's all, try and play with our API.


Hochladen abbrechen