curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/fields', 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.affinity.co/v2/lists/{listId}/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: Bearer <token>"
],
]);
$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.affinity.co/v2/lists/{listId}/fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/lists/{listId}/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "affinity-data-description",
"name": "Description",
"type": "enriched",
"valueType": "text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-industry",
"name": "Industry",
"type": "enriched",
"valueType": "filterable-text-multi",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-investment-stage",
"name": "Investment Stage",
"type": "enriched",
"valueType": "filterable-text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-investors",
"name": "Investors",
"type": "enriched",
"valueType": "filterable-text-multi",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-last-funding-amount",
"name": "Last Funding Amount (USD)",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-last-funding-date",
"name": "Last Funding Date",
"type": "enriched",
"valueType": "datetime",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-linkedin-url",
"name": "LinkedIn URL",
"type": "enriched",
"valueType": "text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-location",
"name": "Location",
"type": "enriched",
"valueType": "location",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-number-of-employees",
"name": "Number of Employees",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-total-funding-amount",
"name": "Total Funding Amount (USD)",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-year-founded",
"name": "Year Founded",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "field-1",
"name": "Custom global field",
"type": "global",
"valueType": "text",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "field-2",
"name": "Custom list field",
"type": "list",
"valueType": "text",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "first-chat-message",
"name": "First Chat Message",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "first-email",
"name": "First Email",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "first-event",
"name": "First Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-chat-message",
"name": "Last Chat Message",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-contact",
"name": "Last Contact",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-email",
"name": "Last Email",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-event",
"name": "Last Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "next-event",
"name": "Next Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "source-of-introduction",
"name": "Source of Introduction",
"type": "relationship-intelligence",
"valueType": "person",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}Get metadata on a single List's Fields
Returns metadata on the Fields available on a single List.
Use the returned Field IDs to request field data from the GET /v2/lists/{listId}/list-entries
endpoint.
You can filter Fields using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties.
| Property Name | Type | Allowed Operators | Examples |
|---|---|---|---|
name | text | =, =~ | name="Status", name=~stat |
Use the includes query parameter to add optional metadata to each Field in the response. Pass includes more than once to request multiple values.
| Value | Adds to each Field |
|---|---|
filterability | How the field can be used in filter expressions on POST /v2/lists/{listId}/list-entries/search |
sortability | How the field can be used in sort expressions on that endpoint |
Example: GET /v2/lists/{listId}/fields?includes=filterability&includes=sortability
curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/fields', 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.affinity.co/v2/lists/{listId}/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: Bearer <token>"
],
]);
$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.affinity.co/v2/lists/{listId}/fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/lists/{listId}/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "affinity-data-description",
"name": "Description",
"type": "enriched",
"valueType": "text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-industry",
"name": "Industry",
"type": "enriched",
"valueType": "filterable-text-multi",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-investment-stage",
"name": "Investment Stage",
"type": "enriched",
"valueType": "filterable-text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-investors",
"name": "Investors",
"type": "enriched",
"valueType": "filterable-text-multi",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-last-funding-amount",
"name": "Last Funding Amount (USD)",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-last-funding-date",
"name": "Last Funding Date",
"type": "enriched",
"valueType": "datetime",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-linkedin-url",
"name": "LinkedIn URL",
"type": "enriched",
"valueType": "text",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-location",
"name": "Location",
"type": "enriched",
"valueType": "location",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-number-of-employees",
"name": "Number of Employees",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-total-funding-amount",
"name": "Total Funding Amount (USD)",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "affinity-data-year-founded",
"name": "Year Founded",
"type": "enriched",
"valueType": "number",
"enrichmentSource": "affinity-data",
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "field-1",
"name": "Custom global field",
"type": "global",
"valueType": "text",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "field-2",
"name": "Custom list field",
"type": "list",
"valueType": "text",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
},
{
"id": "first-chat-message",
"name": "First Chat Message",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "first-email",
"name": "First Email",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "first-event",
"name": "First Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-chat-message",
"name": "Last Chat Message",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-contact",
"name": "Last Contact",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-email",
"name": "Last Email",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "last-event",
"name": "Last Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "next-event",
"name": "Next Event",
"type": "relationship-intelligence",
"valueType": "interaction",
"enrichmentSource": null,
"createdAt": null
},
{
"id": "source-of-introduction",
"name": "Source of Introduction",
"type": "relationship-intelligence",
"valueType": "person",
"enrichmentSource": null,
"createdAt": "2024-03-07T20:21:42Z"
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
List ID
1 <= x <= 9007199254740991Query Parameters
Cursor for the next or previous page
"ICAgICAgYmVmb3JlOjo6Nw"
Number of items to include in the page
1 <= x <= 100100
Filter options
Additional properties to include in the response
filterability, sortability Was this page helpful?