Application API Utilities recordaffiliatehit POST
October 15, 2026 at 9:35 AM/recordaffiliatehit [POST]
Validate affiliate ID and record “hit” - unprotected.
This should be called when the URL contains affiliateid=.... It validates the affiliate ID and optionally records a “hit”. It may indicate that the client app should redirect to a new URL (if the affiliate has been suspended for bad behavior).
Parameters
siteid(numeric) [REQUIRED] - a valid site ID (required since we are not logged in at this point and have no member information)affiliateid(string, max 100 chars) [REQUIRED] - theaffiliateidvalue from the URL
Response Messages
403 Forbidden
If siteid is missing or invalid.
{ "fail" : "Invalid Argument" }
200 OK - success
The result always includes status which may be:
"ok"- the hit was recorded, the client should remember theaffiliateidvalue (via a cookie or similar)"invalid"- theaffiliateidwas not recognized, the client should not remember the value"redirect"- the affiliate is suspended and the client should redirect to theredirecturlvalue Ifstatusis"ok", there will also be acookie_expiryfield in the result, which will indicate the number of days the client application should remember the affiliate for. Ifstatusis"redirect", there will also be aredirecturlfield in the result, which will be the URL of a website to which the member should be redirected instead of proceeding
{
"status" : "ok", // or "invalid" or "redirect"
"redirecturl" : "..."
}