Location

Location entities offer precise and structured geographical information

The /api/v2/entities/location/get/{FB_ENTITY_ID} endpoint in the Fusionbase API provides structured information about specific locations. This endpoint is crucial for accessing detailed and structured data about locations using their unique Fusionbase Entity ID (FB_ENTITY_ID).

Request Header

  • X-API-KEY: Your Fusionbase API key. This key authenticates your access to the API.

  • Content-Type: application/json. This header specifies the format of the request.

Request Structure

  • Access this endpoint via a GET request to https://api.fusionbase.com/api/v2/entities/location/get/{FB_ENTITY_ID}.

  • Replace {FB_ENTITY_ID} with the actual Fusionbase Entity ID of the location you wish to query.

Request Samples

import requests

url = "https://api.fusionbase.com/api/v2/entities/location/get/FB_ENTITY_ID"
headers = {
    "X-API-KEY": "<YOUR API KEY>",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())

Response Structure

The response is a JSON object containing various details about the location:

  • fb_entity_id: The unique Fusionbase Entity ID of the location.

  • fb_datetime: Timestamp indicating the last update or retrieval of data.

  • fb_entity_version: A version identifier for the entity's data.

  • entity_type: Type of the entity, here "LOCATION".

  • updated_at, created_at: Timestamps of the last update and creation of the entity record.

  • external_ids: External identifiers associated with the location.

  • coordinate: Geographical coordinates of the location (latitude and longitude).

  • location_level: The hierarchical level of the location (if available).

  • address_components: Detailed address components like city, state, and country.

  • alternative_names: Alternative names for the location (if any).

  • fb_semantic_id: A semantic identifier providing a structured representation of the location's key attributes.

  • formatted_address: A human-readable address format.

Response Sample

{
  "fb_entity_id": "bfcc19ddd9edb12efb9cfea181b0dcd3",
  "fb_datetime": "2024-01-24T10:24:58.231000",
  "fb_entity_version": "cbff4cb34ac7130802e07d0679aa417b",
  "entity_type": "LOCATION",
  "updated_at": "2024-01-24T10:24:58.231000",
  "created_at": "2023-11-09T16:14:38.082000",
  "external_ids": {
    "nominatim": {
      "osm_id": 62428,
      "osm_type": "relation",
      "class": "boundary"
    }
  },
  "coordinate": {
    "latitude": 48.1371079,
    "longitude": 11.5753822
  },
  "location_level": null,
  "address_components": [
    {
      "component_type": "city",
      "component_value": "Munich"
    },
    {
      "component_type": "state",
      "component_value": "Bavaria"
    },
    {
      "component_type": "country",
      "component_value": "Germany"
    }
  ],
  "alternative_names": [],
  "fb_semantic_id": "location|city_no_postal_code:germany:bavaria:munich",
  "formatted_address": "Munich, Germany"
}

Error Handling

The API uses standard HTTP response codes. Errors are indicated with 4xx (client errors) and 5xx (server errors), each accompanied by a message detailing the issue.

Notes

  • Keep the API key confidential.

Last updated