Skip to main content

Geo Map Filters

Returns a list of geographic filter options based on the specified date range.

Endpoint

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

URL Parameters

ParameterTypeRequiredDescription
startDatestringStart date of the range (YYYY-MM-DD)
endDatestringEnd date of the range (YYYY-MM-DD)

Request Headers

HeaderValueDescription
AuthorizationBearer <token>Authentication token
Note: This endpoint does not accept a request body.

Response

Success Response (HTTP 200)

{
  "message": "",
  "data": {
    "filters": [
      {
        "key": "string",
        "label": "string",
        "states": ["CA", "NY", "TX"]
      }
    ]
  }
}
  • filters: List of available geographic filters
    • key: Identifier for the filter
    • label: Display name for the filter
    • states: List of US states when applicable (empty for non-US entries)

Error Response (HTTP 400–500)

{
  "message": "Invalid params",
  "data": {}
}
Any non-200 status code indicates an error.

Authentication

Provide a valid token using the Authorization header.

Example Request (cURL)

curl -X GET "https://yourdomain.com/hubspot/stats/geo-map-filters/2025-11-01/2025-11-15" \
-H "Authorization: Bearer YOUR_TOKEN"

Example Request (JavaScript - fetch)

const res = await fetch(
  "/hubspot/stats/geo-map-filters/2025-11-01/2025-11-15",
  {
    method: "GET",
    headers: { "Authorization": "Bearer YOUR_TOKEN" }
  }
);

const data = await res.json();
console.log(data);

Notes

  • Returned filters may include a states array only when applicable (US regions).
  • Dates must be in YYYY-MM-DD format.