Перейти к содержимому

Update a traffic source

PATCH
/api/v1/traffic-sources/{id}
curl --request PATCH \
--url https://example.com/api/v1/traffic-sources/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Facebook Ads", "postbackUrl": "https://tracker.example.com/postback?clickid={click_id}&status={status}&payout={payout}", "conditions": { "statuses": [ "sale" ], "minPayout": 1.5 }, "isActive": true }'
id
required
string
Media typeapplication/json
object
name
string
<= 100 characters

Example

Facebook Ads
postbackUrl

Postback URL template. Placeholders: {click_id}, {status}, {payout}, {currency}, {conversion_id}, {external_id}, {sub_id_1}..{sub_id_10}

string
<= 2048 characters

Example

https://tracker.example.com/postback?clickid={click_id}&status={status}&payout={payout}
conditions
object
statuses

Only send the postback when the conversion status is one of these. Statuses are Telegfy ones (after mapping the network status).

Array<string>

Example

[
"sale"
]
minPayout

Only send the postback when payout is >= this value

number

Example

1.5
isActive
boolean
default: true
Media typeapplication/json
object
id
required
string
name
required
string
postbackUrl
required
string
conditions
object
isActive
required
boolean
createdAt
required
string
updatedAt
required
string

Example generated

{
"id": "example",
"name": "example",
"postbackUrl": "example",
"conditions": {},
"isActive": true,
"createdAt": "example",
"updatedAt": "example"
}