v1

latestOpenAPI 3.1.1Proprietary2026-07-2687313591.4 KB
Lists

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 NameTypeAllowed OperatorsExamples
nametext=, =~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.

ValueAdds to each Field
filterabilityHow the field can be used in filter expressions on POST /v2/lists/{listId}/list-entries/search
sortabilityHow the field can be used in sort expressions on that endpoint

Example: GET /v2/lists/{listId}/fields?includes=filterability&includes=sortability

get/v2/lists/{listId}/fields

Path parameters

listIdinteger required

List ID

Query parameters

cursorstring
Example:ICAgICAgYmVmb3JlOjo6Nw

Cursor for the next or previous page

limitinteger
Example:100

Number of items to include in the page

filterstring

Filter options

includesstring[]

Additional properties to include in the response

Response

OK

Example response

{
  "data": [
    {
      "id": "affinity-data-location",
      "name": "Location",
      "type": "enriched",
      "enrichmentSource": "affinity-data",
      "valueType": "location",
      "createdAt": "2024-03-07T20:21:42Z",
      "filterability": {
        "operators": [
          {
            "id": "is-any-of",
            "name": "Is any of"
          }
        ]
      },
      "sortability": {
        "attributes": [
          {
            "id": "date-of-activity",
            "name": "Date of Activity",
            "valueType": "date"
          }
        ]
      }
    }
  ],
  "pagination": {
    "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
    "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
  }
}