Get alert by id
curl --request GET \
--url https://api.campflare.com/v2/alert/:idimport requests
url = "https://api.campflare.com/v2/alert/:id"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campflare.com/v2/alert/:id', 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/alert/:id",
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/alert/:id"
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/alert/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/:id")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"campground_ids": [
"<string>"
],
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [
"available"
],
"campsite_kinds": [
"standard"
],
"min_rv_length": 123,
"min_trailer_length": 123
},
"created_at": "2023-11-07T05:31:56Z",
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sent_at": "2023-11-07T05:31:56Z",
"campground_id": "<string>",
"campsite_id": "<string>",
"webhook_status": "delivered",
"date_range": {
"starting_date": "2023-12-25",
"nights": 123
},
"webhook_http_response_code": "<string>"
}
],
"canceled_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_override_url": "<string>"
}{
"error": {
"message": "<string>",
"kind": "<string>"
}
}Campground Availability Alerts
Get Alert
Get alert by id
Get alert by id
curl --request GET \
--url https://api.campflare.com/v2/alert/:idimport requests
url = "https://api.campflare.com/v2/alert/:id"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.campflare.com/v2/alert/:id', 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/alert/:id",
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/alert/:id"
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/alert/:id")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/:id")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"campground_ids": [
"<string>"
],
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [
"available"
],
"campsite_kinds": [
"standard"
],
"min_rv_length": 123,
"min_trailer_length": 123
},
"created_at": "2023-11-07T05:31:56Z",
"notifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sent_at": "2023-11-07T05:31:56Z",
"campground_id": "<string>",
"campsite_id": "<string>",
"webhook_status": "delivered",
"date_range": {
"starting_date": "2023-12-25",
"nights": 123
},
"webhook_http_response_code": "<string>"
}
],
"canceled_at": "2023-11-07T05:31:56Z",
"metadata": {},
"webhook_override_url": "<string>"
}{
"error": {
"message": "<string>",
"kind": "<string>"
}
}This endpoint simply retuens the properties of an Alert, along with the notifications the alert has triggered.
Response
Response
Unique identifier for the alert
Status of the alert
Available options:
active, canceled, expired Show child attributes
Show child attributes
Timestamp of the alert creation
Show child attributes
Show child attributes
Timestamp of the last update (when/if canceled)
The additional metadata associated with the alert when created
The webhook URL override for this alert, if one was set at creation time.