Tracking Links
The endpoints documented here allow you to generate tracking links for offers and smartlinks.
Generate Offer Tracking Link
/v1/networks/tracking/offers/clicks
This endpoint will create a click tracking link for a given offer / affiliate couple. The affiliate must have visibility over the offer and must be allowed to “run” the offer. Otherwise the endpoint will return an error.
A lot like the tracking link widget, this endpoint takes many options if you want to e.g. generate a tracking link with a preset sub id. However only the network_offer_id
and network_affiliate_id
parameters are required.
Body Params
The ID of the offer
The ID of the affiliate
An optional ID for a specific tracking domain that should be used to generate the link
An optional offer URL ID. If specified, the offer URL ID must belong to the network_offer_id specified (and must exist).
An optional offer creative ID. If specified, the creative must belong to the network_offer_id specified (and must exist).
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
An optional source_id
that should be used as a query string parameter on the tracking link.
An optional sub1
that should be used as a query string parameter on the tracking link.
An optional sub2
that should be used as a query string parameter on the tracking link.
An optional sub3
that should be used as a query string parameter on the tracking link.
An optional sub4
that should be used as a query string parameter on the tracking link.
An optional sub5
that should be used as a query string parameter on the tracking link.
When enabled, will encrypt all query string parameters into a single one.
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
Examples
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Example 1 : Fetch a tracking link for offer ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_offer_id": 5
}
Example 2 : Fetch a tracking link for offer ID 1 and affiliate ID 3, using facebook
as a sub1
value and media_buying
as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_offer_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
Response
{
"url": "http://www.tracking-domain.test/9W598/2CTPL/?sub1=facebook&sub3=media_buying"
}
Generate Offer Tracking Link QR Code
/v1/networks/tracking/offers/clicks/qr
This endpoint is effectively the same as the one documented above, but instead of returning a textual version of the tracking link URL, it returns a QR code that points to the tracking link URL.
The body parameters and requirements are the same, only the response differs.
Note that this is a streaming endpoint and that the response will have the Content-Type
header set to image/png
Body Params
The ID of the offer
The ID of the affiliate
An optional ID for a specific tracking domain that should be used to generate the link
An optional offer URL ID. If specified, the offer URL ID must belong to the network_offer_id specified (and must exist).
An optional offer creative ID. If specified, the creative must belong to the network_offer_id specified (and must exist).
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
An optional source_id
that should be used as a query string parameter on the tracking link.
An optional sub1
that should be used as a query string parameter on the tracking link.
An optional sub2
that should be used as a query string parameter on the tracking link.
An optional sub3
that should be used as a query string parameter on the tracking link.
An optional sub4
that should be used as a query string parameter on the tracking link.
An optional sub5
that should be used as a query string parameter on the tracking link.
When enabled, will encrypt all query string parameters into a single one.
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
Examples
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks/qr' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Example 1 : Fetch a tracking link for offer ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_offer_id": 5
}
Example 2 : Fetch a tracking link for offer ID 1 and affiliate ID 3, using facebook
as a sub1
value and media_buying
as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_offer_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
Response
The response will be *.png
image file streamed back. The result can be saved directly following the curl call. For example :
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks/qr' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"network_affiliate_id": 7,
"network_offer_id": 5
}' > file_qrcode.png
would work.
Generate Smartlink Tracking Link
/v1/networks/tracking/campaigns/clicks
This endpoint will create a click tracking link for a given smartlink / affiliate couple.
A lot like the tracking link widget, this endpoint takes many options if you want to e.g. generate a tracking link with a preset sub id. However only the network_campaign_id
and network_affiliate_id
parameters are required.
Body Params
The ID of the smartlink
The ID of the affiliate
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
An optional ID for a specific tracking domain that should be used to generate the link
An optional source_id
that should be used as a query string parameter on the tracking link.
An optional sub1
that should be used as a query string parameter on the tracking link.
An optional sub2
that should be used as a query string parameter on the tracking link.
An optional sub3
that should be used as a query string parameter on the tracking link.
An optional sub4
that should be used as a query string parameter on the tracking link.
An optional sub5
that should be used as a query string parameter on the tracking link.
When enabled, will encrypt all query string parameters into a single one.
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
Examples
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Example 1 : Fetch a tracking link for smartlink ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_campaign_id": 5
}
Example 2 : Fetch a tracking link for smartlink ID 1 and affiliate ID 3, using facebook
as a sub1
value and media_buying
as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_campaign_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
Response
{
"url": "http://www.servetrack2.test/cmp/5TMX8/27W1G/?sub1=facebook&sub3=media_buying",
"can_affiliate_run_all_offers": true
}
Generate Smartlink Tracking Link QR Code
/v1/networks/tracking/campaigns/clicks/qr
This endpoint is effectively the same as the one documented above, but instead of returning a textual version of the tracking link URL, it returns a QR code that points to the tracking link URL.
The body parameters and requirements are the same, only the response differs.
Note that this is a streaming endpoint and that the response will have the Content-Type
header set to image/png
Body Params
The ID of the smartlink
The ID of the affiliate
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
An optional ID for a specific tracking domain that should be used to generate the link
An optional source_id
that should be used as a query string parameter on the tracking link.
An optional sub1
that should be used as a query string parameter on the tracking link.
An optional sub2
that should be used as a query string parameter on the tracking link.
An optional sub3
that should be used as a query string parameter on the tracking link.
An optional sub4
that should be used as a query string parameter on the tracking link.
An optional sub5
that should be used as a query string parameter on the tracking link.
When enabled, will encrypt all query string parameters into a single one.
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
Examples
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks/qr' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Example 1 : Fetch a tracking link for smartlink ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_campaign_id": 5
}
Example 2 : Fetch a tracking link for smartlink ID 1 and affiliate ID 3, using facebook
as a sub1
value and media_buying
as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_campaign_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
Response
The response will be *.png
image file streamed back. The result can be saved directly following the curl call. For example :
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks/qr' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '{
"network_affiliate_id": 7,
"network_campaign_id": 5
}' > file_qrcode.png
would work.