Skip to main content
PATCH
/
v2
/
lists
/
{listId}
/
list-entries
/
{listEntryId}
/
fields
Perform batch operations on a list entry's fields
curl --request PATCH \
  --url https://api.affinity.co/v2/lists/{listId}/list-entries/{listEntryId}/fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operation": "update-fields",
  "updates": [
    {
      "id": "field-1",
      "value": {
        "type": "company",
        "data": {
          "id": 1
        }
      }
    },
    {
      "id": "field-2",
      "value": {
        "type": "company-multi",
        "data": [
          {
            "id": 1
          },
          {
            "id": 2
          }
        ]
      }
    },
    {
      "id": "field-3",
      "value": {
        "type": "datetime",
        "data": "2023-01-01T00:00:00Z"
      }
    },
    {
      "id": "field-4",
      "value": {
        "type": "dropdown",
        "data": {
          "dropdownOptionId": 1
        }
      }
    },
    {
      "id": "field-5",
      "value": {
        "type": "dropdown-multi",
        "data": [
          {
            "dropdownOptionId": 1
          },
          {
            "dropdownOptionId": 2
          }
        ]
      }
    },
    {
      "id": "field-6",
      "value": {
        "type": "location",
        "data": {
          "streetAddress": "1 Main Street",
          "city": "San Francisco",
          "state": "California",
          "country": "United States",
          "continent": "North America"
        }
      }
    },
    {
      "id": "field-7",
      "value": {
        "type": "location-multi",
        "data": [
          {
            "streetAddress": "1 Main Street",
            "city": "San Francisco",
            "state": "California",
            "country": "United States",
            "continent": "North America"
          },
          {
            "streetAddress": "1600 Pennsylvania Avenue NW",
            "city": "Washington",
            "state": "DC",
            "country": "United States",
            "continent": "North America"
          }
        ]
      }
    },
    {
      "id": "field-8",
      "value": {
        "type": "number",
        "data": 100
      }
    },
    {
      "id": "field-9",
      "value": {
        "type": "number-multi",
        "data": [
          100,
          200,
          300
        ]
      }
    },
    {
      "id": "field-10",
      "value": {
        "type": "person",
        "data": {
          "id": 1
        }
      }
    },
    {
      "id": "field-11",
      "value": {
        "type": "person-multi",
        "data": [
          {
            "id": 1
          },
          {
            "id": 2
          }
        ]
      }
    },
    {
      "id": "field-12",
      "value": {
        "type": "ranked-dropdown",
        "data": {
          "dropdownOptionId": 1
        }
      }
    },
    {
      "id": "field-13",
      "value": {
        "type": "text",
        "data": "Some new text"
      }
    }
  ]
}
'
{
  "operation": "update-fields"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

listId
integer<int64>
required

List ID

Required range: 1 <= x <= 9007199254740991
listEntryId
integer<int64>
required

List Entry ID

Required range: 1 <= x <= 9007199254740991

Body

application/json

Update multiple field values.

operation
string
required
Allowed value: "update-fields"
updates
object[]
required
Maximum array length: 100

Response

OK

operation
enum<string>
Available options:
update-fields