Skip to main content

Vendor Referrals

Retrieve the list of referrals associated with a specific vendor.

GEThttps://api.zenpayz.com/merchant/api/v1/vendors/:id/referrals
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

Path Parameters

ParameterTypeDescription
id
REQUIRED
stringVendor ID (e.g., vnd_a1b2c3d4e5f6g7h8)

Response

Success (200 OK)

{
"success": true,
"data": [
{
"referralId": "ref_e5f6g7h8i9j0k1l2",
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"merchantId": "mer_k1l2m3n4o5p6q7r8",
"referralCode": "ACME-2024-001",
"referralSource": "partner_portal",
"status": "active",
"commissionRate": 12.5,
"totalTransactions": 85,
"totalRevenue": 42500.00,
"totalCommission": 5312.50,
"environment": "production",
"notes": "Referred via partner event",
"createdAt": "2024-01-20T09:00:00.000Z",
"updatedAt": "2024-03-21T10:00:00.000Z"
},
{
"referralId": "ref_h8i9j0k1l2m3n4o5",
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"merchantId": "mer_l2m3n4o5p6q7r8s9",
"referralCode": "ACME-2024-002",
"referralSource": "website",
"status": "active",
"commissionRate": 12.5,
"totalTransactions": 32,
"totalRevenue": 18200.00,
"totalCommission": 2275.00,
"environment": "production",
"notes": null,
"createdAt": "2024-02-10T14:30:00.000Z",
"updatedAt": "2024-03-19T16:45:00.000Z"
}
],
"message": "Vendor referrals retrieved successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T10:30:00.000Z",
"processing_time_ms": 78,
"api_version": "v1",
"endpoint": "GET /vendors/:id/referrals",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
UNAUTHORIZED401Invalid API key
VENDOR_NOT_FOUND404Vendor with specified ID does not exist

Examples

curl -X GET https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8/referrals \
-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"