# insights.map.view

Create a safe local Insights Map URL from canonical filters and renderer center/selection. No financial records or saved locations change.

`GET | POST /api/v1/accounting/insights.map.view`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_insights_map_view`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `filters` | object | Yes | No other fields. |
| `filters.layers` | array of enum values |  | One of: `transactions`, `trips`, `stays`, `events`, `other`. 1–5 items. |
| `filters.query` | string |  | Text to search for. 1–120 characters. |
| `filters.from` | string |  | The first date to include, as YYYY-MM-DD. Date as YYYY-MM-DD. |
| `filters.to` | string |  | The last date to include, as YYYY-MM-DD. Date as YYYY-MM-DD. |
| `filters.currency` | string |  | Three-letter currency code, such as CAD or USD. |
| `filters.entryTypes` | array of enum values |  | One of: `expense`, `income`, `income_refund`, `refund`, `transfer`, `fee`, `suspense`. 1–7 items. |
| `filters.country` | string |  | 1–120 characters. |
| `filters.region` | string |  | 1–120 characters. |
| `filters.city` | string |  | 1–120 characters. |
| `filters.bounds` | object |  | No other fields. |
| `filters.bounds.south` | number | Yes | -90 to 90. |
| `filters.bounds.north` | number | Yes | -90 to 90. |
| `filters.bounds.west` | number | Yes | -180 to 180. |
| `filters.bounds.east` | number | Yes | -180 to 180. |
| `filters.zoom` | number |  | 0 to 22. |
| `filters.groupBy` | enum |  | One of: `auto`, `region`, `city`, `grid`. |
| `renderer` | object | Yes | No other fields. |
| `renderer.lat` | number |  | -90 to 90. |
| `renderer.lon` | number |  | -180 to 180. |
| `renderer.selected` | string |  | at most 100 characters; Matches ^(?:grid:\d+(?:\.\d+)?:\d+:\d+\|(?:city\|region):[a-f0-9]{64})$. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/insights.map.view \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filters": {},
  "renderer": {}
}'
```

Reference page: https://app.getoatmilk.com/docs/api/insights.map.view
