Home Features Pricing Contact Login

REST API

Get park

GET
https://camping.care/api/v1/park

Authentication: API Key

Get your park data, this data includes the information of your park

Parameters

language
STRING
Request the accommodation data in a different language (ISO Language Code)

Response

Returns data of the park

201
application/json; charset=utf-8
id
Integer
The park id
name
String
The park name
created
Date
The accommodation name
created
Date
The create date and time of the park
slug
string
The slug name of the park
testmodes
Enum
The state off the testmodes in 'on' or 'off'
default_vat
int
The id of the default vat tables of the accommodation
price_notation
Enum
The price notation off the park in enum of 'eu', .. .. ..
currency
Enum
The currency notation off the park in enum of 'EUR', .. .. ..
paytime
Enum
The paytime notation off the park in enum of 'direct', .. .. ..
email
String
The email adress off the park
billing_id
int
The billing id off the park
default_park_language
Enum
The default language off the park
park_languages
ARRAY
The available language off the park
default_age_table
Int
The default age table id off the park
description
String
The description of the park
zipcode
String
The zipcode of the park
city
String
The city of the park
address
String
The address of the park
address_number
String
The address number of the park
phone
String
The phone number of the park
vat_number
String
The vat number of the park
country
ISO LANGUAGE
The country of the park
website
ISO LANGUAGE
The website of the park

Example


/*
* Example get park - How to get park information from the Camping.care API
* https://camping.care/developer/park/get_park
*/
try {


	/*
    * Initialize the Camping.care API SDK with your API key.
    *
    * See: https://camping.care/settings/api
    */
	require_once dirname(__FILE__) . '/../../src/campingcare/Autoloader.php';

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

	/*
    * Parameters:
    * language : ISO language code (optional)
    *
    */
    $data = array();
    $data['language'] = "de" ;



	/*
	* All data is returned in a park opject
	* The structure can be found here: https://camping.care/developer/park/get_park.
	*/
    $park = $campingcare->get_park($data);


    /*
    * In this example we print the data in json format on the page
    */
    echo "Park data";
    echo "
";
    echo json_encode($park, JSON_PRETTY_PRINT);
    echo "
"; } catch (Exception $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using campingcare;
using Newtonsoft.Json.Linq;


namespace campingcare_csharp_sdk_tests
{
    public static class park
    {
        /*
        * Example get park - How to get park information from the Camping.care API
        * https://camping.care/developer/park/get_park
        */

        public static async void get_park()
        {
            try
            {

                Console.WriteLine("*************************************");
                Console.WriteLine("***           GET PARK            ***");
                Console.WriteLine("*************************************");


                /*
                * Initialize the Camping.care API SDK with your API key.
                *
                * See: https://camping.care/settings/api
                */

                campingcare_api camping_care = new campingcare_api();
                camping_care.set_api_key("YOUR API KEY");

                /*
                * Parameters:
                * None
                *
                */

                var send_data = new List>();

                /*
                * All data is returned in a park opject
                * The structure can be found here: https://camping.care/developer/park/get_park.
                */

                var data = await camping_care.get_park(send_data);


                /*
                * In this example we print the oprions in json format in the console
                */
                JObject json = JObject.Parse(data.ToString());

                foreach (var pair in json)
                {
                    Console.WriteLine("{0}: {1}", pair.Key, pair.Value);
                }

            }
            catch (Exception ex)
            {
                LogData(ex.Message);
            }
        }

        private static void LogData(string Message)
        {
            Console.WriteLine("Error: " + Message);
        }
    }
}



Response example

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


{
    "id": "1",
    "name": "Camping Care Test Park",
    "created": "2017-01-01 00:00:00",
    "slug": "camping-care-test-park",
    "testmodes": "on",
    "default_vat": "1",
    "price_notation": "eu",
    "currency": "EUR",
    "paytime": "direct",
    "email": "support@camping.care",
    "billing_id": "1",
    "default_park_language": "en",
    "park_languages": "[\"nl\",\"de\",\"fr\",\"en\",\"es\",\"it\"]",
    "default_age_table": "1",
    "description": "Description of Camping.care test park",
    "zipcode": "7575EN",
    "city": "Oldenzaal",
    "address": "Doesburgstraat",
    "address_number": "12",
    "phone": "0123456789",
    "vat_number": "",
    "country": "NL",
    "website": "https:\/\/camping.care"
}



Response Error

Returns an array with error information

230
application/json; charset=utf-8
code
Integer
The error code listed in a list below
message
String
The error message listed in a list below

Error Codes

1000
No valid API key
1001
No accommodations found
1002
No admin ID found
0%
()

Cancel upload