Create new referral link
HTTP method
EndPoint
POST
/network/referral

Example request

1
curl -X POST \
2
https://api.trackier.com/network/referral \
3
-H 'content-type: application/json' \
4
-H 'postman-token: 71bc684a-ba03-dd3c-34b5-792f34ec39c7' \
5
-H 'x-api-key: {apiKey}' \
6
-d '{
7
"publisher_id": "{userId}",
8
"recurring": true,
9
"base": "profit",
10
"type": "percentage",
11
"rate": "30"
12
}'
Copied!

Request body Params

Field
Type
Description
Required
publisher_id
string
Id of the publisher
Yes
recurring
boolean
Whether the publisher will receive recurring commission
No (default: true)
base
string
Acceptable values - (payout, profit) whether commission is based on the payout of the registering affiliate or the profit made by the affiliate to the network
No (Default: "payout")
type
string
Commission type - percentage or fixed amount Values -> (percentage, amount)
No (default: "percentage")
rate
float
Rate corresponding to the commission type, in case of percentage it wil be treated as percent (i.e. rate = 10, base = profit, 10 % of the profit)
No (Default: 0.0)

Example response

1
{
2
"success": true,
3
"data": {
4
"message": "Referral Link Created!!",
5
"referral": {
6
"user_id": "string",
7
"recurring": true,
8
"type": "percentage",
9
"base": "profit",
10
"rate": 30,
11
"_id": "string",
12
"live": true,
13
"created": "2017-05-24 17:31:56",
14
"modified": null
15
},
16
"publishers": [
17
{
18
"_id": "string",
19
"name": "Publisher Demo",
20
"username": "#publisherDemo"
21
},
22
{
23
"_id": "string",
24
"name": "test pub",
25
"username": "test pub"
26
},
27
{
28
"_id": "string",
29
"name": "Awesome User",
30
"username": "Awesome User"
31
}
32
]
33
}
34
}
Copied!