Cancel alert by id
curl --request POST \
--url https://api.campflare.com/v2/alert/:id/cancelimport requests
url = "https://api.campflare.com/v2/alert/:id/cancel"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.campflare.com/v2/alert/:id/cancel', 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/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/cancel"
req, _ := http.NewRequest("POST", url, nil)
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/:id/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/:id/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Cancel Alert
Cancel alert by id
Cancel alert by id
curl --request POST \
--url https://api.campflare.com/v2/alert/:id/cancelimport requests
url = "https://api.campflare.com/v2/alert/:id/cancel"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.campflare.com/v2/alert/:id/cancel', 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/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/cancel"
req, _ := http.NewRequest("POST", url, nil)
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/:id/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.campflare.com/v2/alert/:id/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 stops an Alert immediately. The alert will still be accessible via the get endpoint, however it will no longer send any notifications. An Alert can not be resumed once canceled.
Response
Alert 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.