Traffic source

To obtain traffic sources, you must convey an token .

Parameter Description Format Default value
id id traffic source int -
name traffic source name string -
in_archive is it in the archive? 0 or 1 0
postback_url postback url string -
postback_status postback sending with this status string "all"
cost_parameter cost parameter string -
cost_placeholder cost placeholder string -
external_id_parameter external id parameter string -
external_id_placeholder external id placeholder string -
values values [] or [] Traffic source value object -

Postback status can take values "all", "unconfirmed", "processed" or "confirmed".

Traffic source value
Parameter Description Format Default value
name name string -
value placeholder string -
param parameter string -
Traffic source list
curl -H "token: your_token" 'https://api.might.io/traffic_source'

After a successful execution of the request you will receive JSON object:

{ "success": true, "data": [ { "id": 10, "in_archive": 0, "name": "traffic source 1", "postback_url": "", "cost_parameter": "bid", "cost_placeholder": "{bid}", "external_id_parameter": "click_id", "external_id_placeholder": "{click_id}", "values": [ { "name": "Website ID", "param": "websiteid", "value": "[WEBSITEID]", }, { "name": "Campaign ID", "param": "campaignid", "value": "[CAMPAIGNID]", }, ... ] }, { "id": 11, "in_archive": 0, "name": "traffic source 2", "postback_url": "", "cost_parameter": "", "cost_placeholder": "", "external_id_parameter": "", "external_id_placeholder": "", "values": [ { "name": "country", "param": "country", "value": "{country}", }, ] }, ... ], }

Object description

Get traffic source by id
curl -H "token: your_token" 'https://api.might.io/traffic_source/your_traffic_source_id'

Where:

  • your_traffic_source_id - traffic source id

After a successful execution of the request you will receive JSON object:

{ "success": true, "data": { "id": 11, "in_archive": 0, "name": "traffic source 2", "postback_url": "", "cost_parameter": "", "cost_placeholder": "", "external_id_parameter": "", "external_id_placeholder": "", "values": [ { "name": "country", "param": "country", "value": "{country}", }, ] }, }

Object description

Create traffic source
curl -H "token: your_token" -d 'your_request_body' -X POST 'https://api.might.io/traffic_source'

Where:

  • your_request_body - traffic source JSON object
    { "name": "new traffic source", "values": [ { "value": "{app_id}", "name": "app_id", "param": "app_id", }, { "value": "{country}", "name": "country", "param": "country", } ] }
  • Parameter name is mandatory

After a successful execution of the request you will receive JSON object:

{ "success": true, "data": { "id": 15, "in_archive": 0, "name": "new traffic source", "postback_url": "", "cost_parameter": "", "cost_placeholder": "", "external_id_parameter": "", "external_id_placeholder": "", "values": [ { "value": "{app_id}", "name": "app_id", "param": "app_id", }, { "value": "{country}", "name": "country", "param": "country", } ] }, }

Object description

Update traffic source
curl -H "token: your_token" -d 'your_request_body' -XPUT 'https://api.might.io/traffic_source'

Where:

  • your_request_body - traffic source JSON object, which must contain an traffic source id
    { "name": "new name", "id": your_traffic_source_id, "values": [ { "value": "{app}", "name": "app", "param": "app", }, ] }
  • your_traffic_source_id - traffic source id
  • Parameter id is mandatory

After a successful execution of the request you will receive JSON object:

{ "success": true, "data": { "id": 15, "in_archive": 0, "name": "new name", "postback_url": "", "cost_parameter": "", "cost_placeholder": "", "external_id_parameter": "", "external_id_placeholder": "", "values": [ { "value": "{app}", "name": "app", "param": "app", }, ] }, }

Object description