Edit a referral link
HTTP method
EndPoint
PATCH
/network/referral/{id}

Example request

1
curl -X PATCH \
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
"live": false
8
}'
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
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
type
string
Commission type - percentage or fixed amount Values -> (percentage, amount)
No
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
live
boolean
Enable / Disable the referral link
No (default: true)

Example response

1
{
2
"success": true,
3
"data": {
4
"referral": {
5
"user_id": "57e262141d41c81f2b04b8d0",
6
"recurring": true,
7
"type": "percentage",
8
"base": "profit",
9
"rate": 30,
10
"_id": "5925763489d4467dfe50d337",
11
"live": false,
12
"created": "2017-05-24 17:31:56",
13
"modified": "2017-05-24 17:43:59"
14
},
15
"message": "Referral link Updated!!",
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!