Step 2: Entities API Updates in Practice

Let’s take a closer look at some of these updates in practice.

URI Format for Entities: List (Method: GET)

Sample Response:

{
	"meta": {
        "accountId": "4302517710493931126",
        "uid": "vlZJyo",
        "id": "5041913364914905161",
        "timestamp": "2018-12-31T11:46:49",
        "folderId": "0",
        "language": "en",
        "countryCode": "US",
        "entityType": "location"
    },
    "address": {
        "line1": "1 Madison Ave",
        "city": "New York",
        "region": "NY",
        "postalCode": "10001",
        "extraDescription": "Brooklyn"
    },
    "addressHidden": true,
    "name": "Bill's Coffee Joint",
    "featuredMessage": {
        "description": "Rainbow bagels!",
        "url": "http://example.com"
    },
    "isoRegionCode": "NY",
    "mainPhone": "+15185555340",
    "mobilePhone": "+15185556899",
    "timezone": "America/New_York",
    "yextDisplayCoordinate": {
        "latitude": 40.7410895,
        "longitude": -73.98750919999999
    },
    "yextRoutableCoordinate": {
        "latitude": 40.7411640951893,
        "longitude": -73.987830606551
    },
    "categoryIds": [
        "163"
    ],
    "timeZoneUtcOffset": "-04:00"
}

URI Format for Entities: Create (Method: POST)

Note that that entityType must be included in the request URI when creating a new entity.

Sample Request Body:

{
    "address": {
        "line1": "1 Madison Ave",
        "city": "New York",
        "region": "NY",
        "postalCode": "10001",
        "extraDescription": "Brooklyn"
    },
    "addressHidden": true,
    "name": "Bill's Coffee Joint",
    "featuredMessage": {
        "description": "Rainbow bagels!",
        "url": "http://example.com"
    },
    "mainPhone": "+15185555340",
    "mobilePhone": "+15185556899",
    "meta": {

        "id": "NEWENTITY",
        "folderId": "0",
        "language": "en",
        "countryCode": "US",
        "entityType": "location"
    },
    "categoryIds": [
        "163"
    ]
}
light bulb
Want to learn more?
As you migrate from Locations to Entities, we encourage you to take advantage of our Entities API documentation.
Feedback