> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/developer-documentation/case-data-api/field-reference.md).

# Field Reference

Custom fields are found by their own name or ID, so there is nothing to look up for those. Case fields and contact fields are different: they are a fixed list, and the names must be spelled exactly as they appear here, capitalisation included.

## Case fields

Requested as `case.<field>`, for example `case.CaseReference`.

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>CaseReference</code></td><td>The full case reference.</td></tr><tr><td><code>CaseDescription</code></td><td>The case description.</td></tr><tr><td><code>CaseType</code></td><td>The name of the case type.</td></tr><tr><td><code>CaseStatus</code></td><td>The case status as text.</td></tr><tr><td><code>CaseEmail</code></td><td>The case's own email address.</td></tr><tr><td><code>Labels</code></td><td>The labels on the case.</td></tr><tr><td><code>OpenDate</code></td><td>When the case was opened. Returned with a type of <code>DateTime</code>.</td></tr><tr><td><code>PlannedCompletionDate</code></td><td>The planned completion date. Returned with a type of <code>DateTime</code>.</td></tr><tr><td><code>FullDetailsOfTransaction</code></td><td>The transaction details held on the case.</td></tr></tbody></table>

### People on the case

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>FeeEarner</code></td><td>The fee earner's display name.</td></tr><tr><td><code>FeeEarnerEmail</code></td><td>The fee earner's email address.</td></tr><tr><td><code>PartnerEarner</code></td><td>The partner's display name. Note the name of this field.</td></tr><tr><td><code>ClientName</code></td><td>The client's display name.</td></tr><tr><td><code>ClientCode</code></td><td>The client's contact code.</td></tr><tr><td><code>SourceName</code></td><td>The source's display name.</td></tr><tr><td><code>SourceCode</code></td><td>The source's contact code.</td></tr></tbody></table>

### The current user

These describe whoever is using the system at the time, not anyone recorded on the case. They are useful for scripts that behave differently depending on who is looking.

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>CurrentUserName</code></td><td>The signed-in user's display name.</td></tr><tr><td><code>CurrentUserInitials</code></td><td>The signed-in user's initials.</td></tr><tr><td><code>CurrentUserEmail</code></td><td>The signed-in user's email address.</td></tr></tbody></table>

### Billing

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>HourlyRateApplicable</code></td><td><code>True</code> or <code>False</code>, as text.</td></tr><tr><td><code>HourlyRate</code></td><td>The billing rate, when an hourly rate applies. Empty otherwise.</td></tr><tr><td><code>FixedFee</code></td><td>The fixed fee amount.</td></tr></tbody></table>

## Contact fields

Requested as `contact.<relationship>.<field>`, for example `contact.Client.Email`. The same field names apply whichever relationship you ask for.

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>Name</code></td><td>The contact's display name.</td></tr><tr><td><code>KnownAs</code></td><td>What the contact is known as.</td></tr><tr><td><code>ClientCode</code></td><td>The contact's code.</td></tr><tr><td><code>Labels</code></td><td>The labels on the contact.</td></tr><tr><td><code>Email</code></td><td>The contact's main email address.</td></tr><tr><td><code>Phone</code></td><td>The contact's main phone number.</td></tr></tbody></table>

### Personal details

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>Title</code></td><td>Mr, Mrs, Dr and so on.</td></tr><tr><td><code>FirstName</code></td><td>The contact's first name.</td></tr><tr><td><code>LastName</code></td><td>The contact's last name.</td></tr><tr><td><code>Gender</code></td><td>The contact's gender as text.</td></tr><tr><td><code>DOB</code></td><td>The date of birth, formatted as <code>dd/MM/yyyy</code>.</td></tr><tr><td><code>SocialSecurityNumber</code></td><td>The contact's national insurance or social security number.</td></tr></tbody></table>

{% hint style="warning" %}
These six fields only exist on contacts that are people. Asking for one on a company contact does not return a polite error, it fails the whole request. If a relationship might hold either a person or a company, request `Name` instead, or handle the failure.
{% endhint %}

### Address

<table><thead><tr><th width="270">Field</th><th>Value</th></tr></thead><tbody><tr><td><code>AddressBlock</code></td><td>The whole address as one block of text, ready to display.</td></tr><tr><td><code>AddressLine1</code></td><td>The first line of the street address.</td></tr><tr><td><code>AddressLine2</code></td><td>The second line of the street address.</td></tr><tr><td><code>City</code></td><td>The town or city.</td></tr><tr><td><code>State</code></td><td>The county or state.</td></tr><tr><td><code>Zip</code></td><td>The postcode.</td></tr><tr><td><code>Country</code></td><td>The country.</td></tr></tbody></table>

Where a contact has more than one email address, phone number or address, these fields return the first one held. There is no way to ask for a specific one.

## Anything not on these lists

A name that is not recognised comes back as an entry with an `error` rather than failing the whole request, so a typo in one token still leaves the others usable. See [Response Format](/developer-documentation/case-data-api/response-format.md) for how those errors appear.

For anything beyond these lists, use a custom field. Custom fields are requested by their own name or ID, and there is no fixed vocabulary to match.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/developer-documentation/case-data-api/field-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
