Get metadata on Company Fields
Returns metadata on non-list-specific Company Fields.
Use the returned Field IDs to request field data from the GET /v2/companies and GET /v2/companies/{id} endpoints.
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="Location", name=~loc |
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 GET /v2/companies and POST /v2/companies/search |
| sortability | How the field can be used in sort expressions on those endpoints |
Example: GET /v2/companies/fields?includes=filterability&includes=sortability
Query parameters
Cursor for the next or previous page
Number of items to include in the page
Filter options
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
No recorded changes to this endpoint across all 1 revision of this API.