Resume saved search alerts
Switches alerts back on for the given saved searches, each at the cadence it ran at before it was paused (frequencyBeforePause on the read endpoint). Searches already on are reported as ALREADY_ACTIVE and keep their cadence. A search whose earlier cadence is unknown stays paused and is reported as PRIOR_FREQUENCY_UNKNOWN with a message; set alertFrequency through the update endpoint for it instead. The other searches resume as usual. A result of NOT_CHANGED means the search could not be switched on and should be checked in the CRM.
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"savedSearchIds": [
88123456789
]
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume"
payload = { "savedSearchIds": [88123456789] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({savedSearchIds: [88123456789]})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume', 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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume",
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([
'savedSearchIds' => [
88123456789
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume"
payload := strings.NewReader("{\n \"savedSearchIds\": [\n 88123456789\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"savedSearchIds\": [\n 88123456789\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"savedSearchIds\": [\n 88123456789\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 88123456789,
"category": "PROPERTY_ALERT",
"result": "PAUSED",
"previousAlertFrequency": "NEVER",
"alertFrequency": "NEVER",
"status": "ACTIVE",
"message": "<string>"
}
]
}Path Parameters
Body
Response
Success. A request rejected by validation or by a business rule also answers HTTP 200, with {"code": <error code>, "message": "..."} in place of the result: check code in the body, not the HTTP status. Codes are listed under Errors in the Saved Searches section.
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"savedSearchIds": [
88123456789
]
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume"
payload = { "savedSearchIds": [88123456789] }
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({savedSearchIds: [88123456789]})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume', 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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume",
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([
'savedSearchIds' => [
88123456789
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume"
payload := strings.NewReader("{\n \"savedSearchIds\": [\n 88123456789\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lofty.com/v1.0/leads/{leadId}/savedSearches/resume")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"savedSearchIds\": [\n 88123456789\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/savedSearches/resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"savedSearchIds\": [\n 88123456789\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 88123456789,
"category": "PROPERTY_ALERT",
"result": "PAUSED",
"previousAlertFrequency": "NEVER",
"alertFrequency": "NEVER",
"status": "ACTIVE",
"message": "<string>"
}
]
}