Skip to main content

Vendor Stats

Retrieve aggregate statistics across all vendors, including counts by status, total commissions, and referral summaries.

GEThttps://api.zenpayz.com/merchant/api/v1/vendors/stats
Bearer · API key

Request

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation
Content-Type
REQUIRED
application/json

Response

Success (200 OK)

{
"success": true,
"data": {
"totalVendors": 48,
"activeVendors": 35,
"inactiveVendors": 5,
"suspendedVendors": 3,
"pendingVendors": 5,
"totalReferrals": 1240,
"activeReferrals": 980,
"totalCommissionsPaid": 245830.75,
"totalCommissionsPending": 18420.50,
"averageCommissionRate": 11.3,
"topPerformingVendors": [
{
"vendorId": "vnd_b2c3d4e5f6g7h8i9",
"name": "Global Partners Inc",
"totalReferrals": 120,
"totalCommissionEarned": 48750.00
},
{
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"name": "Acme Referrals",
"totalReferrals": 45,
"totalCommissionEarned": 15230.50
}
],
"riskDistribution": {
"low": 30,
"medium": 12,
"high": 4,
"critical": 2
},
"kycDistribution": {
"verified": 38,
"pending": 7,
"rejected": 3
}
},
"message": "Vendor stats retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T10:30:00.000Z",
"processing_time_ms": 210,
"api_version": "v1",
"endpoint": "GET /vendors/stats",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
UNAUTHORIZED401Invalid API key

Examples

curl -X GET https://api.zenpayz.com/merchant/api/v1/vendors/stats \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-03-21T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json"