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
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | ✅ | Start date of the range (YYYY-MM-DD) |
endDate | string | ✅ | End date of the range (YYYY-MM-DD) |
Request Headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <token> | Authentication token |
Note: No request body is expected for this endpoint.
Response
Success Response (HTTP 200)
geojson: A standard GeoJSON FeatureCollectionfeatures: List of geographic featuresgeometry: Shape of the region (Polygon, MultiPolygon, etc.)properties: Metadata for heatmap calculationsname: Name of the regioncount: Number of incidents within the date rangetype: Region type (state,country, etc.)
Error Response (HTTP 400–500)
Any non-200 response indicates an error.
Authentication
Provide a valid JWT token in theAuthorization header.
Example Request (cURL)
Example Request (JavaScript - fetch)
Notes
- Returned GeoJSON fully conforms to the standard
FeatureCollectionformat. - The
propertiesobject always contains at leastname,count, andtype. - Dates must be formatted as
YYYY-MM-DD.