API לניהול העסק
נהלו תהליכים נתמכים של לקוחות, תורים, שירותים, צוות, יומנים ודוחות ב־CRAD מתוך הממשק שלכם.
לפני שימוש חי — בדקו יכולות פרוסות, הרשאות ומוכנות של החיבור שלכם.
בדקו את היכולות הפרוסות, הרשאות המפתח ומוכנות העסק בסביבה שלכם. דוגמאות HTTP נלכדו בבדיקות מבודדות; הסימון local-unreleased שלהן אינו אומר שה־API אינו פועל, ואינו מאשר את החיבור שלכם. במסלול הלקוח מאמתים טלפון בתבנית WhatsApp שהעסק הגדיר; SMS אינו נתמך. רישום בידי אדמין מורשה הוא פעולה נפרדת ללא קוד.
לפני הבקשה הראשונה
מקבלים סביבת בדיקה
מפתח API אחד עם הרשאות מפורשות להזמנות ולניהול העסק. כתובת ה־API מובנית ב־SDK ומזהי החיבור מתקבלים מהמפתח.
בוחרים פעולה
ב־API Reference מוצגים הנתיב, ההרשאות, הפרמטרים, גוף הבקשה והתשובות.
מחברים לממשק שלכם
משתמשים בלקוח HTTP של האתר. לפעולות לקוח מאמתים טלפון ב־WhatsApp; רישום בידי אדמין מורשה אינו דורש קוד. מפתח ה־API נשמר רק בשרת; אותו מפתח משמש לניהול ולחיבור הלקוחות לפי הרשאותיו.
הבקשה הראשונה
שמרו בשרת מפתח API אחד בשם CRAD_API_KEY. כתובת ה־API קבועה; הקריאה מחזירה את מזהי האתר והחיבור ואת ההרשאות שלהם.
פרטי הפעולה והתשובהcurl --request GET \
"https://api.crad.ai/v1/management" \
--header "Authorization: Bearer ${CRAD_API_KEY}" \
--header "Accept: application/json" מחברים אדמין קיים? בדקו את מפתח ה־API
הריצו בשרת שלכם עם אותו מפתח API. הקריאה מציגה את הרשאות החיבור ואינה יוצרת לקוח או תור. אין צורך באימות טלפון או בחיבור WhatsApp עבור בדיקה זו.
curl --request GET \
"https://api.crad.ai/v1/management" \
--header "Authorization: Bearer ${CRAD_API_KEY}" \
--header "Accept: application/json" חיבור מהיר ונכון, שלב אחר שלב
מה לטעון פעם אחת, מה לבדוק בזמן אמת ואיך לסנכרן ל־DB של האתר בלי ליצור מקור הזמנות נוסף.
למדריך היישום היעילבקשה, אישור הקליניקה ועדכון ללקוחה
בעסק שמצריך אישור, ההזמנה מתקבלת כבקשה ממתינה. האתר ו־CRAD מאשרים או דוחים את אותה בקשה; מועד חלופי נקבע רק אחרי הסכמת הלקוחה ובדיקת זמינות חוזרת. שינוי וביטול לפי מדיניות העסק, ותזכורות לפי ההגדרה שלו.
למדריך בקשות ואישור תוריםסדר הפעולות להזמנת תור
מפת ניווט בחוזה הקיים. עדיין אינה דוגמת אינטגרציה שנבדקה מקצה לקצה.
View the 8-step HTTP workflow
Discover the business
Read published services, providers, timezone and capabilities. Let the customer choose a treatment, including an unpriced consultation option when the business publishes one. Display its fixed price, range or price-decided-at-visit explanation; never infer a service from catalogue order or its name. A bounded authorized display snapshot can make the treatment list fast; it is not a booking authority. Respect bookingEnabled: false before offering a booking.
Retrieve catalogCreate a visitor session
Send the approved integrationId and keep the returned customer bearer in memory. Prepare this once the integration is known, without blocking treatment rendering on unrelated reads. Never expose a machine credential in browser code.
Create a visitor sessionQuote and choose a time
Use the selected service and provider to get a current quote, then request availability for the selected day in the business timezone. Display the returned times: a business can use treatment-duration spacing that restarts after scheduled breaks. Do not build a fixed 15-minute list or derive starts from duration alone. Treatment and time can be selected before phone verification. Do not preload slots for every date in a month or let an obsolete response restore an old selection. A displayed time is not reserved.
Create a quoteFind available timesVerify the phone
Request a code only after an explicit customer action. Persist the challenge request UUID; retry uncertainty using that UUID and the original session. Use sessionToken and the expiry timestamps from the successful verify response for subsequent calls. Current phone proof is required for Customer API intents and commits; website login or a local projection does not replace it. Do not send another code automatically after reload. The business must configure a supported WhatsApp authentication template for the chosen language. Confirm verification readiness in the approved environment; documentation publication does not enable sending.
Request a WhatsApp verification codeVerify a phone numberPrepare and review the booking
Save a request UUID before sending the booking intent, and use it as Idempotency-Key. Submit the quote, slot, customer details and explicit communication preference. Show the returned authoritative fixed price, optional priceRangeMinor estimate or price-decided-at-visit explanation. Exact price stays null for a range or unknown price; a range minimum is not a fixed charge. Do not replace a null quote with zero or a catalogue fallback. Changed terms require fresh confirmation.
Prepare a bookingSubmit the saved intent
After the customer reviews the request, send intentId to create the booking. Idempotency-Key must be the operationId returned with that exact intent, not the earlier request UUID. Render the receipt status: pending means the request was received and awaits clinic approval; confirmed means the appointment was confirmed. An accepted request is separate from WhatsApp delivery.
Submit a booking requestRecover an uncertain result
After reload, obtain fresh same-phone proof and recover the saved request, intent or operation. Recovery must not auto-confirm. A not_found result does not prove an in-flight request cannot commit; keep the original locator until reconciliation or authoritative abandonment.
Recover an intent requestRetrieve operation resultManage the accepted request or booking
Refresh the booking and allowedActions. A contact_business policy directs customer cancellation/rescheduling to the saved business contact. Where self-service is allowed, prepare a change intent, review its terms and commit using its returned operation identity. An offered alternative requires the customer’s separate acceptance.
Retrieve a bookingPrepare a booking change
מדריכים
- אישורי תורים וקישורים למסמכים בממשק המרפאה
חיבור אישור בקשות, קביעת תור בידי הצוות והודעה על מסמך מוכן לממשק המרפאה הקיים, עם רשומת שליחה אחת לכל אירוע.
- Manage WhatsApp templates, profile and images
A controlled-pilot workflow for your backend, with explicit grants, separate image identities and recovery before retry.
- Set up your integration
Obtain the environment details, choose browser or backend calls, and connect your existing booking interface.
- Build a fast, correct website integration
Load treatments quickly, check times live and keep an authorized local projection without creating a second booking authority.
- Customer requests, clinic approval and proposed times
Keep a new request pending, let the clinic decide from either admin, and confirm an alternative only after the customer agrees.
- Connect your business calendar
Use your own staff interface to read, create and manage approved appointments, then keep a scoped local calendar in sync.
- Services & website content
Use your own admin to edit treatments, choose the services shown online and maintain public contact details and images.
- Providers
Edit existing providers and service assignments from your own admin, with explicit resource authority and recoverable changes.
- Campaigns from your business admin
Choose a permitted audience, review the exact message, confirm once and recover uncertain results. Your interface uses the existing CRAD sender.
- Appointment reminders in your admin
Let the business edit reminder timing and customer preferences, and show delivery status with the existing CRAD reminder engine.
- Sync customers and bookings
Maintain permitted CRAD data in your backend with separate customer and booking streams, durable checkpoints and explicit sharing.
- Change hours and availability blocks
Build a staff workflow that reviews appointment impact, detects concurrent changes and preserves accepted bookings.
- Handle notifications and consent
Keep booking success independent of WhatsApp delivery, show truthful message states and let customers manage permission.
- Recover errors and uncertain results
Keep the right identifier, restore current authority, and establish the original outcome before creating a replacement operation.
מה קיים בחוזה
| יכולת | מצב |
|---|---|
| הזמנה ללקוח | קטלוג, זמינות, אימות, יצירה, שינוי וביטול תור |
| נתוני החיבור | לקוחות ותורים של החיבור, שינויים והיסטוריה לפי הרשאות |
| ניהול שעות וימים | שעות וחסימות לפי משאב עסק או נותנת שירות; קריאות נפרדות וחובה לבדוק השפעה לפני שינוי |
| רישום לקוח מהאדמין שלכם | יצירה או קישור לפי שם וטלפון, בהרשאה נפרדת, ללא קוד אימות וללא מתן הסכמה להודעות |
| ניהול וסנכרון לקוחות העסק | חיפוש, שם ושפה, חסימה וסנכרון כלל הלקוחות; הערות ושדות נוספים דורשים אישור נפרד |
| יומן העסק | קריאה, יצירה, שינוי וביטול תורים בהרשאות יומן נפרדות ובדיקת השפעה |
| כללי הזמנה | אזור זמן, משך ברירת מחדל וזמן מינימלי להזמנה ולביטול. טווח משותף לאתר ול־WhatsApp: 14/30/60/90 ימים לפי אזור הזמן של העסק, ברירת מחדל 14. השינויים נבדקים מראש ושומרים על התורים הקיימים. |
| משך תור וירושת הגדרות | ברירת מחדל לעסק והגדרה נפרדת לנותן שירות; עדכון תורים עתידיים דורש סקירת השפעה והרשאה נוספת |
| תיקון טלפון בידי מנהל | תיקון לאותו לקוח בהרשאה נפרדת; קשרי זהות או שליחות פתוחות עשויים לדרוש טיפול קודם |
| שירותים ותוכן האתר | ניהול קטלוג, בחירת שירותים להצגה, פרטי קשר ציבוריים ותמונות; הרשאות נפרדות, ללא הפעלה אוטומטית של הזמנות |
| נותני שירות | קריאה, עריכה וסנכרון נותנים קיימים שהורשו לחיבור ושיוך שירותים; יצירת חשבון כניסה לנותן קיים דורשת הרשאה נפרדת ואינה שולחת הזמנה |
| שיחות והודעות | קריאת שיחות, מעבר לטיפול אנושי ושליחת טקסט, מדיה או תבנית; לפי הרשאות נפרדות, מצב החיבור וכללי השליחה של WhatsApp |
| סיכומי פעילות | ספירת תורים להיום, לשבוע ולמחר לפי אזור הזמן של העסק, בהרשאה נפרדת לכל העסק; ללא פרטי לקוחות או סכומים כספיים |
| דוח תפעולי חודשי | חודש מלא, סטטוסים ופילוח לפי ימים, שירותים ונותנים, עם ערך טיפולים שהושלמו לפי מטבע; הרשאת reports:read לכל העסק. אין זה דוח תשלומים או תקבולים |
| המשך להגדרות הבעלים | קישורים להגדרות האתר, החיבור, המכשיר ו־WhatsApp; נדרשים כניסת הבעלים ובדיקה עדכנית. פתיחת קישור אינה משנה הגדרות או מאשרת הרשאות |
| מחוץ לחוזה הנוכחי | יצירה ומחיקה של רשומות נותני שירות, שליחת הזמנות לצוות, שינוי סיסמאות קיימות ודוחות תשלומים או הנהלת חשבונות |
איפה נשמרים הנתונים?
CRAD מנהלת את אנשי הקשר והתורים. האתר יכול לשמור עותק של הנתונים שהורשה לקבל; החשבונות וההערות הפרטיות שלו נשארים אצלו. סנכרון כלל לקוחות העסק דורש מפתח ניהול והרשאה מפורשת, בנפרד מנתוני לקוחות החיבור.
תיאום סביבת API ב־WhatsAppתיפתח טיוטת פנייה לצוות CRAD. אפשר לערוך אותה לפני השליחה; אל תצרפו מפתחות גישה.