Skip to main content
POST
/
networks
/
labels
Create Label
curl --request POST \
  --url https://api.eflow.team/v1/networks/labels \
  --header 'Content-Type: application/json' \
  --header 'X-Eflow-Api-Key: <api-key>' \
  --data '
{
  "label": "top-performer",
  "advertiser_ids": [
    13,
    26
  ],
  "affiliate_ids": [
    28,
    35
  ],
  "affiliate_tier_ids": [
    3,
    4
  ],
  "campaign_ids": [],
  "offer_group_ids": [
    2
  ],
  "offer_ids": [
    1,
    8,
    11
  ]
}
'
import requests

url = "https://api.eflow.team/v1/networks/labels"

payload = {
"label": "top-performer",
"advertiser_ids": [13, 26],
"affiliate_ids": [28, 35],
"affiliate_tier_ids": [3, 4],
"campaign_ids": [],
"offer_group_ids": [2],
"offer_ids": [1, 8, 11]
}
headers = {
"X-Eflow-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Eflow-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'top-performer',
advertiser_ids: [13, 26],
affiliate_ids: [28, 35],
affiliate_tier_ids: [3, 4],
campaign_ids: [],
offer_group_ids: [2],
offer_ids: [1, 8, 11]
})
};

fetch('https://api.eflow.team/v1/networks/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eflow.team/v1/networks/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'top-performer',
'advertiser_ids' => [
13,
26
],
'affiliate_ids' => [
28,
35
],
'affiliate_tier_ids' => [
3,
4
],
'campaign_ids' => [

],
'offer_group_ids' => [
2
],
'offer_ids' => [
1,
8,
11
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Eflow-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.eflow.team/v1/networks/labels"

payload := strings.NewReader("{\n \"label\": \"top-performer\",\n \"advertiser_ids\": [\n 13,\n 26\n ],\n \"affiliate_ids\": [\n 28,\n 35\n ],\n \"affiliate_tier_ids\": [\n 3,\n 4\n ],\n \"campaign_ids\": [],\n \"offer_group_ids\": [\n 2\n ],\n \"offer_ids\": [\n 1,\n 8,\n 11\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Eflow-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.eflow.team/v1/networks/labels")
.header("X-Eflow-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"top-performer\",\n \"advertiser_ids\": [\n 13,\n 26\n ],\n \"affiliate_ids\": [\n 28,\n 35\n ],\n \"affiliate_tier_ids\": [\n 3,\n 4\n ],\n \"campaign_ids\": [],\n \"offer_group_ids\": [\n 2\n ],\n \"offer_ids\": [\n 1,\n 8,\n 11\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eflow.team/v1/networks/labels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Eflow-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"top-performer\",\n \"advertiser_ids\": [\n 13,\n 26\n ],\n \"affiliate_ids\": [\n 28,\n 35\n ],\n \"affiliate_tier_ids\": [\n 3,\n 4\n ],\n \"campaign_ids\": [],\n \"offer_group_ids\": [\n 2\n ],\n \"offer_ids\": [\n 1,\n 8,\n 11\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "result": true
}
Create a new label. Labels can be applied to offers, affiliates, advertisers, campaigns, and offer groups to organize and filter resources.

Authorizations

X-Eflow-Api-Key
string
header
required

The Everflow API key generated from the Control Center > Security.

Body

application/json
label
string
required

The label you want to add.

advertiser_ids
integer[]

Which advertisers will have the label.

affiliate_ids
integer[]

Which affiliates will have the label.

campaign_ids
integer[]

Which campaigns will have the label.

offer_ids
integer[]

Which offers will have the label.

offer_group_ids
integer[]

Which offer groups will have the label.

affiliate_tier_ids
integer[]

Which affiliate tiers will have the label.

Response

200 - application/json
result
boolean

Whether the operation was successful.