NAV Navbar
shell
  • Introduction
  • Authorization
  • Campaigns
  • Offers
  • Sources
  • Landings
  • Domains
  • Networks
  • Tracks
  • Conversions
  • Summary statistics
  • Transactions
  • Indices
  • Models
  • Introduction

    Redtrack.io API documentation.

    Authorization

    Log in using credentials

    POST http://api.redtrack.io/auth

    curl -X POST http://api.redtrack.io/auth -H "Content-Type: multipart/form-data" -d 'login=your_email&password=your_password'
    

    Response example

    {
      "id": "5a8407acf07a9153abe11564",
      "email": "your_email",
      "api_key": "MYAPITOKEN",
      "password": "842e918e652bc3010a32e43423572aacca0e9221",
      "password_confirmation": "",
      "firstname": "",
      "lastname": "",
      "skype": "",
      "status": 1,
      "timezone_id": "5a8407abf07a9153abe11530",
      "timezone": {
        "id": "5a8407abf07a9153abe11530",
        "zone": "UTC",
        "alias": "",
        "offset": 0
      },
      "plan_id": "free",
      "plan": {
        "id": "free",
        "name": "Free",
        "price": 0,
        "clicks": 50000,
        "addons": {
          "options": null,
          "event_price": 0
        }
      },
      "plan_clicks": 50000,
      "addon_clicks": 0,
      "clicks_left": 49981,
      "alerted_at": "",
      "subscription": {
        "plan_id": "free",
        "customer_id": "",
        "payment_token": "",
        "billing_date": "",
        "card_number_tail": "",
        "details": {
          "name": "",
          "company": "",
          "address": "",
          "country": "",
          "state": "",
          "city": "",
          "postal_code": "",
          "tax": ""
        }
      },
      "billing_status": 1,
      "billing_country": "PG",
      "stats": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "lp_ctr": 0
      },
      "created_at": "2018-02-14T12:55:55.759+03:00",
      "updated_at": "2018-02-14T12:55:55.759+03:00",
      "last_login": "2018-03-22T13:13:23.964070409Z",
      "referral_code": "10ccaa761f600d653c83613b047d7d",
      "promo_name": "",
      "promo_code": {
        "id": "",
        "title": "",
        "discount": {
          "value": 0,
          "kind": 0,
          "quantity": 0
        },
        "status": 0,
        "description": ""
      },
      "settings": {
        "is_admin_mode": false
      },
      "fallback_url": "",
      "shared_access": null
    }
    

    Log in using api key

    GET http://api.redtrack.io/auth

    curl "http://api.redtrack.io/auth?api_key=MYAPITOKEN"
    

    Response example

    {
      "id": "5a8407acf07a9153abe11564",
      "email": "your_email",
      "api_key": "MYAPITOKEN",
      "password": "842e918e652bc3010a32e43423572aacca0e9221",
      "password_confirmation": "",
      "firstname": "",
      "lastname": "",
      "skype": "",
      "status": 1,
      "timezone_id": "5a8407abf07a9153abe11530",
      "timezone": {
        "id": "5a8407abf07a9153abe11530",
        "zone": "UTC",
        "alias": "",
        "offset": 0
      },
      "plan_id": "free",
      "plan": {
        "id": "free",
        "name": "Free",
        "price": 0,
        "clicks": 50000,
        "addons": {
          "options": null,
          "event_price": 0
        }
      },
      "plan_clicks": 50000,
      "addon_clicks": 0,
      "clicks_left": 49981,
      "alerted_at": "",
      "subscription": {
        "plan_id": "free",
        "customer_id": "",
        "payment_token": "",
        "billing_date": "",
        "card_number_tail": "",
        "details": {
          "name": "",
          "company": "",
          "address": "",
          "country": "",
          "state": "",
          "city": "",
          "postal_code": "",
          "tax": ""
        }
      },
      "billing_status": 1,
      "billing_country": "PG",
      "stats": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "lp_ctr": 0
      },
      "created_at": "2018-02-14T12:55:55.759+03:00",
      "updated_at": "2018-02-14T12:55:55.759+03:00",
      "last_login": "2018-03-22T13:13:23.964070409Z",
      "referral_code": "10ccaa761f600d653c83613b047d7d",
      "promo_name": "",
      "promo_code": {
        "id": "",
        "title": "",
        "discount": {
          "value": 0,
          "kind": 0,
          "quantity": 0
        },
        "status": 0,
        "description": ""
      },
      "settings": {
        "is_admin_mode": false
      },
      "fallback_url": "",
      "shared_access": null
    }
    

    Update personal info

    PUT http://api.redtrack.io/me

    curl -X PUT http://api.redtrack.io/me?api_key=MYAPITOKEN" -H "Content-Type: application/json" -d '<Request body>'
    

    Request body:

    {
      "password": "11111",
      "password_confirmation": "11111",
      "firstname": "John",
      "lastname": "Doe",
      "skype": "johndoe"
    }
    

    Response example

    {
      "id": "5a8407acf07a9153abe11564",
      "email": "your_email",
      "api_key": "MYAPITOKEN",
      "password": "842e918e652bc3010a32e43423572aacca0e9221",
      "password_confirmation": "",
      "firstname": "John",
      "lastname": "Doe",
      "skype": "johndoe",
      "status": 1,
      "timezone_id": "5a8407abf07a9153abe11530",
      "timezone": {
        "id": "5a8407abf07a9153abe11530",
        "zone": "UTC",
        "alias": "",
        "offset": 0
      },
      "plan_id": "free",
      "plan": {
        "id": "free",
        "name": "Free",
        "price": 0,
        "clicks": 50000,
        "addons": {
          "options": null,
          "event_price": 0
        }
      },
      "plan_clicks": 50000,
      "addon_clicks": 0,
      "clicks_left": 49981,
      "alerted_at": "",
      "subscription": {
        "plan_id": "free",
        "customer_id": "",
        "payment_token": "",
        "billing_date": "",
        "card_number_tail": "",
        "details": {
          "name": "",
          "company": "",
          "address": "",
          "country": "",
          "state": "",
          "city": "",
          "postal_code": "",
          "tax": ""
        }
      },
      "billing_status": 1,
      "billing_country": "PG",
      "stats": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "lp_ctr": 0
      },
      "created_at": "2018-02-14T12:55:55.759+03:00",
      "updated_at": "2018-03-22T12:55:55.759+03:00",
      "last_login": "2018-03-22T13:13:23.964070409Z",
      "referral_code": "10ccaa761f600d653c83613b047d7d",
      "promo_name": "",
      "promo_code": {
        "id": "",
        "title": "",
        "discount": {
          "value": 0,
          "kind": 0,
          "quantity": 0
        },
        "status": 0,
        "description": ""
      },
      "settings": {
        "is_admin_mode": false
      },
      "fallback_url": "",
      "shared_access": null
    }
    

    Reset API key

    PUT http://api.redtrack.io/me/apikey

    curl -X PUT http://api.redtrack.io/me/apikey?api_key=MYAPITOKEN"
    
    {
      "id": "5a8407acf07a9153abe11564",
      "email": "your_email",
      "api_key": "DIFFERENT_API_KEY",
      "password": "842e918e652bc3010a32e43423572aacca0e9221",
      "password_confirmation": "",
      "firstname": "John",
      "lastname": "Doe",
      "skype": "johndoe",
      "status": 1,
      "timezone_id": "5a8407abf07a9153abe11530",
      "timezone": {
        "id": "5a8407abf07a9153abe11530",
        "zone": "UTC",
        "alias": "",
        "offset": 0
      },
      "plan_id": "free",
      "plan": {
        "id": "free",
        "name": "Free",
        "price": 0,
        "clicks": 50000,
        "addons": {
          "options": null,
          "event_price": 0
        }
      },
      "plan_clicks": 50000,
      "addon_clicks": 0,
      "clicks_left": 49981,
      "alerted_at": "",
      "subscription": {
        "plan_id": "free",
        "customer_id": "",
        "payment_token": "",
        "billing_date": "",
        "card_number_tail": "",
        "details": {
          "name": "",
          "company": "",
          "address": "",
          "country": "",
          "state": "",
          "city": "",
          "postal_code": "",
          "tax": ""
        }
      },
      "billing_status": 1,
      "billing_country": "PG",
      "stats": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "lp_ctr": 0
      },
      "created_at": "2018-02-14T12:55:55.759+03:00",
      "updated_at": "2018-03-22T12:55:55.759+03:00",
      "last_login": "2018-03-22T13:13:23.964070409Z",
      "referral_code": "10ccaa761f600d653c83613b047d7d",
      "promo_name": "",
      "promo_code": {
        "id": "",
        "title": "",
        "discount": {
          "value": 0,
          "kind": 0,
          "quantity": 0
        },
        "status": 0,
        "description": ""
      },
      "settings": {
        "is_admin_mode": false
      },
      "fallback_url": "",
      "shared_access": null
    }
    

    Campaigns

    Campaigns list

    Returns list of Campaign objects which belong to authorized user and match query filters.

    curl "http://api.redtrack.io/campaigns?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a7b3ba2f07a9105f25a5f5d",
      "user_id": "5a7b3ba1f07a9105f25a5f4d",
      "title": "Supah Hybrid",
      "cpc": 3,
      "source_id": "5a7b3ba1f07a9105f25a5f51",
      "source_title": "Magnificent Two-Face Man",
      "domain_id": "5a7b3ba1f07a9105f25a5f54",
      "trackback_url": "http://hackettlind.net/josefa.bechtelar/5a7b3ba2f07a9105f25a5f5d",
      "postback_url": "http://abbott.io/joannie.cain",
      "redirect_type": 0,
      "status": 1,
      "streams": [
        {
          "offers": [
            {
              "id": "5a7b3ba2f07a9105f25a5f58",
              "weight": 100
            }
          ],
          "landings": [],
          "cost": 0,
          "weight": 100,
        }
      ],
      "stat": {
        "clicks": 240,
        "unique_clicks": 1,
        "conversions": 22,
        "revenue": 20.33,
        "cost": 15.204,
        "cpa": 0.6911,
        "cpc": 0.0634,
        "cr": 0.0917,
        "epc": 0.0847,
        "profit": 5.126,
        "roi": 33.7148,
        "lp_views": 0,
        "lp_clicks": 0,
        "unique_lp_clicks": 0,
        "ctr": 0,
        "lp_ctr": 0
      },
      "postbacks": null,
      "created_at": "2018-02-07T20:47:14.008+03:00",
      "updated_at": "2018-02-07T20:47:14.008+03:00",
      "tags": null,
      "notes": ["The quick brown fox jumps over the lazy dog"]
    }]
    

    GET http://api.redtrack.io/campaigns

    Parameter Format Default Description
    title Filter by campaign name
    ids Filter by campaign IDs (comma-separated)
    sources Filter by traffic source IDs (comma-separated)
    status Filter by campaign status
    tags Filter by campaign tags (comma-separated)
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Create a campaign

    Body should be Campaign object.

    curl -X POST http://api.redtrack.io/campaigns?api_key=MYAPITOKEN -H "Content-Type: application/json" -d '<Request body>'
    

    Request body:

    {
      "title": "Gorilla Grodd",
      "cpc": 0.12,
      "source_id": "59314165ba4d12ab9511fc5f",
      "domain_id": "59314165ba4d12ab9511fc75",
      "postbacks": [{
        "url": "http://postback.example",
        "payment_percent": 50
      }],
      "streams": [{
        "offers": [
          {
            "id": "59314165ba4d12ab9511fc78",
            "weight": 1
          }
        ],
        "landings": [{
            "id": "59314166ba4d12ab9511fdc9",
            "weight": 3
          }
        ],
        "cost": 1,
        "weight": 1,
        "filters": {
          "country": {
            "iso": ["US"],
            "active": true
          },
          "city": {
            "titles": ["New York", "Chicago"],
            "active": true
          },
          "browser": {
            "titles": ["Mozilla", "Chrome", "Safari"]
          },
          "os": {
            "titles": ["Windows 7", "Windows 8.1", "Windows XP"],
            "active": true
          },
          "device_type": {
            "items": ["IPhone 6", "IPhone 7"],
            "active": false
          },
          "bots": {
            "ids": ["5a99845f12485fc6958d6f1c"],
            "active": true,
            "exclude": true
          },
          "subs": {
            "items": {
              "sub1": "Some sub 1",
              "sub2": "Some sub 2",
              "sub3": "Some sub 3",
              "sub4": "Some sub 4",
              "sub5": "Some sub 5",
              "sub6": "Some sub 6"
            },
            "active": false
          }
        }
      }],
      "notes": [
        "The quick brown fox jumps over the lazy dog"
      ],
      "tags": ["tag1", "awesome"]
    }
    

    Response example

    {
      "id": "5ab16377f07a912895fc3e3c",
      "user_id": "5a7b3ba1f07a9105f25a5f4d",
      "title": "Gorilla Grodd",
      "cpc": 0.12,
      "source_id": "59314165ba4d12ab9511fc5f",
      "source_title": "",
      "domain_id": "59314165ba4d12ab9511fc75",
      "trackback_url": "",
      "postback_url": "",
      "redirect_type": 0,
      "status": 0,
      "streams": [
        {
          "offers": [
            {
              "id": "59314165ba4d12ab9511fc78",
              "weight": 1
            }
          ],
          "landings": [
            {
              "id": "59314166ba4d12ab9511fdc9",
              "weight": 3
            }
          ],
          "cost": 1,
          "weight": 1,
          "filters": {
            "country": {
              "iso": ["US"],
              "active": true,
              "exclude": false
            },
            "city": {
              "titles": ["New York","Chicago"],
              "active": true,
              "exclude": false
            },
            "isp": {
              "items": null,
              "active": false,
              "exclude": false
            },
            "browser": {
              "titles": ["Mozilla","Chrome","Safari"],
              "active": false,
              "exclude": false
            },
            "os": {
              "titles": ["Windows 7","Windows 8.1","Windows XP"],
              "active": true,
              "exclude": false
            },
            "connection_type": {
              "id": "",
              "active": false,
              "exclude": false
            },
            "device_type": {
              "items": ["IPhone 6", "IPhone 7"],
              "active": false,
              "exclude": false
            },
            "ip": {
              "items": null,
              "active": false,
              "exclude": false
            },
            "subs": {
              "items": {
                "sub1": "Some sub 1",
                "sub2": "Some sub 2",
                "sub3": "Some sub 3",
                "sub4": "Some sub 4",
                "sub5": "Some sub 5",
                "sub6": "Some sub 6",
                "sub7": "",
                "sub8": "",
                "sub9": "",
                "sub10": ""
              },
              "active": false,
              "exclude": false
            },
            "bots": {
              "ids": ["5a99845f12485fc6958d6f1c"],
              "active": true,
              "exclude": true
            }
          }
        }
      ],
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "unique_lp_clicks": 0,
        "ctr": 0,
        "lp_ctr": 0
      },
      "notes": ["The quick brown fox jumps over the lazy dog"],
      "postbacks": [{
        "url": "http://postback.example",
        "payment_percent": 50
      }],
      "created_at": "2018-03-20T19:39:35.079192031Z",
      "updated_at": "2018-03-20T19:39:35.079192101Z",
      "tags": ["tag1", "awesome"]
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank",
        "Source value is invalid"
      ]
    }
    

    POST http://api.redtrack.io/campaigns

    Update a campaign

    curl -XPUT http://api.redtrack.io/campaigns/5937094bba4d1200ec2a349b?api_key=MYAPITOKEN -H "Content-Type: application/json" -d '<Request body>'
    

    PUT http://api.redtrack.io/campaigns/:id

    Request body:

    {
      "status": 1,
      "tags": [
        "red",
        "track"
      ]
    }
    

    Response example

    {
      "id": "5ab16377f07a912895fc3e3c",
      "user_id": "5a7b3ba1f07a9105f25a5f4d",
      "title": "Gorilla Grodd",
      "cpc": 0.12,
      "source_id": "59314165ba4d12ab9511fc5f",
      "source_title": "",
      "domain_id": "59314165ba4d12ab9511fc75",
      "trackback_url": "",
      "postback_url": "",
      "redirect_type": 0,
      "status": 1,
      "streams": [
        {
          "offers": [
            {
              "id": "59314165ba4d12ab9511fc78",
              "weight": 1
            }
          ],
          "landings": [
            {
              "id": "59314166ba4d12ab9511fdc9",
              "weight": 3
            }
          ],
          "cost": 1,
          "weight": 1,
          "filters": {
            "country": {
              "iso": ["US"],
              "active": true,
              "exclude": false
            },
            "city": {
              "titles": ["New York","Chicago"],
              "active": true,
              "exclude": false
            },
            "isp": {
              "items": null,
              "active": false,
              "exclude": false
            },
            "browser": {
              "titles": ["Mozilla","Chrome","Safari"],
              "active": false,
              "exclude": false
            },
            "os": {
              "titles": ["Windows 7","Windows 8.1","Windows XP"],
              "active": true,
              "exclude": false
            },
            "connection_type": {
              "id": "",
              "active": false,
              "exclude": false
            },
            "device_type": {
              "items": ["IPhone 6", "IPhone 7"],
              "active": false,
              "exclude": false
            },
            "ip": {
              "items": null,
              "active": false,
              "exclude": false
            },
            "subs": {
              "items": {
                "sub1": "Some sub 1",
                "sub2": "Some sub 2",
                "sub3": "Some sub 3",
                "sub4": "Some sub 4",
                "sub5": "Some sub 5",
                "sub6": "Some sub 6",
                "sub7": "",
                "sub8": "",
                "sub9": "",
                "sub10": ""
              },
              "active": false,
              "exclude": false
            },
            "bots": {
              "ids": ["5a99845f12485fc6958d6f1c"],
              "active": true,
              "exclude": true
            }
          }
        }
      ],
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0,
        "lp_views": 0,
        "lp_clicks": 0,
        "unique_lp_clicks": 0,
        "ctr": 0,
        "lp_ctr": 0
      },
      "notes": ["The quick brown fox jumps over the lazy dog"],
      "postbacks": [{
        "url": "http://postback.example",
        "payment_percent": 50
      }],
      "created_at": "2018-03-20T19:39:35.079192031Z",
      "updated_at": "2018-03-20T19:39:35.079192101Z",
      "tags": ["red", "track"]
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank",
        "Source value is invalid"
      ]
    }
    

    Delete a campaign

    DELETE http://api.redtrack.io/campaigns/:id

    Responds with a 204 status code and an empty response body in case of success.

    Individual campaign statistics

    curl "http://api.redtrack.io/stat/campaigns/591efe91ba4d120936b7b3b2?api_key=MYAPITOKEN&date_from=2017-05-01&group=offer"
    

    Response example:

    [{
      "offer_id": "595b916eba4d125ed96f8159",
      "offer_title": "Armor Brain",
      "clicks": 96,
      "unique_clicks": 56,
      "conversions": 3,
      "revenue": 1.64,
      "cost": 5.808,
      "cpa": 0.5165,
      "cpc": 0.0634,
      "cr": 0.0312,
      "epc": 0.0171,
      "profit": 5.126,
      "roi": 28.2369,
      "lp_views": 71,
      "lp_clicks": 41,
      "unique_lp_clicks": 20,
      "ctr": 135.2113,
      "lp_ctr": 57.7465
    }]
    

    GET http://api.redtrack.io/stat/campaigns/:id

    Parameter Format Default Description
    offer_id Filter by traffic offer ID
    source_id Filter by traffic source ID
    country_code US Filter by country
    os Filter by OS
    sub1-sub10 Filter by sub value
    group group fields date A field to group entries by
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period

    Group fields

    date, offer, landing, country, city, os, browser, device, connection_type, isp, sub1-sub10

    Offers

    Offers list

    Returns list of Offer objects which belong to authorized user and match query filters.

    curl "http://api.redtrack.io/offers?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a3a6ab1ba4d12e2979aa25c",
      "created_at": "2017-12-20T15:50:41.939+02:00",
      "updated_at": "2017-12-20T15:50:41.939+02:00",
      "user_id": "5a3a6ab1ba4d12e2979aa24d",
      "program_id": "5a3a6ab1ba4d12e2979aa250",
      "network_title": "Dark Northstar III",
      "title": "Giant Apocalypse Brain",
      "country_codes": ["HK"],
      "status": 1,
      "url": "http://wolf.org/ona.gutmann?clickid={clickid}&utm_source={sub1}",
      "postback_url": "",
      "payment": {
        "amount": 6
      },
      "stat": {
        "clicks": 334,
        "unique_clicks": 220,
        "conversions": 27,
        "revenue": 0,
        "cost": 19.496,
        "cpa": 1.3849,
        "cpc": 0.0639,
        "cr": 0.0808,
        "epc": 0,
        "roi": 0
        "profit": 2.411,
      },
      "targeting": {
        "os": [{
          "name": "Linux",
          "version": "13"
        }],
        "browser": [{
          "name": "Chrome",
          "version": "10"
        }],
        "countries": ["LI"],
        "cities": ["Ramonmouth"],
        "devices": ["LG"],
        "isp": []
      },
      "cap": 0
      "cap_alert": false,
      "cpapi": false
    }]
    

    GET http://api.redtrack.io/offers

    Parameter Format Description
    ids Filter by offer IDs (comma-separated)
    title Filter by offer name
    countries Filter by country IDs (comma-separated)
    networks Filter by affiliate network IDs (comma-separated)
    status Filter by offer status
    date_from YYYY-MM-DD The first day of time period
    date_to YYYY-MM-DD The last day of time period
    page Page number for pagination
    per Entries per page

    Create an offer

    Body should be Offer object.

    curl -X POST http://api.redtrack.io/offers?api_key=MYAPITOKEN -H "Content-Type: application/json" -d '<Request body>'
    

    Request body:

    {
      "title": "Red Bushido",
      "program_id": "5577a89f567dcf024d8b4568",
      "country_codes": ["GR", "CW"],
      "status": 1,
      "url": "http://schmeler.io/jon",
      "postback_url": "http://postback.example",
      "payment": {
        "amount": 0.2
      },
      "targeting": {
        "os": [{
          "name": "ISO",
          "version": "6"
        }],
        "browser": [{
          "name": "Chrome",
          "version": "13"
        }],
        "countries": ["AI"],
        "cities": ["West Alycefurt"],
        "devices": ["Samsung"],
        "isp": []
      },
      "cap": 0
    }
    

    Response example

    {
      "id": "5a3a6ab1ba4d12e2979aa25a",
      "created_at": "2017-12-20T15:50:41.934+02:00",
      "updated_at": "2017-12-20T15:50:41.934+02:00",
      "user_id": "5a3a6ab1ba4d12e2979aa24d",
      "program_id": "5577a89f567dcf024d8b4568",
      "title": "Red Bushido",
      "country_codes": ["GR", "CW"],
      "status": 1,
      "url": "http://schmeler.io/jon",
      "postback_url": "http://postback.example",
      "payment": {
        "amount": 0.2
      },
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "targeting": {
        "os": [{
          "name": "ISO",
          "version": "6"
        }],
        "browser": [{
          "name": "Chrome",
          "version": "13"
        }],
        "countries": ["AI"],
        "cities": ["West Alycefurt"],
        "devices": ["Samsung"],
        "isp": []
      },
      "cap": 0,
      "cap_alert": false,
      "cpapi": false
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank",
        "Payment value is invalid",
        "Program ID is invalid"
      ]
    }
    

    POST http://api.redtrack.io/offers

    The status codes server may respond with are the following:

    Code Note
    201 Offer created successfully
    400 Bad request parameters

    Update an offer

    curl -XPUT http://api.redtrack.io/offers/5a3a6ab1ba4d12e2979aa25a?api_key=MYAPITOKEN -H "Content-Type: application/json" -d '<Request body>'
    

    Request body:

    {
      "country_codes": ["GB", "US"],
      "status": 2,
      "cap": 2
    }
    

    Response example

    {
      "id": "5a3a6ab1ba4d12e2979aa25a",
      "created_at": "2017-12-20T15:50:41.934+02:00",
      "updated_at": "2017-12-20T15:50:41.934+02:00",
      "user_id": "5a3a6ab1ba4d12e2979aa24d",
      "program_id": "5577a89f567dcf024d8b4568",
      "title": "Red Bushido",
      "country_codes": ["GB", "US"],
      "status": 2,
      "url": "http://schmeler.io/jon",
      "postback_url": "http://postback.example",
      "payment": {
        "amount": 0.2
      },
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "targeting": {
        "os": [{
          "name": "ISO",
          "version": "6"
        }],
        "browser": [{
          "name": "Chrome",
          "version": "13"
        }],
        "countries": ["AI"],
        "cities": ["West Alycefurt"],
        "devices": ["Samsung"],
        "isp": []
      },
      "cap": 2,
      "cap_alert": false,
      "cpapi": false
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank",
        "Payment value is invalid",
        "Program ID is invalid"
      ]
    }
    

    PUT http://api.redtrack.io/offers/:id

    The status codes server may respond with are the following:

    Code Note
    200 Offer updated successfully
    400 Bad request parameters
    403 Unauthorized to manage the resource
    404 Offer ID cannot be found

    Sources

    Sources list

    curl "http://api.redtrack.io/sources?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a7b3ba1f07a9105f25a5f51",
      "title": "Magnificent Two-Face Man",
      "user_id": "5a7b3ba1f07a9105f25a5f4d",
      "created_at": "2018-02-07T20:47:14+03:00",
      "updated_at": "2018-02-07T20:47:14+03:00",
      "stat": {
        "clicks": 866,
        "unique_clicks": 1,
        "conversions": 79,
        "revenue": 82.3,
        "cost": 51.866,
        "cpa": 0.6565,
        "cpc": 0.0599,
        "cr": 0.0912,
        "epc": 0.095,
        "profit": 30.434,
        "roi": 58.6781
      },
      "postback_url": "",
      "cost_id": "",
      "ref_id": "",
      "sub1": "",
      "sub2": "",
      "sub3": "",
      "sub4": "",
      "sub5": "",
      "sub6": "",
      "sub7": "",
      "sub8": "",
      "sub9": "",
      "sub10": "",
      "hints": {
        "sub1": "",
        "sub2": "",
        "sub3": "",
        "sub4": "",
        "sub5": "",
        "sub6": "",
        "sub7": "",
        "sub8": "",
        "sub9": "",
        "sub10": ""
      },
      "preset_id": "",
      "campaign_count": 4
    }]
    

    GET http://api.redtrack.io/sources

    Parameter Format Default Description
    title Filter by campaign name
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Create a source

    Body should be Source object.

    POST http://api.redtrack.io/sources

    Request body:

    {
      "preset_id": "5811bf3a7588f7923a8b45bd",
      "title": "Google AdWords",
      "url": "",
      "postback_url": "",
      "ref_id": "",
      "cost_id": "",
      "sub1": "{Keyword}",
      "sub2": "{Placement}",
      "sub3": "{MatchType}",
      "sub4": "{Creative}",
      "sub5": "{IfSearch:Search}",
      "sub6": "{IfContent:Content}",
      "sub7": "{ifcontent:display}",
      "sub8": "{ifcontent:mobile}",
      "sub9": "{network}",
      "sub10": "{target}",
      "hints": {
        "sub1": "Bidded keyword",
        "sub2": "Website placement for display network",
        "sub3": "Bidded keyword match type",
        "sub4": "Ad creative",
        "sub5": "Did the click come from search",
        "sub6": "",
        "sub7": "Did the click come from display network",
        "sub8": "Did the click come from a mobile device",
        "sub9": "Network type (search or display)",
        "sub10": "Category placement for display network"
      }
    }
    

    Response example

    {
      "id": "5ab2ac57e1ee425b3abd6c6f",
      "title": "Google AdWords",
      "user_id": "5a900216e1ee4217560ea049",
      "created_at": "2018-03-21T19:02:47.765539453Z",
      "updated_at": "2018-03-21T19:02:47.765539705Z",
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "postback_url": "",
      "cost_id": "",
      "ref_id": "",
      "sub1": "{Keyword}",
      "sub2": "{Placement}",
      "sub3": "{MatchType}",
      "sub4": "{Creative}",
      "sub5": "{IfSearch:Search}",
      "sub6": "{IfContent:Content}",
      "sub7": "{ifcontent:display}",
      "sub8": "{ifcontent:mobile}",
      "sub9": "{network}",
      "sub10": "{target}",
      "hints": {
        "sub1": "Bidded keyword",
        "sub2": "Website placement for display network",
        "sub3": "Bidded keyword match type",
        "sub4": "Ad creative",
        "sub5": "Did the click come from search",
        "sub6": "",
        "sub7": "Did the click come from display network",
        "sub8": "Did the click come from a mobile device",
        "sub9": "Network type (search or display)",
        "sub10": "Category placement for display network"
      },
      "preset_id": "5811bf3a7588f7923a8b45bd",
      "campaign_count": 0
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank"
      ]
    }
    

    Update a source

    PUT http://api.redtrack.io/sources/:id

    Request body:

    {
      "ref_id": "clickID",
    }
    

    Response example

    {
      "id": "5ab2ac57e1ee425b3abd6c6f",
      "title": "Google AdWords",
      "user_id": "5a900216e1ee4217560ea049",
      "created_at": "2018-03-21T19:02:47.765539453Z",
      "updated_at": "2018-03-21T19:02:47.765539705Z",
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "postback_url": "",
      "cost_id": "",
      "ref_id": "clickID",
      "sub1": "{Keyword}",
      "sub2": "{Placement}",
      "sub3": "{MatchType}",
      "sub4": "{Creative}",
      "sub5": "{IfSearch:Search}",
      "sub6": "{IfContent:Content}",
      "sub7": "{ifcontent:display}",
      "sub8": "{ifcontent:mobile}",
      "sub9": "{network}",
      "sub10": "{target}",
      "hints": {
        "sub1": "Bidded keyword",
        "sub2": "Website placement for display network",
        "sub3": "Bidded keyword match type",
        "sub4": "Ad creative",
        "sub5": "Did the click come from search",
        "sub6": "",
        "sub7": "Did the click come from display network",
        "sub8": "Did the click come from a mobile device",
        "sub9": "Network type (search or display)",
        "sub10": "Category placement for display network"
      },
      "preset_id": "5811bf3a7588f7923a8b45bd",
      "campaign_count": 0
    }
    

    Delete a source

    DELETE http://api.redtrack.io/source/:id

    Responds with a 204 status code and an empty response body in case of success.

    Sources presets index

    GET http://api.redtrack.io/source_presets

    curl "http://api.redtrack.io/source_presets?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5811bf3a7588f7923a8b45bd",
      "title": "Google AdWords",
      "url": "",
      "rating": 0,
      "contact": {
        "person": "",
        "email": "",
        "phone": "",
        "messenger": ""
      },
      "referral_link": "",
      "comment": "",
      "postback_url": "",
      "logo": "https://s3.eu-central-1.amazonaws.com/redtrackpartnerlogos/logos/adwords.png",
      "formats": [],
      "ref_id": "{GCLID}",
      "cost_id": "",
      "sub1": "{Keyword}",
      "sub2": "{Placement}",
      "sub3": "{MatchType}",
      "sub4": "{adgroupid}",
      "sub5": "{creative}",
      "sub6": "{campaignid}",
      "sub7": "{device}",
      "sub8": "{adposition}",
      "sub9": "{network}",
      "sub10": "{target}",
      "hints": {
        "sub1": "Bidded keyword",
        "sub2": "Website placement for display network",
        "sub3": "Bidded keyword match type",
        "sub4": "The ID of the ad group that served the ad",
        "sub5": "The ID of your ad creative",
        "sub6": "The ID of the campaign that served the ad",
        "sub7": "Returns “m” for mobile, “t” for tablet or “c” for computer",
        "sub8": "The position on the page that your ad appeared in",
        "sub9": "Network type (search or display)",
        "sub10": "Category placement for display network"
      }
    }]
    

    Landings

    Landings list

    curl "http://api.redtrack.io/landings?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "595b916eba4d125ed96f8158",
      "title": "Cyborg Molten Man Knight",
      "url": "http://bayer.name/imogene_kertzmann",
      "user_id": "595b916dba4d125ed96f8140",
      "created_at": "2017-07-04T16:00:30.248+03:00",
      "updated_at": "2017-07-04T16:00:30.248+03:00",
      "stat": {
        "clicks": 264,
        "unique_clicks": 1,
        "conversions": 27,
        "revenue": 12.93,
        "cost": 15.471,
        "cpa": 1.7452,
        "cpc": 0.0599,
        "cr": 0.1023,
        "epc": 0.049,
        "roi": 83.5757,
        "lp_views": 535,
        "lp_clicks": 115,
        "unique_lp_clicks": 15,
        "ctr": 49.3458,
        "lp_ctr": 21.4953
      }
    }]
    

    GET http://api.redtrack.io/landings

    Parameter Format Default Description
    title Filter by landing name
    ids Filter by landing IDs (comma-separated)
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Create a landing

    Body should be Landing object.

    POST http://api.redtrack.io/landings

    Request body:

    {
      "title": "Awesome Landing",
      "url": "http://awesome.landing"
    }
    

    Response example

    {
        "id": "5ab2be7cf07a912895fc3e3f",
        "title": "Awesome Landing",
        "url": "http://awesome.landing",
        "user_id": "5a7b3ba1f07a9105f25a5f4d",
        "created_at": "2018-03-21T20:20:12.624964137Z",
        "updated_at": "2018-03-21T20:20:12.624964192Z",
        "stat": {
            "clicks": 0,
            "unique_clicks": 0,
            "conversions": 0,
            "revenue": 0,
            "cost": 0,
            "cpa": 0,
            "cpc": 0,
            "cr": 0,
            "epc": 0,
            "profit": 0,
            "roi": 0,
            "lp_views": 0,
            "lp_clicks": 0,
            "unique_lp_clicks": 0,
            "ctr": 0,
            "lp_ctr": 0
        }
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank"
      ]
    }
    

    Update a landing

    PUT http://api.redtrack.io/landings/:id

    Request body:

    {
      "title": "something else",
    }
    

    Response example

    {
        "id": "5ab2be7cf07a912895fc3e3f",
        "title": "something else",
        "url": "http://awesome.landing",
        "user_id": "5a7b3ba1f07a9105f25a5f4d",
        "created_at": "2018-03-21T20:20:12.624964137Z",
        "updated_at": "2018-03-21T20:21:12.624964192Z",
        "stat": {
            "clicks": 0,
            "unique_clicks": 0,
            "conversions": 0,
            "revenue": 0,
            "cost": 0,
            "cpa": 0,
            "cpc": 0,
            "cr": 0,
            "epc": 0,
            "profit": 0,
            "roi": 0,
            "lp_views": 0,
            "lp_clicks": 0,
            "unique_lp_clicks": 0,
            "ctr": 0,
            "lp_ctr": 0
        }
    }
    

    Delete a landing

    DELETE http://api.redtrack.io/landings/:id

    Responds with a 204 status code and an empty response body in case of success.

    Domains

    Domains list

    curl "http://api.redtrack.io/domains?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "59240366ba4d12c5332f1d84",
      "title": "Bolt",
      "url": "http://labadie.com/dylan",
      "user_id": "59240366ba4d12c5332f1d81",
      "email": "admin@local.host",
      "created_at": "2017-05-23T12:39:50.557+03:00",
      "updated_at": "2017-05-23T12:39:50.557+03:00",
      "status": 1
    }]
    

    GET http://api.redtrack.io/domains

    Parameter Default Description
    page 1 Page number for pagination
    per 100 Entries per page

    Create a domain

    Body should be Domain object.

    POST http://api.redtrack.io/domains

    Request body:

    {
      "title": "General Copycat 2",
      "url": "http://hackettlind.net",
      "email": "admin@local.host"
    }
    

    Response example

    {
        "id": "5ab2c64ff07a912895fc3e40",
        "title": "General Copycat 2",
        "url": "http://hackettlind.net",
        "user_id": "5a7b3ba1f07a9105f25a5f4d",
        "email": "admin@local.host",
        "created_at": "2018-03-21T20:53:35.034676135Z",
        "updated_at": "2018-03-21T20:53:35.034676284Z",
        "status": 1
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank",
        "You cannot add one of Redtrack.io domains as your custom domain",
        "URL is invalid REG"
      ]
    }
    

    Update a domain

    PUT http://api.redtrack.io/domains/:id

    Request body:

    {
      "title": "lamb of god",
    }
    

    Response example

    {
        "id": "5ab2c64ff07a912895fc3e40",
        "title": "lamb of god",
        "url": "http://hackettlind.net",
        "user_id": "5a7b3ba1f07a9105f25a5f4d",
        "email": "admin@local.host",
        "created_at": "2018-03-21T20:53:35.034676135Z",
        "updated_at": "2018-03-21T20:54:35.034676284Z",
        "status": 1
    }
    

    Delete a source

    DELETE http://api.redtrack.io/domains/:id

    Responds with a 204 status code and an empty response body in case of success.

    Networks

    Affiliate networks list

    curl "http://api.redtrack.io/networks?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "59240366ba4d12c5332f1d83",
      "title": "Captain Metron Eyes",
      "skype": "captainmetroneyes",
      "url": "http://durgan.biz/sabina_cronin",
      "offer_url": "",
      "postback_url": "",
      "user_id": "59240366ba4d12c5332f1d81",
      "created_at": "2017-05-23T12:39:50.555+03:00",
      "updated_at": "2017-05-23T12:39:50.555+03:00"
      "stat": {
        "clicks": 292,
        "unique_clicks": 1,
        "conversions": 25,
        "revenue": 26.12,
        "cost": 17.497,
        "cpa": 0.6999,
        "cpc": 0.0599,
        "cr": 0.0856,
        "epc": 0.0895,
        "profit": 8.623,
        "roi": 49.2827
      },
      "preset_id": "",
      "offer_count": 2
    }]
    

    GET http://api.redtrack.io/networks

    Parameter Default Description
    title Filter by network name
    page 1 Page number for pagination
    per 100 Entries per page

    Create a network

    Body should be Network object.

    POST http://api.redtrack.io/networks

    Request body:

    {
      "title": "Mobidea",
      "url": "https://www.mobidea.com",
      "skype": "happy_halloween",
      "offer_url": "[insert_offer_url_here]&data1={clickid}",
      "postback_url": "http://rdtrck2.com/postback?clickid={{DATA1}}"
    }
    

    Response example

    {
      "id": "5ab37387e1ee425b3abd6cab",
      "title": "Mobidea",
      "url": "https://www.mobidea.com",
      "skype": "happy_halloween",
      "user_id": "5a900216e1ee4217560ea049",
      "offer_url": "[insert_offer_url_here]&data1={clickid}",
      "postback_url": "http://rdtrck2.com/postback?clickid={{DATA1}}",
      "created_at": "2018-03-22T09:12:39.335926651Z",
      "updated_at": "2018-03-22T09:12:39.33592697Z",
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "preset_id": "",
      "offer_count": 0
    }
    

    Failed request reply:

    {
      "errors": [
        "Title cannot be blank",
        "URL cannot be blank"
      ]
    }
    

    Update a network

    PUT http://api.redtrack.io/networks/:id

    Request body:

    {
      "skype": "holy-guacamole",
    }
    

    Response example

    {
      "id": "5ab37387e1ee425b3abd6cab",
      "title": "Mobidea",
      "url": "https://www.mobidea.com",
      "skype": "holy-guacamole",
      "user_id": "5a900216e1ee4217560ea049",
      "offer_url": "[insert_offer_url_here]&data1={clickid}",
      "postback_url": "http://rdtrck2.com/postback?clickid={{DATA1}}",
      "created_at": "2018-03-22T09:12:39.335926651Z",
      "updated_at": "2018-03-22T09:13:39.33592697Z",
      "stat": {
        "clicks": 0,
        "unique_clicks": 0,
        "conversions": 0,
        "revenue": 0,
        "cost": 0,
        "cpa": 0,
        "cpc": 0,
        "cr": 0,
        "epc": 0,
        "profit": 0,
        "roi": 0
      },
      "preset_id": "",
      "offer_count": 0
    }
    

    Delete a network

    DELETE http://api.redtrack.io/networks/:id

    Responds with a 204 status code and an empty response body in case of success.

    Network presets index

    GET http://api.redtrack.io/network_presets

    curl "http://api.redtrack.io/network_presets?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a4f47c7e1ee42638631ee69",
      "title": "Bomboffers",
      "url": "http://bomboffers.com",
      "skype": "",
      "logo": "https://s3.eu-central-1.amazonaws.com/redtrackpartnerlogos/logos/bomboffers.png",
      "categories": [
        "Gambling",
        "Pin-submits",
        "Sweepstakes",
        "Nutra"
      ],
      "rating": 0,
      "contact": {
        "person": "",
        "email": "",
        "phone": "",
        "messenger": ""
      },
      "referral_link": "",
      "comment": "",
      "offer_url": "[insert_offer_url_here]&sub1={clickid}",
      "postback_url": "http://rdtrck2.com/postback?clickid={sub1}"
    }]
    

    Tracks

    Log

    curl "http://api.redtrack.io/tracks?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "592561daba4d12f0f4bbf675",
      "campaign": "Snowbird",
      "offer": "Scorpia",
      "landing": "",
      "source": "Hyperion Lord",
      "network": "Mr Lyja Brain",
      "country": "CY",
      "city": "Waltermouth",
      "os": "OSX",
      "isp": "China Unicom Beijing",
      "browser": "Chrome",
      "device": "",
      "connection_type": "wifi",
      "user_agent": "Chrome/40.0.2214.115",
      "ip": "148.117.194.211",
      "referer": "http://blockhuels.name/theodora.jacobi",
      "is_lp_track": 0,
      "ref_id": "",
      "cost": 4,
      "created_at": "2017-05-24T10:35:00Z",
      "sub1": "",
      "sub2": "",
      "sub3": "",
      "sub4": "",
      "sub5": "",
      "sub6": "",
      "sub7": "",
      "sub8": "",
      "sub9": "",
      "sub10": ""
    }]
    

    GET http://api.redtrack.io/tracks

    Parameter Format Default Description
    campaign_id Filter by campaign ID
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Conversions

    Log

    curl "http://api.redtrack.io/conversions?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5927edeeba4d1227f217f019",
      "clickid": "5927edeeba4d1227f217f00d",
      "campaign": "Mr Molten Man",
      "offer": "Dark Firestar",
      "source": "Scorpion",
      "country": "TZ",
      "payout": 0.31,
      "created_at": "2017-05-26T08:57:00Z"
    }]
    

    GET http://api.redtrack.io/conversions

    Parameter Format Default Description
    campaign_id Filter by campaign ID
    offer_id Filter by offer ID
    source_id Filter by source ID
    network_id Filter by affiliate network ID
    country_code US Filter by country
    clickid Find by click ID
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Upload̦

    curl "http://api.redtrack.io/conversions?api_key=MYAPITOKEN" -X POST -d '[{"clickid":"591efe91ba4d120936b7b3ac","payout":0.12}]'
    

    POST http://api.redtrack.io/conversions

    Accepts an array of objects, each of them containing the following keys:

    Parameter Description
    clickid ID of a corresponding track
    payout Payout value

    Responds with empty body and 201 HTTP status in case of success.

    Summary statistics

    curl "http://api.redtrack.io/stat?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "value": "2018-02-14",
      "clicks": 13,
      "unique_clicks": 1,
      "conversions": 3,
      "revenue": 3.4,
      "cost": 0.762,
      "cpa": 0.254,
      "cpc": 0.0586,
      "cr": 0.2308,
      "epc": 0.2615,
      "profit": 2.638,
      "roi": 346.1942,
      "lp_views": 0,
      "lp_clicks": 0,
      "lp_ctr": 0
    },
    {
      "value": "2018-02-13",
      "clicks": 26,
      "unique_clicks": 1,
      "conversions": 2,
      "revenue": 2.23,
      "cost": 1.526,
      "cpa": 0.763,
      "cpc": 0.0587,
      "cr": 0.0769,
      "epc": 0.0858,
      "profit": 0.704,
      "roi": 46.1337,
      "lp_views": 0,
      "lp_clicks": 0,
      "lp_ctr": 0
    }]
    

    GET http://api.redtrack.io/stat

    Parameter Format Default Description
    date_from YYYY-MM-DD current day The first day of time period
    date_to YYYY-MM-DD current day The last day of time period
    campaign_id Filter by campaign ID
    offer_id Filter by offer ID
    source_id Filter by traffic source ID

    Transactions

    List

    curl "http://api.redtrack.io/transactions?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "key": "bpns8agx",
      "type": "recurring",
      "user_id": "59d2030bba4d1270cfb146ac",
      "plan_id": "starter",
      "status": "approved",
      "package": {
        "price": 29,
        "vat": 7.25,
        "total": 36.25,
        "events_count": 100000
      },
      "created_at": "2017-10-02T16:42:27.028+03:00"
    }]
    

    GET http://api.redtrack.io/transactions

    Parameter Format Default Description
    status approved Billing response status
    date_from YYYY-MM-DD The first day of time period
    date_to YYYY-MM-DD The last day of time period
    page 1 Page number for pagination
    per 100 Entries per page

    Indices

    Timezone index

    GET http://api.redtrack.io/timezones

    curl "http://api.redtrack.io/timezones?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "56826343be24e6430d0041a7",
      "zone": "Africa/Abidjan",
      "alias": "(UTC/GMT +00:00) Africa/Abidjan",
      "offset": 0
    },
    {
      "id": "56826343be24e6430d0041a8",
      "zone": "Africa/Accra",
      "alias": "(UTC/GMT +00:00) Africa/Accra",
      "offset": 0
    },
    {
      "id": "56826343be24e6430d0041a9",
      "zone": "Africa/Addis_Ababa",
      "alias": "(UTC/GMT +03:00) Africa/Addis_Ababa",
      "offset": 10800
    }]
    

    Countries index

    GET http://api.redtrack.io/countries

    curl "http://api.redtrack.io/countries?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5582b2a08ead0e71030041a7",
      "title": "Andorra",
      "iso": "AD"
    },
    {
      "id": "5582b2a08ead0e71030041a8",
      "title": "United Arab Emirates",
      "iso": "AE"
    },
    {
      "id": "5582b2a08ead0e71030041a9",
      "title": "Afghanistan",
      "iso": "AF"
    }]
    

    Cities index

    GET http://api.redtrack.io/cities

    Parameter Description
    name Filter by city's name
    curl "http://api.redtrack.io/cities?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a72d45ee1ee42589ee05e9f",
      "name": "Abu Dhabi",
      "iso": "AE",
      "slug": "abu dhabi",
      "region": 0,
      "lat": 0,
      "lon": 0
    },
    {
      "id": "5a72d45ee1ee42589ee05ea0",
      "name": "Dubai",
      "iso": "AE",
      "slug": "dubai",
      "region": 0,
      "lat": 0,
      "lon": 0
    }]
    

    Browsers index

    GET http://api.redtrack.io/browsers

    curl "http://api.redtrack.io/browsers?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "55d303788ead0e1d010041aa",
      "title": "Chrome"
    },
    {
      "id": "55d3038a8ead0ee5050041a9",
      "title": "Chrome Mobile"
    },
    {
      "id": "55d303928ead0ee3050041a7",
      "title": "Mobile Safari"
    }]
    

    OS index

    GET http://api.redtrack.io/os

    curl "http://api.redtrack.io/os?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "55d305248ead0ee5050041ac",
      "title": "Android"
    },
    {
      "id": "55d3052e8ead0ee3050041aa",
      "title": "Windows 7"
    },
    {
      "id": "55d305378ead0ee2050041ac",
      "title": "iOS"
    }]
    

    Devices index

    GET http://api.redtrack.io/devices

    curl "http://api.redtrack.io/devices?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "5a4e5779d6639f89e166360b",
      "title": "Mobile",
      "code": "DevicePhone"
    },
    {
      "id": "5a4e5787d6639f89e166360c",
      "title": "Desktop",
      "code": "DeviceComputer"
    }]
    

    ISP index

    GET http://api.redtrack.io/isp

    Parameter Description
    names Filter by isp name (comma-separated names)
    curl "http://api.redtrack.io/isp?api_key=MYAPITOKEN"
    

    Response example:

    [{
     "_id": "55d1de09940c534c8a5eaf32",
     "network": "5.32.160.0/21",
     "isp": "Ingenico Marketing Solutions GmbH",
     "organization": "Ingenico Marketing Solutions GmbH",
     "autonomous_system_number": 198870,
     "autonomous_system_organization": "Ingenico Marketing Solutions GmbH",
     "country": "DE"
    }]
    

    Campaigns tags index

    GET http://api.redtrack.io/tags/campaigns

    List of all campaigns tags of the authorized user.

    curl "http://api.redtrack.io/tags/campaigns?api_key=MYAPITOKEN"
    

    Response example:

    [
        "tag1",
        "track",
        "red"
    ]
    

    Offers tags index

    GET http://api.redtrack.io/tags/offers

    List of all offers tags of the authorized user.

    curl "http://api.redtrack.io/tags/offers?api_key=MYAPITOKEN"
    

    Response example:

    [
        "tag1",
        "track",
        "red"
    ]
    

    Plans index

    GET http://api.redtrack.io/plans

    curl "http://api.redtrack.io/plans?api_key=MYAPITOKEN"
    

    Response example:

    [{
      "id": "business",
      "name": "Business",
      "price": 339,
      "clicks": 15000000,
      "addons": {
        "options": [
          2500000,
          5000000,
          10000000
        ],
        "event_price": 0.034
      }
    },
    {
      "id": "enterprise",
      "name": "Enterprise",
      "price": 939,
      "clicks": 50000000,
      "addons": {
        "options": [
          5000000,
          15000000,
          30000000
        ],
        "event_price": 0.027
      }
    }]
    

    Models

    Campaign

    Campaign model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    cpc number Cost per click; should be positive
    source_id string required
    domain_id string
    trackback_url string yes This is the URL that you will send your traffic to
    redirect_type int 1: 302, 2: meta, 3: js, 4: hidden
    status int 1: active, 2: archived, 3: deleted
    streams []Stream
    stat Stat yes clicks and conversions statistic for campaign
    notes []string
    tags []string instrument for filtering campaigns
    postbacks []Postback
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    Stream model

    Field Name Type Description
    offers []StreamOffer
    landings []StreamLanding
    cost number
    weight number positive integer; defines the probability of picking the stream
    filters []StreamFilter

    StreamOffer model

    Field Name Type Description
    id string related offer ID
    weight number positive integer; defines the probability of picking the offer

    StreamLanding model

    Field Name Type Description
    id string related lander ID
    weight number positive integer; defines the probability of picking the lander

    StreamFilter model

    Field Name Type Description
    country CountryFilter
    city CityFilter
    isp ISPFilter
    browser BrowserFilter
    os OSFilter
    connection_type ConnectionTypeFilter
    device_type DeviceTypeFilter
    ip IPFilter
    subs SubsFilter
    bots BotFilter

    Each of the following Filter models also contain the following two parameters

    Field Name Type Description
    active boolean
    exclude boolean if true, when click matches the filter, stream won't be picked

    BotFilter model

    Field Name Type Description
    ids []string IDs of related Bots

    CountryFilter model

    Field Name Type Description
    iso []string ISO codes of related countries

    CityFilter model

    Field Name Type Description
    titles []string cities' names

    ISPFilter model

    Field Name Type Description
    items []string ISPs' names

    BrowserFilter model

    Field Name Type Description
    titles []string browsers

    OSFilter model

    Field Name Type Description
    titles []string OS names

    ConnectionTypeFilter model

    Field Name Type Description
    id string connection type

    DeviceTypeFilter model

    Field Name Type Description
    iso []string device types

    IPFilter model

    Field Name Type Description
    items []string IPs

    SubsFilter model

    Field Name Type Description
    items []SubItems IPs

    Postback model

    Field Name Type Description
    url string
    payment_percent int payout will be recalculate using this field before sending to postback url

    Offer

    Offer model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    status int 1: active, 2: archived
    program_id string required
    network_title string yes
    country_codes []string ISO country codes
    url string required
    postback_url string
    payment OffersPayment
    stat Stat yes clicks and conversions statistic for offer
    cap number integer >0, maximum amount of clicks per day redirected to the offer
    cap_alert bolean
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    OffersPayment model

    Field Name Type Description
    amount number should be >0

    Source

    Source model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    postback_url string
    payment OffersPayment
    stat Stat yes clicks and conversions statistic for source
    cost_id string traffic source macro for click cost
    ref_id string traffic source macro for clickid
    sub1 string 9 more such fields as for SubItems
    hints SubItems
    campaign_count number yes number of campaigns using this source
    preset_id string id of predefined source
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    Landing

    Landing model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    url string
    stat Stat yes clicks and conversions statistic for landing
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    Domain

    Domain model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    url string required
    email string
    status number
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    Network

    Network model

    Field Name Type Read Only Description
    id string yes
    user_id string yes
    title string required
    url string required
    skype string
    postback_url string postback URL template
    preset_id string id of predefined network
    offer_count number yes number of offers from this network
    stat Stat yes clicks and conversions statistic for network
    created_at string(RFC3339) yes
    updated_at string(RFC3339) yes

    Other models

    Track model

    Field Name Type
    id string
    campaign string
    offer string
    landing string
    source string
    network string
    country string
    city string
    os string
    browser string
    device string
    isp string
    connection_type string
    user_agent string
    ip string
    referer string
    is_lp_track number

    ref_id string cost | number created_at | string(RFC3339) SubItems |

    SubItems model

    Field Name Type
    sub1 string
    sub2 string
    sub3 string
    sub4 string
    sub5 string
    sub6 string
    sub7 string
    sub8 string
    sub9 string
    sub10 string