# I'm here (check in)

`POST /api/v1/visits/checkin`

Records arrival at a company with a location. If the company's location is known the distance and status (`ok` · `far` · `low`) are calculated. If not, against the approximate point found from the company's address: far from the address gives `far` (no company location is set); consistent with the address and accuracy better than ±250 m makes this point the company location (`set`). `checkin.base` says what the distance is measured against (`firm` · `addr`); `checkin.title` + `checkin.detail` are the text to show. The previous open check-in becomes *left*. When the visit is saved with Quick Entry the check-in is attached to it and the duration is calculated. Response: `checkin`, `message`. `400 off` when the setting is off, `400 no_geo` without a location.

## Body

| Field | Type | Description |
|---|---|---|
| `customer_id` | integer | Company id (or `customer` name). |
| `customer` | string | Company name (when no id). |
| `geo_lat / geo_lng / geo_acc` (required) | number | Latitude, longitude, accuracy (m) — or `geo: {lat, lng, acc}`. |
