Retrieve all custom fields for contacts
GET /v2/contact/custom_fields HTTP/1.1
Accept: application/json
Authorization: Bearer $ACCESS_TOKEN
curl -v -X GET https://api.getbase.com/v2/contact/custom_fields \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
require 'restclient'
headers = {
"Accept" => "application/json",
"Authorization" => "Bearer $ACCESS_TOKEN"
}
response = RestClient.execute method: :get, url: "https://api.getbase.com/v2/contact/custom_fields", headers: headers
puts response
import requests
import json
response = requests.get(
url='https://api.getbase.com/v2/contact/custom_fields',
headers={
'Accept': 'application/json',
'Authorization': 'Bearer $ACCESS_TOKEN'
},
verify=True
)
print(response.text)
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Language: en
{
"items": [
{
"data": {
"id": 1,
"name": "Url",
"created_at": "2016-12-13T16:42:44Z",
"updated_at": "2018-05-02T09:27:54Z",
"for_organisation": true,
"for_contact": true,
"type": "url",
"choices": null
},
"meta": {
"type": "custom_field"
}
},
{
"data": {
"id": 2,
"name": "Division Name",
"created_at": "2017-02-15T10:32:57Z",
"updated_at": "2018-09-17T11:24:51Z",
"for_organisation": false,
"for_contact": true,
"type": "string",
"choices": null
},
"meta": {
"type": "custom_field"
}
},
{
"data": {
"id": 3,
"name": "Industry Group",
"created_at": "2018-06-20T14:43:49Z",
"updated_at": "2018-07-04T08:04:06Z",
"for_organisation": true,
"for_contact": true,
"type": "list",
"choices": [
{
"id": 1,
"name": "Capital Goods"
},
{
"id": 2,
"name": "Diversified Financial Services"
},
{
"id": 3,
"name": "Food, Beverage & Tobacco"
}
]
},
"meta": {
"type": "custom_field"
}
}
],
"meta": {
"type": "collection",
"count": 3,
"links": {
}
}
}