curl --request POST \
--url https://app.colacloud.us/api/v1/saved-searches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Weekly California cabernet approvals",
"filters": {
"query": "cabernet",
"type_wine": true
},
"schedule": {
"cadence": "weekly",
"day": 0,
"active": true
}
}
'import requests
url = "https://app.colacloud.us/api/v1/saved-searches"
payload = {
"name": "Weekly California cabernet approvals",
"filters": {
"query": "cabernet",
"type_wine": True
},
"schedule": {
"cadence": "weekly",
"day": 0,
"active": True
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Weekly California cabernet approvals',
filters: {query: 'cabernet', type_wine: true},
schedule: {cadence: 'weekly', day: 0, active: true}
})
};
fetch('https://app.colacloud.us/api/v1/saved-searches', 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://app.colacloud.us/api/v1/saved-searches",
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([
'name' => 'Weekly California cabernet approvals',
'filters' => [
'query' => 'cabernet',
'type_wine' => true
],
'schedule' => [
'cadence' => 'weekly',
'day' => 0,
'active' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.colacloud.us/api/v1/saved-searches"
payload := strings.NewReader("{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.colacloud.us/api/v1/saved-searches")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.colacloud.us/api/v1/saved-searches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filters": {
"query": "<string>",
"brand_name": "<string>",
"barcode_value": "<string>",
"type_malt_beverage": true,
"type_wine": true,
"type_distilled_spirit": true,
"derived_beer": true,
"derived_wine": true,
"derived_liquor": true,
"derived_category": "<string>",
"origin_domestic": true,
"origin_imported": true,
"country": "<string>",
"us_state": "<string>",
"permit_number_text": "<string>",
"applicant_us_state": "<string>",
"abv_min": 123,
"abv_max": 123,
"volume_min": 123,
"volume_max": 123,
"container_bottle": true,
"container_can": true,
"container_keg": true,
"container_box": true,
"container_cask": true,
"container_pouch": true,
"container_pod": true,
"container_carton": true,
"container_bag": true,
"container_jug": true
},
"schedule": {
"active": true,
"day": 123
},
"created_at": "2023-11-07T05:31:56Z",
"manage_url": "<string>",
"dashboard_url": "<string>"
}
}Create a saved search
Create a durable saved search using the non-date filter field names from the web app’s SearchForm. Include a schedule object to enable a recurring saved-search alert.
OAuth callers must have the saved_searches:write scope. Approval-date
filters are not saved-search configuration; scheduled runs use the saved
search’s previous run and current run as the approval-date window. Broad
recurring searches without a meaningful filter are rejected. Each user can
have up to 10 active scheduled watchlists.
curl --request POST \
--url https://app.colacloud.us/api/v1/saved-searches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Weekly California cabernet approvals",
"filters": {
"query": "cabernet",
"type_wine": true
},
"schedule": {
"cadence": "weekly",
"day": 0,
"active": true
}
}
'import requests
url = "https://app.colacloud.us/api/v1/saved-searches"
payload = {
"name": "Weekly California cabernet approvals",
"filters": {
"query": "cabernet",
"type_wine": True
},
"schedule": {
"cadence": "weekly",
"day": 0,
"active": True
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Weekly California cabernet approvals',
filters: {query: 'cabernet', type_wine: true},
schedule: {cadence: 'weekly', day: 0, active: true}
})
};
fetch('https://app.colacloud.us/api/v1/saved-searches', 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://app.colacloud.us/api/v1/saved-searches",
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([
'name' => 'Weekly California cabernet approvals',
'filters' => [
'query' => 'cabernet',
'type_wine' => true
],
'schedule' => [
'cadence' => 'weekly',
'day' => 0,
'active' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://app.colacloud.us/api/v1/saved-searches"
payload := strings.NewReader("{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://app.colacloud.us/api/v1/saved-searches")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.colacloud.us/api/v1/saved-searches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Weekly California cabernet approvals\",\n \"filters\": {\n \"query\": \"cabernet\",\n \"type_wine\": true\n },\n \"schedule\": {\n \"cadence\": \"weekly\",\n \"day\": 0,\n \"active\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filters": {
"query": "<string>",
"brand_name": "<string>",
"barcode_value": "<string>",
"type_malt_beverage": true,
"type_wine": true,
"type_distilled_spirit": true,
"derived_beer": true,
"derived_wine": true,
"derived_liquor": true,
"derived_category": "<string>",
"origin_domestic": true,
"origin_imported": true,
"country": "<string>",
"us_state": "<string>",
"permit_number_text": "<string>",
"applicant_us_state": "<string>",
"abv_min": 123,
"abv_max": 123,
"volume_min": 123,
"volume_max": 123,
"container_bottle": true,
"container_can": true,
"container_keg": true,
"container_box": true,
"container_cask": true,
"container_pouch": true,
"container_pod": true,
"container_carton": true,
"container_bag": true,
"container_jug": true
},
"schedule": {
"active": true,
"day": 123
},
"created_at": "2023-11-07T05:31:56Z",
"manage_url": "<string>",
"dashboard_url": "<string>"
}
}Authorizations
API key passed in the X-API-Key header
Body
Filters using non-date web SearchForm field names. Approval-date filters are
intentionally not part of saved-search configuration; active recurring
schedules apply the date window for each run. ABV bounds only count as
meaningful when they narrow the range (abv_min greater than 0 or abv_max
less than 100).
Show child attributes
Show child attributes
Human-readable saved search name
"Weekly California cabernet approvals"
Show child attributes
Show child attributes
Response
Saved search created
Show child attributes
Show child attributes

