API לתזכורות
ממשק API לביטול תזכורת
עצרו תזכורת חוזרת כך שלא תרוץ יותר לעולם. השתמשו בו כשלקוח משלם, כשמנוי מסתיים או כשאוטומציה כבר לא נחוצה.
https://wbiztool.com/api/v1/reminder/cancel/גוף הבקשה: JSON או שדות טופס
אתם צריכים את ה-reminder_id שהוחזר מ-יצירת תזכורת. אם אין לכם אותו, מצאו אותו באמצעות רשימת תזכורות.
דוגמה מהירה#
curl -X POST https://wbiztool.com/api/v1/reminder/cancel/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"reminder_id": "3187"
}'import requests
reminder_id = 3187
response = requests.post(
"https://wbiztool.com/api/v1/reminder/cancel/",
json={
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"reminder_id": str(reminder_id), # must be a string in JSON
},
timeout=60,
)
try:
result = response.json() # read the body even when the HTTP code is 400 or 404
except ValueError:
raise SystemExit(f"HTTP {response.status_code}: not JSON. Check that your api_key exists.")
if result["status"] == 1:
print("Reminder cancelled")
else:
print("Failed:", result["message"])// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const reminderId = 3187;
const response = await fetch("https://wbiztool.com/api/v1/reminder/cancel/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: 12345,
api_key: "YOUR_API_KEY",
reminder_id: String(reminderId), // must be a string in JSON
}),
});
// Read the body even when the HTTP code is 400 or 404. A non-JSON reply means the request crashed.
const text = await response.text();
let result;
try {
result = JSON.parse(text);
} catch {
throw new Error(`HTTP ${response.status}: not JSON. Check your api_key and send reminder_id as a string.`);
}
if (result.status === 1) {
console.log("Reminder cancelled");
} else {
console.error("Failed:", result.message);
}<?php
$payload = [
'client_id' => 12345,
'api_key' => 'YOUR_API_KEY',
'reminder_id' => (string) 3187, // must be a string in JSON
];
$ch = curl_init('https://wbiztool.com/api/v1/reminder/cancel/');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
]);
$result = json_decode(curl_exec($ch), true);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($result === null) {
echo "HTTP $httpCode: not JSON. Check your api_key and send reminder_id as a string.";
} elseif ($result['status'] === 1) {
echo 'Reminder cancelled';
} else {
echo 'Failed: ' . $result['message'];
}החליפו את 12345 ו-YOUR_API_KEY בערכים שלכם. בסעיף אימות מוסבר איפה למצוא אותם.
פרמטרי הבקשה#
client_idintegerחובהמזהה הלקוח שלכם ל-API (API Client ID) מהדף Settings → API keys.
api_keystringחובהמפתח ה-API שלכם מאותו דף.
reminder_idstringחובההמזהה של התזכורת לביטול, כפי שהוחזר מ-יצירת תזכורת או מ-רשימת תזכורות. הוא חייב להשתייך לאותה סביבת עבודה כמו מפתח ה-API.
שליחת שדות טופס עוקפת את הבעיה, כי כל ערך בטופס הוא מחרוזת:
curl -X POST https://wbiztool.com/api/v1/reminder/cancel/ \
-d client_id=12345 \
-d api_key=YOUR_API_KEY \
-d reminder_id=3187
תגובה#
בקשה מוצלחת מחזירה HTTP 200:
{
"message": "Reminder cancelled successfully",
"status": 1
}
| שדה | סוג | תיאור |
|---|---|---|
status | integer | 1 אם התזכורת בוטלה, 0 אם הבקשה נכשלה. |
message | string | Reminder cancelled successfully, אחרת השגיאה. |
שגיאות#
שגיאות מחזירות HTTP 400 עם status שמוגדר ל-0, אלא אם צוין אחרת:
{ "status": 0, "message": "Reminder not found" }
| הודעה | איך לתקן |
|---|---|
Invalid JSON format: … | גוף ה-JSON לא תקין. תקבלו את השגיאה הזו גם בבקשת טופס בלי client_id, או בכל בקשת GET. |
Reminder ID cannot be null | הוסיפו reminder_id. |
Auth Error - Please send correct API key and Client id | שלחו גם client_id וגם api_key. |
Invalid client id | שלחו את client_id כמספר. |
Invalid reminder id | השדה reminder_id חייב להיות מספר שלם, כמו 3187. |
Auth Error: invalid api key | המפתח שייך ל-client_id אחר. |
Auth Error: please check client id | המפתח לא מקושר לסביבת עבודה. צרו מפתח חדש בסביבת העבודה שבה אתם רוצים להשתמש. |
Demo Account cannot access APIs | השתמשו בחשבון רגיל. |
Upgrade your plan to use reminders feature | החבילה שלכם לא כוללת תזכורות. תזכורות שנוצרו קודם ממשיכות לרוץ ולצרוך קרדיטים, ואי אפשר לבטל או להשהות אותן, לא דרך ה-API ולא ממרכז הבקרה, עד שתשדרגו. |
Reminder not found (HTTP 404) | המזהה לא קיים, נמצא בסביבת עבודה אחרת, או שהתזכורת כבר בוטלה. |
Error cancelling reminder: … (HTTP 500) | משהו השתבש אצלנו. נסו שוב. |
אם ה-api_key לא קיים או נמחק, התגובה היא דף שגיאה ב-HTML עם HTTP 500 במקום JSON. בדקו את המפתח שלכם עם בדיקת פרטי התחברות.
מה הביטול עושה#
- התזכורת נעצרת מיד ולא תרוץ שוב. אפשר לבטל גם תזכורות מושהות.
- היא נעלמת מ-רשימת תזכורות ומהדף Reminders (תזכורות).
- אי אפשר לשחזר תזכורת שבוטלה. כדי להתחיל מחדש, צרו תזכורת חדשה.
- הודעה שהתזכורת כבר הכניסה לתור לפני שביטלתם אותה לא מוסרת, ועדיין עשויה להישלח.
טיפים#
- ביטול כפול מחזיר
Reminder not found. אם אתם שולחים בקשות שוב, התייחסו להודעה הזו כ„כבר בוטלה“. - השהיה לא זמינה דרך ה-API. כדי לעצור תזכורת באופן זמני, השהו אותה במקום זאת בדף Reminders.
- שינוי לוח זמנים: אין API לעדכון. בטלו את התזכורת וצרו תזכורת חדשה עם ה-
cron_expressionהחדש.
