---
title: "List custom-field definitions"
canonical_url: "https://twominutebilling.com/help/developers/api-reference/custom-fields/list-custom-field-definitions"
---
# List custom-field definitions

<api-operation method="GET" path="/v1/businesses/{biz}/custom_field_definitions">
<template v-slot:docs="">

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
</tbody>
</table>

## Query parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        entity_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Only fields on this kind of record.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        include_archived
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Set to <code>
        true
      </code>
      
       to also list archived fields.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        list
      </code>
      
      . One of <code>
        list
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The rows on this page.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The custom field definition's id (cfd_…).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.entity_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The kind of record the field is on.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.api_name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The field's key in a record's <code>
        custom_fields
      </code>
      
       object.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.cf_name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The field's key when flattened onto the record, prefixed <code>
        cf_
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.label
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The custom field definition's label.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.data_type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The type of value the field holds.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.enum_options
      </code>
    </td>
    
    <td>
      <code>
        array of string
      </code>
    </td>
    
    <td>
      The allowed values, for an <code>
        enum
      </code>
      
       field.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.required
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether a value is required.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.is_pii
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether the field holds personal data.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.show_in_portal
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Whether the customer portal shows the field.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.position
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The field's sort position; lower numbers come first.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.archived
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      True if the field is archived.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.filter_kind
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The filter kind this field compares as. Use it to pick the value control; the field is filterable as <code>
        cf_<api_name>
      </code>
      
       on that entity's list. One of <code>
        text
      </code>
      
      , <code>
        enum
      </code>
      
      , <code>
        number
      </code>
      
      , <code>
        bool
      </code>
      
      , <code>
        date
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.filter_ops
      </code>
    </td>
    
    <td>
      <code>
        array of string
      </code>
    </td>
    
    <td>
      Operators this field accepts, e.g. <code>
        is
      </code>
      
      , <code>
        in
      </code>
      
      , <code>
        between
      </code>
      
      , <code>
        in_last
      </code>
      
      . Use verbatim — widening it produces a 400 on apply.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data.resource_version
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      A number that goes up on every change. Send it as <code>
        expected_version
      </code>
      
       on update.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/custom_field_definitions" \
  -H "Authorization: Bearer $TMBILLING_API_KEY"
```

</template>

<template v-slot:response="">

```json [200 OK]
{
  "object": "list",
  "data": [
    {
      "object": "custom_field_definition",
      "id": "cfd_XXXXXXXXXXXX01",
      "entity_type": "customer",
      "api_name": "seats",
      "data_type": "text"
    }
  ]
}
```

</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
