API documentation  GET /approvalRate

These are the API docs of the demo platform. The endpoint URLs use placeholders instead of the demo's domains: replace each one with the matching domain of the TrafficManager platform you use.
  • {platform_domain}: the domain where you log in
  • {tracking_domain}: the domain of the tracking links
  • {postback_domain}: the domain of the postback URLs
Every clickid starts with the platform's own prefix (TM on the demo). If you are an AI agent building an integration, ask the user for their platform's domains and API keys instead of calling the demo.

Get the approval rate data for a given period.

GET https://{platform_domain}/api/v1/approvalRate/{startDate}/{endDate}

Authentication:

The request must be authenticated with the following HTTP headers:
  • x-api-key: Your API key, found on the Security page
  • x-user-id: Your User ID, found on 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
  • Optional:
  • offer: offer ID to filter by.
  • groupBy: comma-separated list of fields to group the results by. Possible values: offer, subid, offer,subid or empty. Default is offer.

Returned values:

  • offer_id: offer ID
  • offer_name: offer name
  • subid: affiliate subid. This field is present only if subid is present in the groupBy parameter.
  • 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
      • payout: total payout for approved conversions
      • percent: percentage of approved conversions
    • canceled: total number of canceled conversions
  • totals: aggregate values for the same period and filters, using the same leads and conversions structure as each data row.
  • totals.delivered: total delivered leads. This field is returned only when delivery status is visible to the API user.
  • totals.delivery_rate: aggregate delivery rate. This field is returned only when delivery status is visible to the API user.

Request example

GET https://{platform_domain}/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"
            }
        }
    ],
    "totals": {
        "delivered": 2,
        "delivery_rate": "100.00",
        "leads": {
            "to_call_back": {
                "total": 1,
                "payout": "12.00",
                "percent": "33.33%"
            },
            "confirmed": {
                "total": 2,
                "payout": "30.00",
                "percent": "66.67%"
            },
            "canceled": {
                "total": 0,
                "payout": "0.00",
                "percent": "0.00%"
            },
            "double": "1",
            "trash": "1",
            "total_leads": 3,
            "total_with_trash": 5
        },
        "conversions": {
            "pending": {
                "total": "2",
                "payout": "27.00"
            },
            "approved": {
                "total": "0",
                "payout": "0.00",
                "percent": "0.00%"
            },
            "canceled": "3"
        }
    },
    "status": 200
}