View attributed purchases
Retrieve purchases in your account with their affiliate, saved commission and currency. Filter by affiliate, exact order reference or an inclusive UTC date range. Use next_offset when has_more is true.
curl https://api.referhatch.com/v1/list_purchases \
-H "Authorization: Bearer $API_KEY" \
-d '{}'Input
| Field | Type | Description |
|---|---|---|
affiliate_id | string | Affiliate ID in your account. Provide this or a referral code. |
purchase_reference | string | Exact purchase reference. |
start_date | string | First included date, YYYY-MM-DD. Dates use UTC. |
end_date | string | Last included date, YYYY-MM-DD. Dates use UTC. |
limit | integer | Rows per page. |
offset | integer | Rows to skip. |
Output
| Field | Type | Description |
|---|---|---|
ok (required) | boolean | |
error | object | |
items | array | |
has_more | boolean | |
next_offset | integer |
View affiliates
List your Referhatch affiliates, referral codes and current commission rates. Use next_offset for the next page when has_more is true.
Record an attributed purchase
Submit an order reference, amount and affiliate ID or referral code. Referhatch calculates commission at the current rate. References are unique per account: identical retries return the original purchase; a changed amount, currency or affiliate returns a conflict. Negative amounts or affiliates unavailable in your account return a validation error without changing purchases or commissions. Each call, including retries, consumes one tracking block. Recording commission does not pay affiliates.