ورود / ثبت‌نام

آسان ترین اتصال

مستندات API

تمام اطلاعات لازم برای یک اتصال پایدار و سریع برای شما فراهم شده!

API سازمانی زبل

۳۲ مسیر، آمادهٔ فراخوانی با کلید حساب سازمانی‌ات. این صفحه و فایل‌های زیرش از جدول مسیرهای خودِ سرور تولید می‌شوند — یعنی اگر مسیری اضافه یا حذف شود، اینجا همان لحظه عوض می‌شود. مستنداتی که دستی نوشته شود، روز اول درست است و روز دوم نه.

🚀 شروع سریع — قبل از هر مسیری این را بخوان
۱. احراز هویت: کلید فقط در هدر

کلید را از داشبورد سازمانی ← «کلیدهای API» بساز. فقط یک بار نمایش داده می‌شود (زبل آن را رمزشده نگه می‌دارد)، پس همان لحظه جای امنی نگهش دار. در هر درخواست آن را در هدر بفرست:

X-API-Key: zbl_…
# یا
Authorization: Bearer zbl_…

کلید در آدرس (?api_key=) پذیرفته نمی‌شود، چون در لاگ سرورها، پروکسی‌ها و تاریخچهٔ مرورگر می‌ماند. کلید را هیچ‌وقت در کدِ سمت مرورگر نگذار؛ اگر لو رفت، از داشبورد کلید تازه بساز (قبلی همان لحظه باطل می‌شود).

۲. سقف درخواست

هر کلید سقفی در دقیقه و در روز دارد که از پلنت می‌آید. هر پاسخ این هدرها را دارد:

X-RateLimit-Limit: 60            # سقف این دقیقه
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1790000060    # شروع دقیقهٔ بعد
X-RateLimit-Daily-Limit: 2000
X-RateLimit-Daily-Remaining: 1873

اگر پر شد، پاسخ 429 با هدر Retry-After می‌آید: همان‌قدر ثانیه صبر کن و دوباره بفرست. (نمونه‌کدِ هر مسیر همین را نشان می‌دهد.)

۳. صفحه‌بندی و ستون‌ها

/b2b/products صفحه‌به‌صفحه جواب می‌دهد: page و per_page (پیش‌فرض ۲۰، حداکثر ۵۰). تعداد کل در هدر X-WP-Total و بدنهٔ پاسخ است و صفحهٔ بعد در هدر Link. با fields فقط ستون‌های لازم را بگیر، و با updated_since فقط آنچه از آخرین همگام‌سازی عوض شده:

GET https://zebell.app/wp-json/zebell/v1/b2b/products?page=2&per_page=50&fields=id,title,best_price&updated_since=2026-09-23T08:00:00Z

best_price ارزان‌ترین فروشنده‌ای است که کالا را موجود دارد؛ اگر هیچ فروشنده‌ای موجود نداشته باشد null است.

۴. خطاها
401 zbl_key_in_urlکلید در آدرس آمده — به هدر ببرش.
401 zbl_bad_keyکلید نامعتبر یا باطل‌شده.
403 zbl_no_apiدسترسی API در پلن فعلی نیست.
429 zbl_rate_limitedسقف دقیقه‌ای یا روزانه پر شد — Retry-After را ببین.
۵. وب‌هوک: مطمئن شو پیام از زبل است

هر رویداد با این هدرها می‌رسد: X-Zebell-Event، X-Zebell-Delivery، X-Zebell-Timestamp و X-Zebell-Signature. امضا sha256=HMAC_SHA256(timestamp + "." + body, secret) است؛ کلید امضا را از داشبورد ← وب‌هوک بگیر. پیامِ قدیمی‌تر از ۵ دقیقه را رد کن (جلوی تکرار پیام را می‌گیرد). پاسخ 2xx یعنی رسید؛ هر چیز دیگری دوباره فرستاده می‌شود.

