0

How do I get the data from a custom_field_values if the field_type is pickist?

API v2 returned every field that was available. If the 'field_type' was 'picklist', I could get the 'name' from the 'custom_field_picklist_option'.

API v4 I can't figure out how to make the 'custom_field_picklist_option' availble in the returned data. I tried adding 'custom_field_picklist_option' as a filed name to the code below but it's not a valid field.

# Clio MATTER Detail
url = "https://app.clio.com/api/v4/matters/" + str(matterid) + "/?fields=display_number, description, client{id, name}, custom_field_values{field_name, field_type, value}"
DrGorilla
  • 31
  • 3

1 Answers1

0

In v4 you need picklist_option

https:// .../?fields=custom_field_values{field_name,value,picklist_option}

As far as I can tell this isn't documented anywhere. I had to email support to get that.

This will return an object that looks like:

{
  "field_name": "Your Field Name", 
  "value": 1006006, 
  "picklist_option": {
    "id": 1006006, 
    "option"=>"No"
  }
}

Works for both picklists and non-picklists (the ones that are not simply omit the picklist_option key).