curl --request POST \
--url https://api.campflare.com/v2/alert/create \
--header 'Content-Type: application/json' \
--data '
{
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"min_rv_length": 123,
"min_trailer_length": 123
},
"campground_ids": [
"<string>"
],
"metadata": {},
"webhook_override_url": "<string>"
}
'import requests
url = "https://api.campflare.com/v2/alert/create"
payload = {
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"min_rv_length": 123,
"min_trailer_length": 123
},
"campground_ids": ["<string>"],
"metadata": {},
"webhook_override_url": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
parameters: {
date_ranges: [{starting_date: '2023-12-25', nights: 123}],
status: [],
campsite_kinds: [],
min_rv_length: 123,
min_trailer_length: 123
},
campground_ids: ['<string>'],
metadata: {},
webhook_override_url: '<string>'
})
};
fetch('https://api.campflare.com/v2/alert/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parameters' => [
'date_ranges' => [
[
'starting_date' => '2023-12-25',
'nights' => 123
]
],
'status' => [
],
'campsite_kinds' => [
],
'min_rv_length' => 123,
'min_trailer_length' => 123
],
'campground_ids' => [
'<string>'
],
'metadata' => [
],
'webhook_override_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.campflare.com/v2/alert/create"
payload := strings.NewReader("{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.campflare.com/v2/alert/create")
.header("Content-Type", "application/json")
.body("{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campground_ids": [
"<string>"
],
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"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>",
"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>"
}
}Create Alert
Creates an Availability Alert
curl --request POST \
--url https://api.campflare.com/v2/alert/create \
--header 'Content-Type: application/json' \
--data '
{
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"min_rv_length": 123,
"min_trailer_length": 123
},
"campground_ids": [
"<string>"
],
"metadata": {},
"webhook_override_url": "<string>"
}
'import requests
url = "https://api.campflare.com/v2/alert/create"
payload = {
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"min_rv_length": 123,
"min_trailer_length": 123
},
"campground_ids": ["<string>"],
"metadata": {},
"webhook_override_url": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
parameters: {
date_ranges: [{starting_date: '2023-12-25', nights: 123}],
status: [],
campsite_kinds: [],
min_rv_length: 123,
min_trailer_length: 123
},
campground_ids: ['<string>'],
metadata: {},
webhook_override_url: '<string>'
})
};
fetch('https://api.campflare.com/v2/alert/create', 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/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parameters' => [
'date_ranges' => [
[
'starting_date' => '2023-12-25',
'nights' => 123
]
],
'status' => [
],
'campsite_kinds' => [
],
'min_rv_length' => 123,
'min_trailer_length' => 123
],
'campground_ids' => [
'<string>'
],
'metadata' => [
],
'webhook_override_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.campflare.com/v2/alert/create"
payload := strings.NewReader("{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.campflare.com/v2/alert/create")
.header("Content-Type", "application/json")
.body("{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"parameters\": {\n \"date_ranges\": [\n {\n \"starting_date\": \"2023-12-25\",\n \"nights\": 123\n }\n ],\n \"status\": [],\n \"campsite_kinds\": [],\n \"min_rv_length\": 123,\n \"min_trailer_length\": 123\n },\n \"campground_ids\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"webhook_override_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campground_ids": [
"<string>"
],
"parameters": {
"date_ranges": [
{
"starting_date": "2023-12-25",
"nights": 123
}
],
"status": [],
"campsite_kinds": [],
"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>",
"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>"
}
}Body
Alert parameters
Availability parameters. When these are set, the alert will trigger each time availability of the specified campgrounds matches the this criteria. These are the same as the parameters used in the campground search endpoint, which may be helpful for debugging and previewing alert parameters.
Show child attributes
Show child attributes
Array of campground IDs to watch. Limited to 12 campgrounds.
A mapping of any data you wish to associate with the alert which will be sent with each notification to the webhook. Limited to 2kb.
Optional webhook URL to use for this alert instead of the default webhook URL configured on your account.
Response
Alert response
Unique identifier for the alert
Status of the alert
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.