Other Operations
Add Inquiry
Place an inquiry for a lead.
POST
/
v1.0
/
leads
/
{leadId}
/
inquiry
Add Inquiry
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/inquiry \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"priceMin": 1,
"priceMax": 10000000,
"propertyType": [
"Single Family Home",
"Condo"
],
"bedroomsMin": 1,
"bathroomsMin": "1",
"locations": [
{
"city": "Austin",
"stateCode": "TX"
}
],
"id": 123,
"leadUserId": 123,
"bedroomsMax": 123,
"bathroomsMax": "<string>",
"modifyByAgent": true,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"defaultValue": true
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/inquiry"
payload = {
"priceMin": 1,
"priceMax": 10000000,
"propertyType": ["Single Family Home", "Condo"],
"bedroomsMin": 1,
"bathroomsMin": "1",
"locations": [
{
"city": "Austin",
"stateCode": "TX"
}
],
"id": 123,
"leadUserId": 123,
"bedroomsMax": 123,
"bathroomsMax": "<string>",
"modifyByAgent": True,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"defaultValue": True
}
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({
priceMin: 1,
priceMax: 10000000,
propertyType: ['Single Family Home', 'Condo'],
bedroomsMin: 1,
bathroomsMin: '1',
locations: [{city: 'Austin', stateCode: 'TX'}],
id: 123,
leadUserId: 123,
bedroomsMax: 123,
bathroomsMax: '<string>',
modifyByAgent: true,
createTime: '2023-11-07T05:31:56Z',
updateTime: '2023-11-07T05:31:56Z',
defaultValue: true
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/inquiry', 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}/inquiry",
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([
'priceMin' => 1,
'priceMax' => 10000000,
'propertyType' => [
'Single Family Home',
'Condo'
],
'bedroomsMin' => 1,
'bathroomsMin' => '1',
'locations' => [
[
'city' => 'Austin',
'stateCode' => 'TX'
]
],
'id' => 123,
'leadUserId' => 123,
'bedroomsMax' => 123,
'bathroomsMax' => '<string>',
'modifyByAgent' => true,
'createTime' => '2023-11-07T05:31:56Z',
'updateTime' => '2023-11-07T05:31:56Z',
'defaultValue' => true
]),
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}/inquiry"
payload := strings.NewReader("{\n \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\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}/inquiry")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/inquiry")
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 \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\n}"
response = http.request(request)
puts response.read_body{
"leadId": 651095960136641
}Path Parameters
Body
application/json
LeadInquirys
Price range lower end
Example:
1
Price range higher end
Example:
10000000
Property types: Single Family Home, Multi-Family, Condo, Townhouse, Mobile Home, Manufactured Home, Vacant Land, Commercial.
Example:
["Single Family Home", "Condo"]
Bed Rooms
Example:
1
Bath Rooms
Example:
"1"
Areas the lead is interested in. Each entry is a Location object (city, stateCode, zipCode, county, streetAddress or description). Used by routing rules when the lead's leadTypes do not include Seller (1).
Show child attributes
Show child attributes
Example:
[{ "city": "Austin", "stateCode": "TX" }]
Response
200 - application/json
Successful operation.
Response containing the lead ID.
ID of the lead.
Example:
651095960136641
⌘I
Add Inquiry
curl --request POST \
--url https://api.lofty.com/v1.0/leads/{leadId}/inquiry \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"priceMin": 1,
"priceMax": 10000000,
"propertyType": [
"Single Family Home",
"Condo"
],
"bedroomsMin": 1,
"bathroomsMin": "1",
"locations": [
{
"city": "Austin",
"stateCode": "TX"
}
],
"id": 123,
"leadUserId": 123,
"bedroomsMax": 123,
"bathroomsMax": "<string>",
"modifyByAgent": true,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"defaultValue": true
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/inquiry"
payload = {
"priceMin": 1,
"priceMax": 10000000,
"propertyType": ["Single Family Home", "Condo"],
"bedroomsMin": 1,
"bathroomsMin": "1",
"locations": [
{
"city": "Austin",
"stateCode": "TX"
}
],
"id": 123,
"leadUserId": 123,
"bedroomsMax": 123,
"bathroomsMax": "<string>",
"modifyByAgent": True,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"defaultValue": True
}
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({
priceMin: 1,
priceMax: 10000000,
propertyType: ['Single Family Home', 'Condo'],
bedroomsMin: 1,
bathroomsMin: '1',
locations: [{city: 'Austin', stateCode: 'TX'}],
id: 123,
leadUserId: 123,
bedroomsMax: 123,
bathroomsMax: '<string>',
modifyByAgent: true,
createTime: '2023-11-07T05:31:56Z',
updateTime: '2023-11-07T05:31:56Z',
defaultValue: true
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/inquiry', 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}/inquiry",
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([
'priceMin' => 1,
'priceMax' => 10000000,
'propertyType' => [
'Single Family Home',
'Condo'
],
'bedroomsMin' => 1,
'bathroomsMin' => '1',
'locations' => [
[
'city' => 'Austin',
'stateCode' => 'TX'
]
],
'id' => 123,
'leadUserId' => 123,
'bedroomsMax' => 123,
'bathroomsMax' => '<string>',
'modifyByAgent' => true,
'createTime' => '2023-11-07T05:31:56Z',
'updateTime' => '2023-11-07T05:31:56Z',
'defaultValue' => true
]),
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}/inquiry"
payload := strings.NewReader("{\n \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\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}/inquiry")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/inquiry")
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 \"priceMin\": 1,\n \"priceMax\": 10000000,\n \"propertyType\": [\n \"Single Family Home\",\n \"Condo\"\n ],\n \"bedroomsMin\": 1,\n \"bathroomsMin\": \"1\",\n \"locations\": [\n {\n \"city\": \"Austin\",\n \"stateCode\": \"TX\"\n }\n ],\n \"id\": 123,\n \"leadUserId\": 123,\n \"bedroomsMax\": 123,\n \"bathroomsMax\": \"<string>\",\n \"modifyByAgent\": true,\n \"createTime\": \"2023-11-07T05:31:56Z\",\n \"updateTime\": \"2023-11-07T05:31:56Z\",\n \"defaultValue\": true\n}"
response = http.request(request)
puts response.read_body{
"leadId": 651095960136641
}