Get availability for all campsites in a campground
curl --request GET \
--url https://api.campflare.com/v2/campground/:id/availabilityimport requests
url = "https://api.campflare.com/v2/campground/:id/availability"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campflare.com/v2/campground/:id/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.campflare.com/v2/campground/:id/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.campflare.com/v2/campground/:id/availability"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.campflare.com/v2/campground/:id/availability")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/campground/:id/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campsite_availability": [
{
"campsite_id": "<string>",
"availability": {}
}
]
}{
"error": {
"message": "<string>",
"kind": "<string>"
}
}Campgrounds
Get Availability
Returns availability status for each campsite in the campground for upcoming dates
Get availability for all campsites in a campground
curl --request GET \
--url https://api.campflare.com/v2/campground/:id/availabilityimport requests
url = "https://api.campflare.com/v2/campground/:id/availability"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campflare.com/v2/campground/:id/availability', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.campflare.com/v2/campground/:id/availability",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.campflare.com/v2/campground/:id/availability"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.campflare.com/v2/campground/:id/availability")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/campground/:id/availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"campsite_availability": [
{
"campsite_id": "<string>",
"availability": {}
}
]
}{
"error": {
"message": "<string>",
"kind": "<string>"
}
}Returns a daily availability structure associated with the given campground for up to 12 months in the future with a maximum of 60 days returned at a time.
| Status | Description |
|---|---|
available | The campsite is available for reservation for that date |
reserved | The campsite is already reserved and occupied for that date |
closed | The campsite is closed and not accepting reservations or walk-ups |
first-come-first-serve | The campsite is available on a first come first serve basis |
not-yet-released | The date is in the future but reservations have not yet been released |
unknown | The availability status is unknown or cannot be determined |
GET /campground/:id/availability
[
{
"campsite_id": "123456",
"availability": {
"2023-06-01": "available",
"2023-06-02": "reserved",
"2023-06-03": "closed",
"2023-06-04": "closed",
"2023-06-05": "closed",
"2023-06-06": "closed",
...
},
},
{
"campsite_id": "38477",
"availability": {
"2023-06-01": "first-come-first-serve",
"2023-06-02": "first-come-first-serve",
"2023-06-03": "first-come-first-serve",
"2023-06-04": "closed",
"2023-06-05": "closed",
"2023-06-06": "closed",
...
}
...
]
Path Parameters
Unique identifier of the campground
Query Parameters
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
Response
Array of campsite availability
Show child attributes
Show child attributes