curl --request GET \
--url https://api.affinity.co/v2/field-value-changes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/field-value-changes"
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/field-value-changes', 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/field-value-changes",
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/field-value-changes"
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/field-value-changes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/field-value-changes")
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": 42,
"field": {
"id": "field-1234",
"entityType": "company",
"name": "Stage",
"type": "global"
},
"entity": {
"id": 1
},
"listEntry": {
"id": 1,
"listId": 1
},
"changer": {
"id": 1,
"firstName": "John",
"lastName": "Smith",
"emailAddress": "john.smith@contoso.com"
},
"changedAt": "2024-06-01T12:00:00Z",
"actionType": "update",
"type": "company",
"value": {
"referenceType": "entity",
"id": 1,
"name": "Horizon Technologies",
"domain": "horizontech.com"
}
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Get all field value changes
Retrieve field value changes across all entities and fields in your Affinity workspace.
For an overview of field value changes, including which fields support change tracking and how the action types behave, see Field Value Changes.
This endpoint is built for delta-sync. Within a single sync, follow pagination.nextUrl to page through results until it becomes null, which means you have reached the most recent change. To run the next incremental sync, record the changedAt of the last change you processed and, on your next sync, filter for changes newer than that timestamp (for example, filter=changedAt>2024-06-01T12:00:00Z). Do not persist nextUrl between syncs, since it is null once you are caught up. Changes are returned in ascending order of changedAt, then by internal change ID. Only fields with change tracking enabled are included.
You can filter results using the filter query parameter.
| Property Name | Type | Description | Allowed Operators | Examples |
|---|---|---|---|---|
field.id | text | = | field.id=field-1234 | |
listEntry.id | int64 | = | listEntry.id=5678 | |
changer.id | int64 | The person who made the change. | = | changer.id=9012 |
changedAt | datetime | When the change was made. | >, <, >=, <= | changedAt>=2025-01-01T00:00:00Z |
actionType | text | The type of change (add, update, delete) | = | actionType=add |
Filters can be combined:
|(OR) to match any of multiple values:field.id=field-1 | field.id=field-2&(AND) to require all conditions:changedAt>=2025-01-01T00:00:00Z & changedAt<=2025-12-31T23:59:59Z
curl --request GET \
--url https://api.affinity.co/v2/field-value-changes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/field-value-changes"
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/field-value-changes', 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/field-value-changes",
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/field-value-changes"
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/field-value-changes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/field-value-changes")
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": 42,
"field": {
"id": "field-1234",
"entityType": "company",
"name": "Stage",
"type": "global"
},
"entity": {
"id": 1
},
"listEntry": {
"id": 1,
"listId": 1
},
"changer": {
"id": 1,
"firstName": "John",
"lastName": "Smith",
"emailAddress": "john.smith@contoso.com"
},
"changedAt": "2024-06-01T12:00:00Z",
"actionType": "update",
"type": "company",
"value": {
"referenceType": "entity",
"id": 1,
"name": "Horizon Technologies",
"domain": "horizontech.com"
}
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Authorizations
A static Affinity API key, presented as a bearer token.
Query Parameters
Filter options
Properties to sort by. Defaults to changedAt. Prefix with - for descending order.
changedAt, -changedAt Cursor for the next or previous page
"ICAgICAgYmVmb3JlOjo6Nw"
Number of items to include in the page
1 <= x <= 100100
Response
OK
The field value changes for this page
100- fieldValueChanges.CompanyValueChange
- fieldValueChanges.CompanyMultiValueChange
- fieldValueChanges.DatetimeValueChange
- fieldValueChanges.DropdownValueChange
- fieldValueChanges.DropdownMultiValueChange
- fieldValueChanges.FilterableTextValueChange
- fieldValueChanges.FilterableTextMultiValueChange
- fieldValueChanges.LocationValueChange
- fieldValueChanges.LocationMultiValueChange
- fieldValueChanges.NumberValueChange
- fieldValueChanges.NumberMultiValueChange
- fieldValueChanges.PersonValueChange
- fieldValueChanges.PersonMultiValueChange
- fieldValueChanges.RankedDropdownValueChange
- fieldValueChanges.TextValueChange
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?