Answers.Body: <p><code>type</code> is the data type - eg Integer, String, Boolean.</p>
  <p>If you use APIv4 <code>Contact.getfields</code> returns <code>data_type</code> with more obvious strings.  For example:</p>
  <pre><code>&quot;data_type&quot;: &quot;Integer&quot;
  
  &quot;data_type&quot;: &quot;String&quot;,
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-09T18:29:19.597Z
Answers.LastActivityDate: 2020-11-09T18:29:19.597Z
Answers.UserDisplayName: Aidan
Body: <p>What does the 'type' refer to in the results of 'getfields' action of the Contact Entity. It has a numeric value (1,2, 16 etc). Below are a few sample results.</p>
  <pre><code>        &quot;id&quot;: {
          &quot;name&quot;: &quot;id&quot;,
          &quot;type&quot;: 1,
          &quot;title&quot;: &quot;Contact ID&quot;,
          &quot;description&quot;: &quot;Unique Contact ID&quot;,
          &quot;required&quot;: true,
          &quot;import&quot;: true,
          &quot;where&quot;: &quot;civicrm_contact.id&quot;,
          &quot;headerPattern&quot;: &quot;/internal|contact?|id$/i&quot;,
          &quot;export&quot;: true,
          &quot;table_name&quot;: &quot;civicrm_contact&quot;,
          &quot;entity&quot;: &quot;Contact&quot;,
          &quot;bao&quot;: &quot;CRM_Contact_BAO_Contact&quot;,
          &quot;localizable&quot;: 0,
          &quot;add&quot;: &quot;1.1&quot;,
          &quot;is_core_field&quot;: true,
          &quot;api.aliases&quot;: [
              &quot;contact_id&quot;
          ]
      },
      &quot;contact_type&quot;: {
          &quot;name&quot;: &quot;contact_type&quot;,
          &quot;type&quot;: 2,
          &quot;title&quot;: &quot;Contact Type&quot;,
          &quot;description&quot;: &quot;Type of Contact.&quot;,
          &quot;maxlength&quot;: 64,
          &quot;size&quot;: 30,
          &quot;where&quot;: &quot;civicrm_contact.contact_type&quot;,
          &quot;export&quot;: true,
          &quot;contactType&quot;: null,
          &quot;table_name&quot;: &quot;civicrm_contact&quot;,
          &quot;entity&quot;: &quot;Contact&quot;,
          &quot;bao&quot;: &quot;CRM_Contact_BAO_Contact&quot;,
          &quot;localizable&quot;: 0,
          &quot;html&quot;: {
              &quot;type&quot;: &quot;Select&quot;,
              &quot;maxlength&quot;: 64,
              &quot;size&quot;: 30
          },
          &quot;pseudoconstant&quot;: {
              &quot;table&quot;: &quot;civicrm_contact_type&quot;,
              &quot;keyColumn&quot;: &quot;name&quot;,
              &quot;labelColumn&quot;: &quot;label&quot;,
              &quot;condition&quot;: &quot;parent_id IS NULL&quot;
          },
          &quot;add&quot;: &quot;1.1&quot;,
          &quot;is_core_field&quot;: true
      },
      &quot;contact_sub_type&quot;: {
          &quot;name&quot;: &quot;contact_sub_type&quot;,
          &quot;type&quot;: 2,
          &quot;title&quot;: &quot;Contact Subtype&quot;,
          &quot;description&quot;: &quot;May be used to over-ride contact view and edit templates.&quot;,
          &quot;maxlength&quot;: 255,
          &quot;size&quot;: 45,
          &quot;import&quot;: true,
          &quot;where&quot;: &quot;civicrm_contact.contact_sub_type&quot;,
          &quot;headerPattern&quot;: &quot;/C(ontact )?(subtype|sub-type|sub type)/i&quot;,
          &quot;export&quot;: true,
          &quot;table_name&quot;: &quot;civicrm_contact&quot;,
          &quot;entity&quot;: &quot;Contact&quot;,
          &quot;bao&quot;: &quot;CRM_Contact_BAO_Contact&quot;,
          &quot;localizable&quot;: 0,
          &quot;serialize&quot;: 1,
          &quot;html&quot;: {
              &quot;type&quot;: &quot;Select&quot;,
              &quot;maxlength&quot;: 255,
              &quot;size&quot;: 45
          },
          &quot;pseudoconstant&quot;: {
              &quot;table&quot;: &quot;civicrm_contact_type&quot;,
              &quot;keyColumn&quot;: &quot;name&quot;,
              &quot;labelColumn&quot;: &quot;label&quot;,
              &quot;condition&quot;: &quot;parent_id IS NOT NULL&quot;
          },
          &quot;add&quot;: &quot;1.5&quot;,
          &quot;is_core_field&quot;: true
      },
      &quot;do_not_email&quot;: {
          &quot;name&quot;: &quot;do_not_email&quot;,
          &quot;type&quot;: 16,
          &quot;title&quot;: &quot;Do Not Email&quot;,
          &quot;import&quot;: true,
          &quot;where&quot;: &quot;civicrm_contact.do_not_email&quot;,
          &quot;headerPattern&quot;: &quot;/d(o )?(not )?(email)/i&quot;,
          &quot;dataPattern&quot;: &quot;/^\\d{1,}$/&quot;,
          &quot;export&quot;: true,
          &quot;default&quot;: &quot;0&quot;,
          &quot;table_name&quot;: &quot;civicrm_contact&quot;,
          &quot;entity&quot;: &quot;Contact&quot;,
          &quot;bao&quot;: &quot;CRM_Contact_BAO_Contact&quot;,
          &quot;localizable&quot;: 0,
          &quot;html&quot;: {
              &quot;type&quot;: &quot;CheckBox&quot;
          },
          &quot;add&quot;: &quot;1.1&quot;,
          &quot;is_core_field&quot;: true
      }
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-09T15:23:44.403Z
Comments.Text: I suspect it's the contact type and/or or contact sub type? Api v4 let's you select the load options so try with setting to   'id', 'name', 'label'  - mine returned:         "id": "Household",
          "label": "Household",
          "name": "Household"
