Trade fairs & leads
Convert a lead
Converts the lead (same core as the web conversion card): to a registered company or as a new prospect; people are linked to the matched contact (blank fields filled), created as new contacts or skipped; optionally a new opportunity or linking to an open one; a fair visit (with attendees). The lead becomes Aktarıldı. With an empty body: registered / name-matched company, new opportunity, visit.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: Fair leadsScope:
crm.writePath parameters
idintegerrequiredLead id.
Body application/json
modestringoptionalCompany: registered or new prospect.
Values
existingnewcustomer_idintegeroptionalCompany for
mode: existing.peopleobjectoptionalPerson index (
i) → new · skip · <contact id>.opp_modestringoptionaldefault: newOpportunity.
Values
newexistingnoneopp_idintegeroptionalOpen opportunity for
opp_mode: existing.make_visitbooleanoptionaldefault: TrueLog a fair visit.
Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
404 | not_found | Record not found. |
403 | module | The module is off in the licence or for the user. |
Request
curl -X POST https://ornek.solk.app/api/v1/leads/27/convert \
-H "Authorization: Bearer $SOLK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "existing",
"customer_id": 1,
"people": {
"0": "new",
"1": "new"
},
"opp_mode": "none",
"make_visit": true
}'const res = await fetch("https://ornek.solk.app/api/v1/leads/27/convert", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"mode": "existing",
"customer_id": 1,
"people": {
"0": "new",
"1": "new"
},
"opp_mode": "none",
"make_visit": true
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/leads/27/convert",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
json={
"mode": "existing",
"customer_id": 1,
"people": {
"0": "new",
"1": "new"
},
"opp_mode": "none",
"make_visit": True
},
)
print(r.json())Response
{
"created": 2,
"customer": "Alize Paketleme San. ve Tic. A.Ş.",
"customer_id": 1,
"lead": {
"can_edit": true,
"city": "",
"company": "Alize Paketleme San. ve Tic. A.Ş.",
"contact_label": "Selin Kaya +1",
"contact_name": "Selin Kaya",
"created_at": "2026-10-09T23:14:43",
"customer_id": 1,
"email": "",
"fair": "Ambalaj Fuarı 2026 (örnek)",
"fair_id": 1,
"id": 27,
"initials": "AP",
"interest": "Sıcak",
"line": "",
"link_contact_id": 60,
"link_customer": "Alize Paketleme San. ve Tic. A.Ş.",
"link_customer_id": 1,
"next_action": "",
"next_date": null,
"note": "",
"opp_id": null,
"opp_type": "",
"owner": {
"full_name": "Deniz Aksoy",
"id": 1,
"role": "admin",
"role_label": "Yönetici",
"username": "admin"
},
"people": [
{
"cid": null,
"email": null,
"name": "Emre Tan",
"phone": "+90 532 444 55 66",
"title": "Ar-Ge"
}
],
"phone": "",
"potential_kg": null,
"products": "",
"products_text": "",
"project_note": "",
"rid": "00Q8D5NoUERPzEA",
"sector": "",
"status": "Aktarıldı",
"status_eff": "Aktarıldı",
"supplier": "",
"task_id": null,
"timing": "",
"title": "",
"unit": "kg",
"visitor_type": "Potansiyel müşteri",
"wa": "",
"website": ""
},
"linked": 0,
"message": "Lead CRM'e aktarıldı (kayıtlı firma): Alize Paketleme San. ve Tic. A.Ş. · 2 yeni kişi. Proje kazanılınca lead 'Kazanıldı' olur.",
"ok": true,
"opp_id": null
}Example responses were captured from a v54 installation running sample data; lists are shortened to two items.