---
schema_version: "1"
id: f5d7969ad48dbf2774e0cd68376037adcb579c9547c273cd82aaf460a049e8e6
title: Tooling API Examples
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/caf-dev/guides/caf/caf-dev-examples-api-tooling.md
canonical_url: https://developer.salesforce.com/docs/platform/caf-dev/guide/caf-dev-examples-api-tooling.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 316a0a8a2c322078a0492252ded51b697064f5bef486992e72beee5b44cac1a6
products:
  - Custom Address Fields Developer Guide
  - Platform Developer Content
---

# Tooling API Examples

To retrieve information about fields created with Custom Address Fields, such as the developer name, use Tooling API.

**note:** Before you enable custom address fields, review the [Custom Address Fields Requirements and Limitations](https://developer.salesforce.com/docs/platform/caf-dev/guide/caf-dev-limitations.md). To discuss the feature and ask questions, join the [Custom Address Fields Discussion](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000H3KISA0) group on the Trailblazer Community.

## Get Information About a Custom Address Field on a Record

This example uses the [CustomField](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_customfield.htm) REST HTTP GET method to retrieve information about the Mailing_Address__c custom address field, with the CustomField ID `00NXXXXXXXXXXXXXXX`.

**HTTP GET example to retrieve information about a custom address field on a record**

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/68.0/tooling/sobjects/CustomField/00NXXXXXXXXXXXXXXX -H "Authorization: Bearer token
```

**Example response**

```nolang
{
  "attributes": {
    "type": "CustomField",
    "url": "https://MyDomainName.my.salesforce.com/services/dataa68.0/tooling/sobjects/CustomField/00NXXXXXXXXXXXXXXX"
  },
  "Id": "00NXXXXXXXXXXXXXXX",
  "TableEnumOrId": "Account",
  "DeveloperName": "caf",
  "Description": null,
  "Length": null,
  "Precision": 18,
  "Scale": 15,
  "RelationshipLabel": null,
  "SummaryOperation": null,
  "InlineHelpText": null,
  "MaskType": null,
  "MaskChar": null,
  "NamespacePrefix": null,
  "ManageableState": "unmanaged",
  "CreatedDate": "2021-04-07T06:57:22.000+0000",
  "CreatedById": "005XXXXXXXXXXXXXXX",
  "LastModifiedDate": "2021-04-07T06:57:22.000+0000",
  "LastModifiedById": "005XXXXXXXXXXXXXXX",
  "EntityDefinitionId": "Account",
  "Metadata": {
    "businessOwnerGroup": null,
    "businessOwnerUser": null,
    "businessStatus": null,
    "caseSensitive": null,
    "complianceGroup": null,
    "customDataType": null,
    "defaultValue": null,
    "deleteConstraint": null,
    "deprecated": null,
    "description": null,
    "displayFormat": null,
    "displayLocationInDecimal": null,
    "encryptionScheme": null,
    "escapeMarkup": null,
    "externalDeveloperName": null,
    "externalId": false,
    "formula": null,
    "formulaTreatBlanksAs": null,
    "inlineHelpText": null,
    "isAIPredictionField": null,
    "isConvertLeadDisabled": null,
    "isFilteringDisabled": null,
    "isNameField": null,
    "isSortingDisabled": null,
    "label": "caf",
    "length": null,
    "lookupFilter": null,
    "maskChar": null,
    "maskType": null,
    "metadataRelationshipControllingField": null,
    "mktDataLakeFieldAttributes": null,
    "mktDataModelFieldAttributes": null,
    "populateExistingRows": null,
    "precision": null,
    "readOnlyProxy": null,
    "referenceTargetField": null,
    "referenceTo": null,
    "relationshipLabel": null,
    "relationshipName": null,
    "relationshipOrder": null,
    "reparentableMasterDetail": null,
    "required": null,
    "restrictedAdminField": null,
    "scale": null,
    "securityClassification": null,
    "startingNumber": null,
    "stripMarkup": null,
    "summarizedField": null,
    "summaryFilterItems": null,
    "summaryForeignKey": null,
    "summaryOperation": null,
    "trackFeedHistory": false,
    "trackHistory": null,
    "trackTrending": null,
    "translateData": null,
    "type": "Address",
    "unique": null,
    "urls": null,
    "valueSet": null,
    "visibleLines": null,
    "writeRequiresMasterRead": null
  },
  "FullName": "Account.caf__c"
}
```

## Query Information About a Custom Address Field on a Record

This example uses the [CustomField](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_customfield.htm) REST HTTP Query method to retrieve the developer name of the Mailing_Address__c custom address field with CustomField ID `00NXXXXXXXXXXXXXXX`.

**Example query to retrieve the DeveloperName for a custom address field**

```nolang
Select+id,DeveloperName+from+CustomField+where+Id='00NXXXXXXXXXXXXXXX'
```

**HTTP Query example to retrieve information using the query**

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/68.0/tooling/query?q=Select+id,DeveloperName+from+CustomField+where+Id='00NXXXXXXXXXXXXXXX -H "Authorization: Bearer token"
```

**Example response**

```nolang
{
  "size": 1,
  "totalSize": 1,
  "done": true,
  "queryLocator": null,
  "entityTypeName": "CustomField",
  "records": [
    {
      "attributes": {
        "type": "CustomField",
        "url": "/services/data/v54.0/tooling/sobjects/CustomField/00NXXXXXXXXXXXXXXX"
      },
      "Id": "00NXXXXXXXXXXXXXXX",
      "DeveloperName": "Mailing_Address"
    }
  ]
}
```

