רשומות
חיפוש עמוק עם מיפוי קשרים
POST
/api/v1/webhookחיפוש רשומה לפי שדה וערך, עם פתרון רקורסיבי מלא של כל הרשומות המקושרות — בשני הכיוונים: שדות שהרשומה מצביעה עליהם (forward) ורשומות מישויות אחרות שמקשרות חזרה אליה (reverse). מחזיר עץ נתונים שלם ללא הגבלת עומק. לולאות נמנעות אוטומטית על ידי מעקב אחר רשומות שכבר נפתרו.
אימות
Authorizationstringheaderחובהכותרת אימות מסוג Bearer <token>, כאשר <token> הוא מפתח ה-API שלך.
פרמטרים
entitystringחובההslug של הישות בה לחפש
fieldstringחובהשם השדה לחיפוש (apiName)
valuestringחובההערך לחיפוש
תשובה
200 — application/json
successbooleanחובהמציין אם הבקשה הצליחה
dataobjectאובייקט המכיל את נתוני התשובה
חיפוש עמוק עם מיפוי קשרים
const response = await fetch('https://crm.heybase.co.il/api/v1/webhook', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"action": "smart_lookup",
"entity": "children",
"field": "id",
"value": "241565565"
}),
})
const data = await response.json()200
{
"success": true,
"found": true,
"record": {
"id": "rec_abc123",
"entity": "children",
"fields": {
"Name": "עידו דוד",
"id": "241565565",
"birth": "2024-11-04",
"status": "active",
"start_date": "2026-04-14",
"contact": {
"id": "rec_def456",
"entity": "contacts",
"fields": {
"Name": "ליאור כהן",
"phone": "050-1234567"
},
"related_records": {
"children": [
{
"id": "rec_abc123",
"_already_resolved": true
}
],
"lead": [
{
"id": "rec_ghi789",
"entity": "lead",
"fields": {
"Name": "ליאור כהן",
"status": "done",
"lead_source": "manual"
},
"createdAt": "2026-06-01T08: 00: 00.000Z",
"updatedAt": "2026-06-10T12: 00: 00.000Z"
}
]
},
"createdAt": "2026-06-01T08: 00: 00.000Z",
"updatedAt": "2026-06-01T08: 00: 00.000Z"
},
"class": {
"id": "rec_jkl012",
"entity": "classes",
"fields": {
"Name": "0-3 זבוטינסקי",
"status": true,
"branch": {
"id": "rec_mno345",
"entity": "branches",
"fields": {
"Name": "ראשון לציון זבוטינסקי"
},
"related_records": {
"classes": [
{
"id": "rec_jkl012",
"_already_resolved": true
}
]
},
"createdAt": "2026-06-01T08: 00: 00.000Z",
"updatedAt": "2026-06-01T08: 00: 00.000Z"
}
},
"related_records": {
"children": [
{
"id": "rec_abc123",
"_already_resolved": true
}
]
},
"createdAt": "2026-06-01T08: 00: 00.000Z",
"updatedAt": "2026-06-01T08: 00: 00.000Z"
}
},
"createdAt": "2026-06-01T08: 00: 00.000Z",
"updatedAt": "2026-06-01T08: 00: 00.000Z"
}
}שגיאה
{
"success": true,
"found": false,
"message": "No record found in \"children\" where id = \"999999999\""
}בעמוד זה
