रिमाइंडर 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 Keys से आपका API क्लाइंट ID।
api_keystringआवश्यकउसी पेज से आपकी API की।
reminder_idstringआवश्यककैंसल किए जाने वाले रिमाइंडर का ID, जैसा रिमाइंडर बनाएं या रिमाइंडर की सूची ने लौटाया था। यह उसी वर्कस्पेस का होना चाहिए जिसकी API की है।
फॉर्म फील्ड भेजने से यह समस्या नहीं आती, क्योंकि हर फॉर्म वैल्यू string होती है:
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) | ID मौजूद नहीं है, किसी दूसरे वर्कस्पेस का है, या रिमाइंडर पहले ही कैंसल हो चुका है। |
Error cancelling reminder: … (HTTP 500) | हमारी तरफ कुछ गड़बड़ हुई। फिर से कोशिश करें। |
अगर api_key मौजूद नहीं है या डिलीट हो चुकी है, तो रिस्पॉन्स JSON की जगह HTTP 500 के साथ एक HTML एरर पेज होता है। अपनी की को क्रेडेंशियल जांचें से टेस्ट करें।
कैंसल करने से क्या होता है#
- रिमाइंडर तुरंत बंद हो जाता है और फिर नहीं चलेगा। रोके गए (paused) रिमाइंडर भी कैंसल किए जा सकते हैं।
- यह रिमाइंडर की सूची और रिमाइंडर पेज से हट जाता है।
- कैंसल किया गया रिमाइंडर वापस नहीं लाया जा सकता। फिर से शुरू करने के लिए नया रिमाइंडर बनाएं।
- कैंसल करने से पहले रिमाइंडर ने जो संदेश कतार में डाल दिया था, वह हटाया नहीं जाता और फिर भी भेजा जा सकता है।
सुझाव#
- दो बार कैंसल करने पर
Reminder not foundमिलता है। अगर आप रिक्वेस्ट दोबारा भेजते हैं, तो इस संदेश को "पहले ही कैंसल हो चुका" मानें। - रोकना (pause) API से उपलब्ध नहीं है। किसी रिमाइंडर को कुछ समय के लिए बंद करने के लिए उसे रिमाइंडर पेज पर रोकें।
- शेड्यूल बदलना: कोई अपडेट API नहीं है। रिमाइंडर कैंसल करें और नए
cron_expressionके साथ नया रिमाइंडर बनाएं।