<?php
$body = file_get_contents( 'php://input' );
$ts   = $_SERVER['HTTP_X_ZEBELL_TIMESTAMP'] ?? '';
$sig  = $_SERVER['HTTP_X_ZEBELL_SIGNATURE'] ?? '';
$want = 'sha256=' . hash_hmac( 'sha256', $ts . '.' . $body, 'YOUR_WEBHOOK_SECRET' );
// older than 5 minutes = a replay; a different signature = not from Zebell
if ( abs( time() - (int) $ts ) > 300 || ! hash_equals( $want, $sig ) ) {
	http_response_code( 401 ); exit;
}
$event = json_decode( $body, true ); // { event, delivery, created_at, attempt, data }
http_response_code( 200 );
import crypto from 'node:crypto';
// Express: app.post('/hook', express.raw({ type: 'application/json' }), handler)
function handler(req, res) {
  const body = req.body.toString('utf8');
  const ts = req.get('X-Zebell-Timestamp');
  const sig = req.get('X-Zebell-Signature') || '';
  const want = 'sha256=' + crypto.createHmac('sha256', process.env.ZBL_SECRET).update(ts + '.' + body).digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(ts)) <= 300;
  if (!fresh || want.length !== sig.length || !crypto.timingSafeEqual(Buffer.from(want), Buffer.from(sig))) return res.sendStatus(401);
  const event = JSON.parse(body);
  res.sendStatus(200);
}
import hmac, hashlib, time

def verify(body: bytes, ts: str, sig: str, secret: str) -> bool:
    want = 'sha256=' + hmac.new(secret.encode(), ts.encode() + b'.' + body, hashlib.sha256).hexdigest()
    return abs(time.time() - int(ts)) <= 300 and hmac.compare_digest(want, sig)

# Flask: verify(request.get_data(), request.headers['X-Zebell-Timestamp'],
#               request.headers['X-Zebell-Signature'], SECRET)

آدرس وب‌هوک باید عمومی و در اینترنت در دسترس باشد؛ آدرس‌هایی که به شبکهٔ داخلی (مثل 127.0.0.1 یا 192.168.x.x) اشاره کنند پذیرفته نمی‌شوند، و ریدایرکت دنبال نمی‌شود.

تغییرات این نسخه
  • کلید در آدرس دیگر پذیرفته نمی‌شود — به هدر X-API-Key ببرش. کلیدهای فعلی عوض نشده‌اند و همان کار می‌کنند.
  • /b2b/products صفحه‌بندی دارد (پیش‌فرض ۲۰)؛ برای همهٔ کالاها صفحه‌ها را با Link دنبال کن.
  • best_price حالا فقط فروشنده‌های موجود را حساب می‌کند.
  • سقف روزانه و دقیقه‌ای پلن اعمال می‌شود و در هدرها دیده می‌شود.
  • متن فارسی پاسخ‌ها خوانا می‌آید (نه \u06af)؛ هر کتابخانهٔ JSON هر دو را یکسان می‌خواند.
