רשומות
שליפת שדות
POST
/api/v1/webhookקבלת רשימת כל השדות של ישות מסוימת, כולל סוג השדה, חובה/לא, וערכי אפשרויות. שימושי כדי לדעת אילו שדות ניתן למלא בעת יצירת או עדכון רשומה.
אימות
Authorizationstringheaderחובהכותרת אימות מסוג Bearer <token>, כאשר <token> הוא מפתח ה-API שלך.
פרמטרים
entitystringחובההslug של הישות
תשובה
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": "get_fields",
"entity": "contacts"
}),
})
const data = await response.json()200
{
"success": true,
"entity": "contacts",
"count": 5,
"fields": [
{
"id": "fld_001",
"name": "Full Name",
"nameHe": "שם מלא",
"apiName": "full_name",
"fieldType": "text",
"isRequired": true,
"isSystem": false,
"isReadonly": false,
"orderIndex": 0,
"options": null
},
{
"id": "fld_002",
"name": "Email",
"nameHe": "אימייל",
"apiName": "email",
"fieldType": "email",
"isRequired": true,
"isSystem": false,
"isReadonly": false,
"orderIndex": 1,
"options": null
},
{
"id": "fld_003",
"name": "Phone",
"nameHe": "טלפון",
"apiName": "phone",
"fieldType": "phone",
"isRequired": false,
"isSystem": false,
"isReadonly": false,
"orderIndex": 2,
"options": null
},
{
"id": "fld_004",
"name": "Status",
"nameHe": "סטטוס",
"apiName": "status",
"fieldType": "select",
"isRequired": false,
"isSystem": false,
"isReadonly": false,
"orderIndex": 3,
"options": [
"חדש",
"פעיל",
"לא פעיל"
]
},
{
"id": "fld_005",
"name": "Created",
"nameHe": "תאריך יצירה",
"apiName": "created_at",
"fieldType": "date",
"isRequired": false,
"isSystem": true,
"isReadonly": true,
"orderIndex": 4,
"options": null
}
]
}בעמוד זה
