Skip to main content

Geo Map

Returns GeoJSON data containing geographical features enriched with incident statistics, used for rendering heatmaps.

Endpoint

GET /hubspot/stats/geo-map/:startDate/:endDate

URL Parameters

Request Headers

Note: No request body is expected for this endpoint.

Response

Success Response (HTTP 200)

Field descriptions:
  • geojson: A standard GeoJSON FeatureCollection
  • features: List of geographic features
    • geometry: Shape of the region (Polygon, MultiPolygon, etc.)
    • properties: Metadata for heatmap calculations
      • name: Name of the region
      • count: Number of incidents within the date range
      • type: Region type (state, country, etc.)

Error Response (HTTP 400–500)

Any non-200 response indicates an error.

Authentication

Provide a valid JWT token in the Authorization header.

Example Request (cURL)


Example Request (JavaScript - fetch)


Notes

  • Returned GeoJSON fully conforms to the standard FeatureCollection format.
  • The properties object always contains at least name, count, and type.
  • Dates must be formatted as YYYY-MM-DD.