کاتالوگ و قیمت (۱۰ مسیر)
GET /b2b/products کلید API فهرست کالاهای فعال کاتالوگ، صفحه‌به‌صفحه. best_price ارزان‌ترین فروشندهٔ موجود است.
pageشمارهٔ صفحه (از ۱)
per_pageتعداد در هر صفحه — پیش‌فرض ۲۰، حداکثر ۵۰
fieldsفقط این ستون‌ها، مثلاً id,title,best_price
categoryاسلاگ دسته — خالی یعنی همه
qجست‌وجو در عنوان
updated_sinceفقط کالاهایی که قیمتشان از این زمان عوض شده (ISO 8601) — برای همگام‌سازی افزایشی
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/products?page=1&per_page=20' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/products?page=1&per_page=20', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/products",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"page":"1","per_page":"20","fields":"","category":"","q":"","updated_since":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/products?page=1&per_page=20", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/prices/{id} کلید API تاریخچهٔ قیمت یک کالا.
idشناسهٔ کالا — در خودِ مسیر
daysبازهٔ روز
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/prices/123' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/prices/123', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/prices/123",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"days":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/prices/123", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/store_prices/{id} کلید API قیمت هر فروشگاه برای یک کالا — ارزان‌ترین ردیف هر فروشگاه.
idشناسهٔ کالا — در خودِ مسیر
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/store_prices/123' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/store_prices/123', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/store_prices/123",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/store_prices/123", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/matrix کلید API ماتریس قیمت: کالاها در سطر، فروشگاه‌ها در ستون.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/matrix' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/matrix', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/matrix",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/matrix", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/rivals کلید API رادار رقبا برای یک کالا.
tokenتوکن نشست، به‌جای کلید
product_idشناسهٔ کالا
daysبازهٔ روز
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/rivals' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/rivals', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/rivals",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"product_id":"","days":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/rivals", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/export کلید API خروجی CSV از قیمت‌ها.
rangeبازهٔ زمانی
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/export' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/export', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/export",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"range":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/export", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/pricelist کلید API لیست قیمت آمادهٔ ارسال به مشتری.
titleعنوان بالای لیست
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/pricelist",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"title":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricelist", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/stats کلید API آمار خلاصهٔ حساب.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/stats' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/stats', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/stats",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/stats", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/insights کلید API خوانش‌های تحلیلی بازار.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/insights' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/insights', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/insights",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/insights", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/changes کلید API کالاهایی که قیمتشان تغییر کرده.
daysبازهٔ روز
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/changes' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/changes', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/changes",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"days":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/changes", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
مستند نشده (۳ مسیر)
GET /b2b/pricelist/cats کلید API
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/cats' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/cats', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/pricelist/cats",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricelist/cats", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/pricelist/tpl کلید API
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/pricelist/tpl کلید API
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricelist/tpl", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
میز قیمت‌گذاری (۱۰ مسیر)
GET /b2b/pricing کلید API ردیف‌های میز قیمت‌گذاری.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/pricing' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricing', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/pricing",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricing", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/pricing/save کلید API ذخیرهٔ قیمت و حاشیهٔ یک کالا.
product_idشناسهٔ کالا
costقیمت خرید (تومان)
margin_modeحالت حاشیه
margin_pctدرصد حاشیه
my_priceقیمت فروش شما
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/save' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"product_id":"","cost":"","margin_mode":"","margin_pct":"","my_price":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/save', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"product_id":"","cost":"","margin_mode":"","margin_pct":"","my_price":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/pricing/save",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"product_id":"","cost":"","margin_mode":"","margin_pct":"","my_price":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricing/save", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"product_id":"","cost":"","margin_mode":"","margin_pct":"","my_price":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/pricing/export کلید API خروجی CSV از میز قیمت‌گذاری.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/export' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/export', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/pricing/export",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricing/export", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/pricing/push کلید API ارسال میز قیمت‌گذاری به یک آدرس.
urlمقصد
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/push' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/pricing/push', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"url":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/pricing/push",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"url":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/pricing/push", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"url":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/reprice کلید API پیشنهاد قیمت‌گذاری مجدد برای یک کالا.
product_idشناسهٔ کالا
costقیمت خرید
min_marginحداقل حاشیه
currentقیمت فعلی شما
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/reprice' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/reprice', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/reprice",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"product_id":"","cost":"","min_margin":"","current":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/reprice", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/reprice/push کلید API همان، با ارسال نتیجه به یک آدرس.
product_idشناسهٔ کالا
urlمقصد
costقیمت خرید
min_marginحداقل حاشیه
currentقیمت فعلی شما
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/reprice/push' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"product_id":"","url":"","cost":"","min_margin":"","current":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/reprice/push', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"product_id":"","url":"","cost":"","min_margin":"","current":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/reprice/push",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"product_id":"","url":"","cost":"","min_margin":"","current":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/reprice/push", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"product_id":"","url":"","cost":"","min_margin":"","current":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/basket کلید API سبد مقایسه.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/basket' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/basket', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/basket",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/basket", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/basket کلید API افزودن کالا به سبد.
product_idشناسهٔ کالا
qtyتعداد
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/basket' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"product_id":"","qty":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/basket', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"product_id":"","qty":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/basket",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"product_id":"","qty":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/basket", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"product_id":"","qty":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
DELETE /b2b/basket/{id} کلید API حذف کالا از سبد.
idشناسهٔ کالا — در خودِ مسیر
curl -X DELETE 'https://zebell.app/wp-json/zebell/v1/b2b/basket/123' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/basket/123', array(
	'method'  => 'DELETE',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("DELETE", "https://zebell.app/wp-json/zebell/v1/b2b/basket/123",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/basket/123", {
  method: "DELETE",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/basket/calc کلید API محاسبهٔ جمع سبد.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/basket/calc' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/basket/calc', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/basket/calc",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/basket/calc", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
وب‌هوک (۳ مسیر)
GET /b2b/webhook/info کلید API آدرس و وضعیت وب‌هوک حساب.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/info' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/info', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/webhook/info",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/webhook/info", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/webhook/test کلید API ارسال یک رویداد آزمایشی.
urlمقصد
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/test' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/test', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"url":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/webhook/test",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"url":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/webhook/test", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"url":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/webhook/rotate کلید API تعویض کلید امضای وب‌هوک.
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/rotate' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/webhook/rotate', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/webhook/rotate",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/webhook/rotate", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
دیده‌بان و هشدار (۶ مسیر)
GET /b2b/watchlist کلید API کالاهای زیر دیده‌بان.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/watchlist",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/watchlist", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/watchlist کلید API افزودن کالا به دیده‌بان.
product_idشناسهٔ کالا
labelبرچسب دلخواه
threshold_pctدرصد افت برای اعلام
webhook_urlآدرس وب‌هوک این ردیف
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"product_id":"","label":"","threshold_pct":"","webhook_url":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"product_id":"","label":"","threshold_pct":"","webhook_url":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/watchlist",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"product_id":"","label":"","threshold_pct":"","webhook_url":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/watchlist", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"product_id":"","label":"","threshold_pct":"","webhook_url":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
DELETE /b2b/watchlist/{id} کلید API حذف از دیده‌بان. شناسهٔ کالاست، نه شناسهٔ ردیف.
idشناسهٔ کالا — در خودِ مسیر
product_idشناسهٔ کالا (در مسیر یا کوئری)
curl -X DELETE 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist/123' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/watchlist/123', array(
	'method'  => 'DELETE',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("DELETE", "https://zebell.app/wp-json/zebell/v1/b2b/watchlist/123",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"product_id":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/watchlist/123", {
  method: "DELETE",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
GET /b2b/alerts کلید API هشدارهای قیمت ثبت‌شده.
curl -X GET 'https://zebell.app/wp-json/zebell/v1/b2b/alerts' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/alerts', array(
	'method'  => 'GET',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("GET", "https://zebell.app/wp-json/zebell/v1/b2b/alerts",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/alerts", {
  method: "GET",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
POST /b2b/alerts کلید API ثبت هشدار قیمت.
product_idشناسهٔ کالا
floor_priceقیمت هدف (تومان)
notify_smsپیامک هم بفرست؟
webhook_urlآدرس وب‌هوک
curl -X POST 'https://zebell.app/wp-json/zebell/v1/b2b/alerts' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"product_id":"","floor_price":"","notify_sms":"","webhook_url":""}'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/alerts', array(
	'method'  => 'POST',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json' ),
	'body'    => '{"product_id":"","floor_price":"","notify_sms":"","webhook_url":""}',
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("POST", "https://zebell.app/wp-json/zebell/v1/b2b/alerts",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"product_id":"","floor_price":"","notify_sms":"","webhook_url":""},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/alerts", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"product_id":"","floor_price":"","notify_sms":"","webhook_url":""}),
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();
DELETE /b2b/alerts/{id} کلید API حذف هشدار.
idشناسهٔ کالا — در خودِ مسیر
curl -X DELETE 'https://zebell.app/wp-json/zebell/v1/b2b/alerts/123' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$res = wp_remote_request( 'https://zebell.app/wp-json/zebell/v1/b2b/alerts/123', array(
	'method'  => 'DELETE',
	'timeout' => 20,
	'headers' => array( 'X-API-Key' => 'YOUR_API_KEY' ),
) );
if ( 429 === wp_remote_retrieve_response_code( $res ) ) {
	sleep( (int) wp_remote_retrieve_header( $res, 'retry-after' ) ); // then try again
}
$body = json_decode( wp_remote_retrieve_body( $res ), true );
import requests, time

r = requests.request("DELETE", "https://zebell.app/wp-json/zebell/v1/b2b/alerts/123",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=20)
if r.status_code == 429:
    time.sleep(int(r.headers["Retry-After"]))  # then try again
print(r.json())
const res = await fetch("https://zebell.app/wp-json/zebell/v1/b2b/alerts/123", {
  method: "DELETE",
  headers: { "X-API-Key": "YOUR_API_KEY" },
});
if (res.status === 429) { /* wait res.headers.get("Retry-After") seconds */ }
const data = await res.json();