Get View Fields
curl --request GET \
--url https://api.lemlist.com/api/views/fields \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/views/fields"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/views/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/views/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/views/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"fields": [
{
"id": "ownerId",
"label": "Contact owner",
"type": "enum",
"operators": [
"is",
"is_not",
"is_any_of",
"is_none_of",
"is_empty",
"is_not_empty"
],
"options": [
{
"value": "__me__",
"label": "My contacts"
},
{
"value": "__teammates__",
"label": "Teammates' contacts"
},
{
"value": "__unassigned__",
"label": "Unassigned"
}
]
},
{
"id": "contactScore",
"label": "Contact score",
"type": "number",
"operators": [
"eq",
"neq",
"gt",
"lt",
"gte",
"lte",
"is_between",
"is_empty",
"is_not_empty"
]
}
]
}
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}The authentication you supplied is incorrect{
"error": "Views of this list are not enabled for this team",
"code": "ENTITY_VIEW_ENTITY_UNAVAILABLE"
}Views
Get View Fields
Lists the fields a view of that list can filter on, with their operators and accepted values.
GET
/
views
/
fields
Get View Fields
curl --request GET \
--url https://api.lemlist.com/api/views/fields \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/views/fields"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/views/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/views/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/views/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"fields": [
{
"id": "ownerId",
"label": "Contact owner",
"type": "enum",
"operators": [
"is",
"is_not",
"is_any_of",
"is_none_of",
"is_empty",
"is_not_empty"
],
"options": [
{
"value": "__me__",
"label": "My contacts"
},
{
"value": "__teammates__",
"label": "Teammates' contacts"
},
{
"value": "__unassigned__",
"label": "Unassigned"
}
]
},
{
"id": "contactScore",
"label": "Contact score",
"type": "number",
"operators": [
"eq",
"neq",
"gt",
"lt",
"gte",
"lte",
"is_between",
"is_empty",
"is_not_empty"
]
}
]
}
}{
"error": "Validation error",
"code": "VALIDATION_ERROR"
}The authentication you supplied is incorrect{
"error": "Views of this list are not enabled for this team",
"code": "ENTITY_VIEW_ENTITY_UNAVAILABLE"
}Call it before Create View or Update View: a condition on a field, an operator or a value it does not list answers
400 with ENTITY_VIEW_INVALID_FILTER.Authorizations
Query Parameters
Was this page helpful?