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

Create an affiliate network

POST
/api/v1/affiliate-networks
curl --request POST \
--url https://example.com/api/v1/affiliate-networks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "AdCombo", "postbackUrlTemplate": "https://network.example.com/postback?subid={subid}&sum={payout}", "subidParam": "subid", "statusMap": { "approved_by_advertiser": "sale", "on_hold": "lead" }, "isActive": true }'
Media typeapplication/json
object
name
required
string

Example

AdCombo
postbackUrlTemplate

Macro template for the postback URL this network calls back on conversion.

string

Example

https://network.example.com/postback?subid={subid}&sum={payout}
subidParam

Query param name the network expects the click/subid in.

string

Example

subid
statusMap

Overrides of the default status dictionary: the network’s status (case-insensitive) -> lead | sale | rejected | rebill | upsell.

object

Example

{
"approved_by_advertiser": "sale",
"on_hold": "lead"
}
isActive
boolean
Media typeapplication/json
object
id
required
string
workspaceId
required
string
name
required
string
postbackUrlTemplate
object
subidParam
required
string
statusMap
required

Network status (lower-case) -> our conversion status

object
isActive
required
boolean
createdAt
required
string
updatedAt
required
string

Example generated

{
"id": "example",
"workspaceId": "example",
"name": "example",
"postbackUrlTemplate": {},
"subidParam": "example",
"statusMap": {},
"isActive": true,
"createdAt": "example",
"updatedAt": "example"
}