Tools
Register an affiliate
Create an affiliate in Referhatch and get a referral code. Set a commission percentage; 10 means 10%. Registration does not record a visit or purchase.
curl https://api.referhatch.com/v1/register_affiliate \
-H "Authorization: Bearer $API_KEY" \
-d '{"name":"your name"}'Input
| Field | Type | Description |
|---|---|---|
name (required) | string | Affiliate name. |
commission_rate | number | Percentage from 0 to 100. Enter 10 for 10%. Up to two decimal places. |
referral_code | string | Optional unique code. Use letters, numbers, dashes or underscores. Case sensitive. |
Output
| Field | Type | Description |
|---|---|---|
ok (required) | boolean | |
error | object | |
affiliate | object |
Record a referral visit
Record one visit against an affiliate ID or referral code in your account. Each call, including retries, records a new visit and consumes one tracking block. Your site must submit visits; Referhatch does not collect them automatically.
Set a commission rate
Set an affiliate's percentage for future purchases. Enter 10 for 10%. Existing purchases keep the rate and commission saved when they were recorded.