Tracking Links

Operations to generate tracking links

The endpoints documented here allow you to generate tracking links for offers and smartlinks.


POST /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.

network_offer_id int

The ID of the offer

network_affiliate_id int

The ID of the affiliate

network_tracking_domain_id int

An optional ID for a specific tracking domain that should be used to generate the link

network_offer_url_id int

An optional offer URL ID. If specified, the offer URL ID must belong to the network_offer_id specified (and must exist).

creative_id int

An optional offer creative ID. If specified, the creative must belong to the network_offer_id specified (and must exist).

network_traffic_source_id int

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.

source_id string

An optional source_id that should be used as a query string parameter on the tracking link.

sub1 string

An optional sub1 that should be used as a query string parameter on the tracking link.

sub2 string

An optional sub2 that should be used as a query string parameter on the tracking link.

sub3 string

An optional sub3 that should be used as a query string parameter on the tracking link.

sub4 string

An optional sub4 that should be used as a query string parameter on the tracking link.

sub5 string

An optional sub5 that should be used as a query string parameter on the tracking link.

is_encrypt_parameters bool

When enabled, will encrypt all query string parameters into a single one.

is_redirect_link bool

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.

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
}

{
	"url": "http://www.tracking-domain.test/9W598/2CTPL/?sub1=facebook&sub3=media_buying"
}

POST /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

network_offer_id int

The ID of the offer

network_affiliate_id int

The ID of the affiliate

network_tracking_domain_id int

An optional ID for a specific tracking domain that should be used to generate the link

network_offer_url_id int

An optional offer URL ID. If specified, the offer URL ID must belong to the network_offer_id specified (and must exist).

creative_id int

An optional offer creative ID. If specified, the creative must belong to the network_offer_id specified (and must exist).

network_traffic_source_id int

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.

source_id string

An optional source_id that should be used as a query string parameter on the tracking link.

sub1 string

An optional sub1 that should be used as a query string parameter on the tracking link.

sub2 string

An optional sub2 that should be used as a query string parameter on the tracking link.

sub3 string

An optional sub3 that should be used as a query string parameter on the tracking link.

sub4 string

An optional sub4 that should be used as a query string parameter on the tracking link.

sub5 string

An optional sub5 that should be used as a query string parameter on the tracking link.

is_encrypt_parameters bool

When enabled, will encrypt all query string parameters into a single one.

is_redirect_link bool

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.

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
}

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.


POST /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.

network_campaign_id int

The ID of the smartlink

network_affiliate_id int

The ID of the affiliate

network_traffic_source_id int

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.

network_tracking_domain_id int

An optional ID for a specific tracking domain that should be used to generate the link

source_id string

An optional source_id that should be used as a query string parameter on the tracking link.

sub1 string

An optional sub1 that should be used as a query string parameter on the tracking link.

sub2 string

An optional sub2 that should be used as a query string parameter on the tracking link.

sub3 string

An optional sub3 that should be used as a query string parameter on the tracking link.

sub4 string

An optional sub4 that should be used as a query string parameter on the tracking link.

sub5 string

An optional sub5 that should be used as a query string parameter on the tracking link.

is_encrypt_parameters bool

When enabled, will encrypt all query string parameters into a single one.

is_redirect_link bool

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.

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
}

{
	"url": "http://www.servetrack2.test/cmp/5TMX8/27W1G/?sub1=facebook&sub3=media_buying",
	"can_affiliate_run_all_offers": true
}

POST /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

network_campaign_id int

The ID of the smartlink

network_affiliate_id int

The ID of the affiliate

network_traffic_source_id int

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.

network_tracking_domain_id int

An optional ID for a specific tracking domain that should be used to generate the link

source_id string

An optional source_id that should be used as a query string parameter on the tracking link.

sub1 string

An optional sub1 that should be used as a query string parameter on the tracking link.

sub2 string

An optional sub2 that should be used as a query string parameter on the tracking link.

sub3 string

An optional sub3 that should be used as a query string parameter on the tracking link.

sub4 string

An optional sub4 that should be used as a query string parameter on the tracking link.

sub5 string

An optional sub5 that should be used as a query string parameter on the tracking link.

is_encrypt_parameters bool

When enabled, will encrypt all query string parameters into a single one.

is_redirect_link bool

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.

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
}

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.