0

I have been using a custom field called "status" (type is text_area) to track the status of a bunch of cases I have for one client. The id is 12164466. I can print a list of matters using a python script and the API. I want to add the value for the status field to the printout but am stuck. I am a practicing lawyer (just me and two paralegals). Coding is a new hobby to me. I am just now figuring out how to access information in the API and hope to develop some scripts to automate some tedious tasks.

On a related note, I would be willing to pay someone to work with me to help automate some tasks. I have hundreds of property damage claims sent to me from a utility company. The claim files are all structured the same in a zip file. I would like to extract information from the zip files and use it to create a new matter and populate custom fields. I would also like to use the status field to automate the completion of a status update spreadsheet to the client.

This is what I have to print the matter list. I'm not sure what to do from here.

headers = {
    'Authorization': f"Bearer {access_token}",
    'Content-Type': 'application/json'
}

response = requests.get('https://app.clio.com/api/v4/matters.json', headers=headers)
response_json = response.json()

# Print the list of matters
print("Matter list:")
for matter in response_json['data']:
    print(f"{matter['display_number']}")

2 Answers2

0

I see that I had to include the custom fields in the query because the API does not return custom field values by default.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 09 '23 at 00:15
0

Assuming you want to get a list of the matter ID's, per the API documentation, you would want to query the /api/v4/matters.json endpoint, but you would want include it in the requested fields:

?fields=id,custom_field_values{value}

If your custom field is a drop down list, you would also want to include the picklist option for ease of reading / parsing:

?fields=id,custom_field_values{picklist_option}

Most likely you have other custom fields that are not needed in this situation, so to ensure you're only getting the one field you need, you could also include an additional parameter in your URL:

?custom_field_ids[]=######

With the # being whatever the ID is for your particular custom field.

Putting it all together, I would suggest the following URL for your request:

https://app.clio.com/api/v4/matters.json?fields=id,custom_field_values{value,picklist_option}&custom_field_ids[]=######

**Or whatever address is appropriate for your specific region.

J. Tucker
  • 83
  • 6