Comments.UserDisplayName: RebeccaTregenna
Tags: <contacts><api><contact-types>
Title: Field 'Type' in Contacts -> GetFields API
ThreadText: # Field 'Type' in Contacts -> GetFields API
  
  (Asked by: username_0 on 2020-11-09)
  
  What does the 'type' refer to in the results of 'getfields' action of the Contact Entity. It has a numeric value (1,2, 16 etc). Below are a few sample results.
          "id": {
          "name": "id",
          "type": 1,
          "title": "Contact ID",
          "description": "Unique Contact ID",
          "required": true,
          "import": true,
          "where": "civicrm_contact.id",
          "headerPattern": "/internal|contact?|id$/i",
          "export": true,
          "table_name": "civicrm_contact",
          "entity": "Contact",
          "bao": "CRM_Contact_BAO_Contact",
          "localizable": 0,
          "add": "1.1",
          "is_core_field": true,
          "api.aliases": [
              "contact_id"
          ]
      },
      "contact_type": {
          "name": "contact_type",
          "type": 2,
          "title": "Contact Type",
          "description": "Type of Contact.",
          "maxlength": 64,
          "size": 30,
          "where": "civicrm_contact.contact_type",
          "export": true,
          "contactType": null,
          "table_name": "civicrm_contact",
          "entity": "Contact",
          "bao": "CRM_Contact_BAO_Contact",
          "localizable": 0,
          "html": {
              "type": "Select",
              "maxlength": 64,
              "size": 30
          },
          "pseudoconstant": {
              "table": "civicrm_contact_type",
              "keyColumn": "name",
              "labelColumn": "label",
              "condition": "parent_id IS NULL"
          },
          "add": "1.1",
          "is_core_field": true
      },
      "contact_sub_type": {
          "name": "contact_sub_type",
          "type": 2,
          "title": "Contact Subtype",
          "description": "May be used to over-ride contact view and edit templates.",
          "maxlength": 255,
          "size": 45,
          "import": true,
          "where": "civicrm_contact.contact_sub_type",
          "headerPattern": "/C(ontact )?(subtype|sub-type|sub type)/i",
          "export": true,
          "table_name": "civicrm_contact",
          "entity": "Contact",
          "bao": "CRM_Contact_BAO_Contact",
          "localizable": 0,
          "serialize": 1,
          "html": {
              "type": "Select",
              "maxlength": 255,
              "size": 45
          },
          "pseudoconstant": {
              "table": "civicrm_contact_type",
              "keyColumn": "name",
              "labelColumn": "label",
              "condition": "parent_id IS NOT NULL"
          },
          "add": "1.5",
          "is_core_field": true
      },
      "do_not_email": {
          "name": "do_not_email",
          "type": 16,
          "title": "Do Not Email",
          "import": true,
          "where": "civicrm_contact.do_not_email",
          "headerPattern": "/d(o )?(not )?(email)/i",
          "dataPattern": "/^\\d{1,}$/",
          "export": true,
          "default": "0",
          "table_name": "civicrm_contact",
          "entity": "Contact",
          "bao": "CRM_Contact_BAO_Contact",
          "localizable": 0,
          "html": {
              "type": "CheckBox"
          },
          "add": "1.1",
          "is_core_field": true
      }
  
  **Tags:** contacts, api, contact-types
  
  > **Comments:**
  > **username_1**: I suspect it's the contact type and/or or contact sub type? Api v4 let's you select the load options so try with setting to   'id', 'name', 'label'  - mine returned:         "id": "Household",         "label": "Household",         "name": "Household"  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-11-09. Score: 1 | Accepted answer
  
  type is the data type - eg Integer, String, Boolean.
  If you use APIv4 Contact.getfields returns data_type with more obvious strings.  For example:
  "data_type": "Integer"
  
  "data_type": "String",
  
  
  ---
  
  