मुख्य भागमा जानुहोस्

The REST API lets your own software read and update your workspace. It is included in the Business plan and above.

Authentication

Create a token in Dashboard → Integrations → API tokens and choose only the scopes you need. Send it as a header:

Authorization: Bearer kbc_xxxxxxxxxxxxxxxx

Tokens are shown once and stored only as a hash. Revoke a token at any time. Each token may make 120 requests per minute (HTTP 429 when exceeded).

Endpoints (base URL: /api/v1)

MethodPathScope
GET/meany
GET/sitessites:read
GET/leads?status=newleads:read
POST/leads/{id} with statusleads:write
GET/orders?status=&payment_status=orders:read
GET/orders/{id}orders:read
POST/orders/{id} with statusorders:write
GET/bookings?from=2026-12-01bookings:read
POST/bookings/{id} with statusbookings:write
GET/productsproducts:read
POST/products/{id} with price, stock, is_activeproducts:write
GET/menumenu:read
GET/analytics/summary?days=30analytics:read

Lists accept page, per_page (max 100) and updated_since (ISO 8601). Money is returned as integer minor units (amount, e.g. paisa) plus a decimal string — never as a floating-point number. Times are UTC.

Webhooks

Add an endpoint in Integrations → Webhooks. Events: lead.created, order.created, order.paid, booking.created, booking.updated, table_order.created.

Each delivery is a JSON POST with headers X-KBC-Event, X-KBC-Delivery and X-KBC-Signature: sha256=<hex>, the HMAC-SHA256 of the raw body using your signing secret. Verify it before trusting the data, and answer with any 2xx status. Failed deliveries are retried up to 6 times over about 12 hours.

$expected = 'sha256=' . hash_hmac('sha256', file_get_contents('php://input'), $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_KBC_SIGNATURE'] ?? '')) { http_response_code(401); exit; }
के यो उपयोगी भयो?