API documentation  GET /approvalRate

Get the list of all offers with their approval rate for a given period.

GET https://demo.trafficmanager.com/api/v1/approvalRate/{startDate}/{endDate}

Authentication:

The request must be authenticated with the following HTTP headers:
  • x-api-key: Your API key, found in the Security page
  • x-user-id: Your User ID, found in the Security page
If the HTTP headers are not passed, but you are logged in to the TrafficManager panel, the current user is used instead (so you can easily preview or download the data using your browser)

GET Parameters:

  • Required:
  • startDate: start date in the format Y-m-d
  • endDate: end date in the format Y-m-d

Returned values:

  • offer_id: offer ID
  • offer_name: offer name
  • leads: Array of leads
    • to_call_back: Array of leads to call back
      • total: total number of leads to call back
      • payout: total payout for leads to call back
      • percent: percentage of leads to call back
    • confirmed: Array of confirmed leads
      • total: total number of confirmed leads
      • payout: total payout for confirmed leads
      • percent: percentage of confirmed leads
    • canceled: Array of canceled leads
      • total: total number of canceled leads
      • payout: total payout for canceled leads
      • percent: percentage of canceled leads
    • double: total number of double leads
    • trash: total number of trash leads
    • total_leads: total number of leads
    • total_with_trash: total number of leads with trash
  • conversions: Array of conversions
    • pending: Array of pending conversions
      • total: total number of pending conversions
      • payout: total payout for pending conversions
    • approved: Array of approved conversions
      • total: total number of approved conversions
      • percent: percentage of approved conversions
    • canceled: total number of canceled conversions

Request example

GET https://demo.trafficmanager.com/api/v1/approvalRate/2020-10-01/2020-10-31

Response example

{
    "data": [
        {
            "offer_id": 2,
            "offer_name": "Test offer",
            "leads": {
                "to_call_back": {
                    "total": "0",
                    "payout": "0.0000",
                    "percent": "0.00%"
                },
                "confirmed": {
                    "total": "2",
                    "payout": "30.0000",
                    "percent": "100.00%"
                },
                "canceled": {
                    "total": "0",
                    "payout": "0.0000",
                    "percent": "0.00%"
                },
                "double": "0",
                "trash": "1",
                "total_leads": 2,
                "total_with_trash": 3
            },
            "conversions": {
                "pending": {
                    "total": "1",
                    "payout": "15.0000"
                },
                "approved": {
                    "total": "0",
                    "percent": "0.00%"
                },
                "canceled": "2"
            }
        },
        {
            "offer_id": 7,
            "offer_name": "Test offer 2",
            "leads": {
                "to_call_back": {
                    "total": "1",
                    "payout": "12.0000",
                    "percent": "100.00%"
                },
                "confirmed": {
                    "total": "0",
                    "payout": "0.0000",
                    "percent": "0.00%"
                },
                "canceled": {
                    "total": "0",
                    "payout": "0.0000",
                    "percent": "0.00%"
                },
                "double": "1",
                "trash": "0",
                "total_leads": 1,
                "total_with_trash": 2
            },
            "conversions": {
                "pending": {
                    "total": "1",
                    "payout": "12.0000"
                },
                "approved": {
                    "total": "0",
                    "percent": "0.00%"
                },
                "canceled": "1"
            }
        }
    ],
    "status": 200
}