Get metadata on Company Fields
Changed onReturns 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
Request
- Base URLhttps://api.affinity.co
- URLhttps://api.affinity.co/v2/companies/fields
- AuthHTTP bearer
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
- info
added
authenticationauthorizationbad-requestconflictmethod-not-allowednot-acceptablenot-foundnot-implementedrate-limitservertimeoutunprocessable-entityunsupported-media-typevalidationdiscriminator mapping keys to the/response property for the response status - info
added
bad-requestvalidationdiscriminator mapping keys to the/response property for the response status - info
added
field-onlyattribute-on-fielddiscriminator mapping keys to the///response property for the response status - info
added
field-onlyattribute-on-fielddiscriminator mapping keys to the///response property for the response status - info
removed the
quarterenum value from the////////response property for the response status - info
removed the
quarterenum value from the//////////response property for the response status
- info