API documentation POST /click
Generates a click and returns the clickid.
POST https://offers.trafficman.io/click/
Authentication:
The request must be authenticated by an admin account with the following HTTP headers:x-api-key: Your API key, found on the Security pagex-user-id: Your User ID, found on the Security page
POST Parameters:
- Required:
offer: offer ID.uid: affiliate UUID. It can be found in the tracking link on any offer page.ip: client IP address (IPv4 or IPv6).ua: client User Agent string.- Optional:
lp: landing page ID (it can be found in the offer page, if the offer has multiple landing pages).cc: ISO 3166-1 alpha-2 country code. If omitted, the country is derived from theipaddress.- Any tracking parameter:
subid,subid2,subid3,subid4,pubid,utm_source,utm_medium,utm_campaign,utm_term,utm_content. is_unique: if you want this click to be marked as "unique". Accepted values are 0 and 1. Default is 1.
Returned values:
-
clickid: the generated clickid.
The clickid is always composed of a fixed prefix (TM), followed by 32 hexadecimal digits.
So the most efficient way to store it is by stripping the prefix, after having verified that it matches, and store the remaining part as a binary(16).
The 32-digit hexadecimal part can also be represented as a UUID v7 without dashes.
Request example
curl --location --request POST 'https://offers.trafficman.io/click/' \ --header 'X-User-ID: __ADMIN_UUID__' \ --header 'X-Api-Key: __ADMIN_API_KEY__' \ --form 'offer=15' \ --form 'uid=6672616e-6365-7363-6f2d-6c6f6b6b6100' \ --form 'ip=51.179.111.205' \ --form 'ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"'
Response example
{
"clickid": "TM88e35f497194df34952435d19db0abd5"
}
العربية
Dansk
Deutsch
Español
Suomi
Italiano
한국어
Português
Română
Українська
Русский
Svenska
中文