Lists

Get metadata on a single List's Fields

Changed on

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

Request

  • Base URL
    https://api.affinity.co
  • URL
    https://api.affinity.co/v2/lists/{listId}/fields
  • Auth
    HTTP bearer

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"
  }
}

Changes

    • info

      added authentication authorization bad-request conflict method-not-allowed not-acceptable not-found not-implemented rate-limit server timeout unprocessable-entity unsupported-media-type validation discriminator mapping keys to the / response property for the response status

    • info

      added bad-request validation discriminator mapping keys to the / response property for the response status

    • info

      added field-only attribute-on-field discriminator mapping keys to the /// response property for the response status

    • info

      added field-only attribute-on-field discriminator mapping keys to the /// response property for the response status

    • info

      removed the quarter enum value from the //////// response property for the response status

    • info

      removed the quarter enum value from the ////////// response property for the response status