API Documentation

Build custom dashboards, automate reporting, and integrate BonziCart Affiliate into your stack. REST + Webhooks · v2 stable.

Quick Start

Welcome to the BonziCart Affiliate API. Every endpoint speaks JSON, lives behind HTTPS, and uses bearer-token authentication. Base URL:

BASE https://api.bonzicart.com/affiliate/v2

You'll need an API key from your Dashboard → Settings → Developer. Keep it secret — treat it like a password.

Authentication

All requests must include your API key in the Authorization header as a Bearer token:

# cURL example curl https://api.bonzicart.com/affiliate/v2/stats \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json"

Missing or invalid keys return 401 Unauthorized. Tokens are scoped per-affiliate by default.

Rate Limits & Errors

API is rate-limited to 600 requests/minute per account. Exceeding triggers 429 Too Many Requests with a Retry-After header in seconds.

Standard error envelope:

{ "error": { "code": "invalid_request", "message": "productId is required", "docsUrl": "https://api.bonzicart.com/docs#errors" } }

Affiliate Stats

Returns lifetime + period earnings, click counts, conversion rate, and tier status.

GET /affiliate/v2/stats?period=30d

Response

{ "affiliateId": "aff_7XK29P", "tier": "gold", "earnings": { "lifetime": 184250, "matured": 24820, "pending": 8410 }, "clicks": 12450, "conversions": 342, "conversionRate": 2.75 }

Withdrawals

Trigger a withdrawal request once your matured balance crosses ₹500. Funds land in 24 hours.

POST /affiliate/v2/withdrawals
{ "amount": 24820, "method": "upi", "destination": "affiliate@hdfcbank" }

Webhooks

Subscribe to real-time events: click.recorded, sale.attributed, commission.matured, withdrawal.processed.

// Sample payload { "event": "sale.attributed", "affiliateId": "aff_7XK29P", "orderId": "ord_8K2M9P", "orderValue": 8000, "commission": 360, "timestamp": "2026-06-07T09:41:23Z" }

Postman Collection & SDKs

Skip the boilerplate — download our Postman collection and SDKs: