Encoding / Decoding
The numeric IDs of certain resources are sometimes encoded on the Everflow platform. For example, when generating a tracking link for offer ID 1 / partner ID 1 the tracking link will look like so : https://YOUR-TRACKING-DOMAIN.com/28KL6/2CTPL/
. In this URL, the 28KL6
portion of the URL identifies “partner ID 1” whereas 2CTPL
identifies “offer ID 1”.
It’s normally not necessary to encode / decode the IDs yourself as the values will be encoded automatically when generating tracking links, signup links, etc.
The following endpoints are made available in case you need to encode or decode the values for different purposes (internal processes that depend on them, etc.).
There are 7 different situations in which numeric IDs are encoded in Everflow :
tracking_link_affiliate
: the partner ID in the context of a tracking link.tracking_link_offer
: the offer ID in the context of a tracking link.smart_link_affiliate
: the partner ID in the context of a smartlink.smart_link_smart_link
: the smart link ID in the context of a smartlink tracking link.signup_affiliate_employee
: the employee ID in the context of a partner signup. The encoded employee ID is used for the account manager.signup_advertiser_employee
: the employee ID in the context of an advertiser signup. The encoded employee ID is used for the account manager.signup_affiliate_affiliate
: the partner ID in the context of a partner signup. The encoded partner ID is used for the “referrer”.
Encoding
/v1/networks/encode
This endpoint allows you to encode numeric IDs for the different situations outlined above.
Body Params
The situation for which you are encoding the IDs. Values are tracking_link_affiliate
, tracking_link_offer
, smart_link_affiliate
, smart_link_smart_link
, signup_affiliate_employee
, signup_advertiser_employee
, signup_affiliate_affiliate
The IDs you want to encode
Payload Example
{
"type": "tracking_link_offer",
"ids": [1, 2, 3]
}
Request Example
cURL
curl --request POST 'https://api.eflow.team/v1/networks/encode' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Response
{
"values": [
{
"decoded": 1,
"encoded": "2CTPL"
},
{
"decoded": 2,
"encoded": "3QQG7"
},
{
"decoded": 3,
"encoded": "55M6S"
}
]
}
Decoding
/v1/networks/decode
This endpoint allows you to decode numeric IDs that have been encoded in the Everflow platform.
Values that cannot be decoded will return 0
.
Body Params
The situation in which the IDs were encoded. Values are tracking_link_affiliate
, tracking_link_offer
, smart_link_affiliate
, smart_link_smart_link
, signup_affiliate_employee
, signup_advertiser_employee
, signup_affiliate_affiliate
The encoded IDs you want to decode
Payload Example
{
"type": "tracking_link_offer",
"ids": ["2CTPL", "3QQG7", "55M6S"]
}
Request Example
cURL
curl --request POST 'https://api.eflow.team/v1/networks/decode' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
Response
{
"values": [
{
"decoded": 1,
"encoded": "2CTPL"
},
{
"decoded": 2,
"encoded": "3QQG7"
},
{
"decoded": 3,
"encoded": "55M6S"
}
]
}