# Visits

`GET /api/v1/visits`

The visit / activity list (by day, then entry time, newest first). Row: the visit fields + `geo` (location summary — only for the person who logged it and admins; null for others): `st` (`ok` at the company · `far` away · `set` the company location was saved from this visit · `low` uncertain · `none` no location), `label`, `short`, `dist` (m), `in_time`, `out_time`, `duration` (min), `acc`, `in` / `out` / `firm` ([lat, lng]), `note`, `src` (`app` · `web` · `claude`); plus `time` (arrival time, if allowed), `user_id`, `customer_status`, `customer_city`, `can_edit`, `url`. Response: `rows`, `total`, `page`, `pages`, `has_next`, `stats` (`n`, `f2f`, `onsite`, `located`, `ok`, `located_pct`, `ok_pct`, `pending`), `scope`, `range`, `date_from`, `date_to`, `ranges`, `team` (whether the team scope is available), `geo_mode`, `radius`.

## Query parameters

| Field | Type | Description |
|---|---|---|
| `scope` | string | `mine` (sales default), `team` the team I can see (admin default). Values: `mine`, `team` |
| `range` | string | Period. Values: `today`, `week`, `month`, `30`, `90`, `all` |
| `date_from / date_to` | string | Date range (YYYY-MM-DD) — overrides the period. |
| `type` | string | Activity type. Values: `F2F`, `Online`, `Call`, `Deneme` |
| `owner` | integer | Salesperson (team scope). |
| `customer_id` | integer | Only this company (period defaults to `all`). |
| `q` | string | Search company, note, result or topic. |
| `pending` | boolean | Only those with an open next action. |
| `geo` | string | `none` on-site visits without a location, `far` away from the company (sales users: their own only). Values: `none`, `far` |
| `page` | integer | Page. |
| `per_page` | integer | Per page (10–100). |
