# Log an activity

`POST /api/v1/quick`

Quick Entry: logs a phone call or face-to-face visit in one request. The company is matched by name (created as a prospect when missing; similar names return `409 similar`), a missing person is added, matching open actions are closed, the next action is opened and the project advances under the same rules as the web form. `parts` tells what was recorded; `warnings` and `advice` explain what needs attention.

## Body

| Field | Type | Description |
|---|---|---|
| `customer` (required) | string | Company name (exact or close). |
| `visit_type` | string | `F2F` face to face, `Call` phone, `Deneme` trial visit. Values: `F2F`, `Call`, `Deneme` |
| `visit_date` | string | Activity date (YYYY-MM-DD, default today). |
| `contact` | string | Person met (added when missing). |
| `contact_title / contact_phone / contact_email` | string | Details for a new person. |
| `topic` | string | Topic. |
| `note` | string | What was discussed. |
| `result` | string | Outcome. |
| `next_action` | string | Next action. |
| `action_date` | string | Next action date. |
| `opp_id` | integer | Project to log against. |
| `product / competitor / offer_price / payment_days / potential_kg` | mixed | Project details (same as the web form). |
| `confirm_new` | boolean | Create a new company even if similar names exist. |

## Response

```json 200
{
  "advice": null,
  "closed": [],
  "created": false,
  "customer": {
    "active": true,
    "at_risk": false,
    "city": "Bursa",
    "currency": "EUR",
    "currency_default": "",
    "id": 31,
    "initials": "KP",
    "last_visit": "2026-10-02",
    "main_contact": {
      "email": "emre.yildiz@kuzeyplastik.com.tr",
      "name": "Emre Yıldız",
      "phone": "+90 532 555 11 22",
      "wa": "905325551122"
    },
    "name": "Kuzey Plastik Sanayi",
    "next_visit_due": "2026-11-01",
    "open_opps": 1,
    "owner": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    },
    "pending_state": "soon",
    "period": 30,
    "phone": "+90 224 555 01 02",
    "potential_kg": null,
    "rid": "001QJi5Zr1Hk2VH",
    "sector": "Plastik",
    "status": "AC",
    "status_label": "Aktif Müşteri",
    "unit": "kg",
    "visit_overdue_days": -30,
    "visit_state": "ok"
  },
  "message": "Kuzey Plastik Sanayi kaydedildi: ziyaret, proje #53 Streç film tedariki.",
  "next_step": "F2F ziyaret planla ve gerçekleştir",
  "ok": true,
  "opp": {
    "bant": 4,
    "base_currency": "EUR",
    "close_date": "2026-11-16",
    "cur_sym": "€",
    "currency": "EUR",
    "customer": "Kuzey Plastik Sanayi",
    "customer_city": "Bursa",
    "customer_id": 31,
    "days_in_stage": 0,
    "detail_status": "",
    "fc": "Best Case",
    "health": {
      "grade": "success",
      "label": "sağlıklı",
      "score": 95
    },
    "health_color": "g",
    "health_manual": false,
    "health_note": "",
    "id": 53,
    "initials": "KP",
    "is_account": false,
    "is_open": true,
    "last_update": "2026-10-02",
    "lifetime_left": 180,
    "line": "",
    "name": "Streç film tedariki",
    "next_step": "F2F ziyaret planla ve gerçekleştir",
    "offer_price": 2.35,
    "owner": {
      "full_name": "Deniz Aksoy",
      "id": 1,
      "role": "admin",
      "role_label": "Yönetici",
      "username": "admin"
    },
    "payment_days": 60,
    "potential_kg": 12000.0,
    "prob": 0.25,
    "probability": null,
    "product": "",
    "product_id": null,
    "pu": "€/kg",
    "rid": "006BMHmVNZ9nFLS",
    "sla_days": 60,
    "sla_left": 60,
    "source": "",
    "stage": "Viable",
    "stage_label": "Viable",
    "start_date": "2026-10-02",
    "trend": "",
    "trend_label": "Otomatik",
    "type": "",
    "unit": "kg",
    "unit_code": "kg",
    "value": 338400.0,
    "value_base": 338400.0,
    "value_short": "338K"
  },
  "opp_new": false,
  "parts": [
    "ziyaret",
    "proje #53 Streç film tedariki"
  ],
  "visit": {
    "action_date": "2026-10-05",
    "action_done": false,
    "action_state": "soon",
    "contact": "Emre Yıldız",
    "customer": "Kuzey Plastik Sanayi",
    "customer_id": 31,
    "date": "2026-10-02",
    "id": 106,
    "line": "",
    "next_action": "Teklif gönder",
    "note": "Deneme sonuçlarını konuştuk; kalınlık 23 mikron uygun.",
    "opp": "Streç film tedariki",
    "opp_id": 53,
    "product": "",
    "result": "Olumlu",
    "rid": "00UEIXukSoU4vCq",
    "topic": "Görüşme",
    "type": "Call",
    "user": "Deniz Aksoy"
  },
  "warnings": []
}
```
