API documentation  GET /leads-list

Get the list of all leads for a given period.

GET https://demo.trafficmanager.com/api/v1/leads-list/{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
  • The date range is ignored when id or amspedOrderId is set: an order ID identifies a single order, so it can be looked up without knowing when the order was placed.
  • Optional:
  • id: get the data for a specific lead ID, lead UUID, comma-separated list of lead IDs, or AMSped order ID in its prefixed form
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?id=2
  • amspedOrderId: get the data for a specific AMSped order ID, with or without the network prefix. Only returns leads that have an AMSped order
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?amspedOrderId=123456
  • offer: get the data for a specific offer ID
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?offer=2
  • affiliate: get the data for a specific affiliate ID
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?affiliate=2
  • advertiser: get the data for a specific advertiser ID
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?advertiser=2
  • clickid: get the data for a specific clickid
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?clickid=DEV0192b425011475e8a78764913e373124
  • phone: get the data for a specific phone number
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?phone=1234252752
  • name: get the leads whose stored data contains every word of this text, for example the customer name. The words may be stored in different fields, as a first name and a last name are. Limited to 100 characters
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?name=Mario%20Rossi
  • status: get the data for a specific status, or for several of them with status[]
      -1: double -2: potential double -3: trash
      0: pending 1: confirmed 2: canceled 3: to call back 4: shipped 5: delivered 6: returned 7: unreachable
      Example: GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?status=0

Returned values:

  • id: lead ID
  • orderId: order ID, same value as id
  • uuid: lead UUID
  • status: lead status
  • offer: offer ID
  • offerName: offer name
  • offerCountries: countries targeted by the offer. An empty list means Worldwide
  • sku: product SKU of the order, or null
  • price: order price, or null
  • affId: affiliate ID
  • affUsername: affiliate username
  • clickid: click ID
  • tel: phone number
  • data: lead data
  • notes: lead notes
  • createdAt: lead creation date
  • updatedAt: lead update date
  • convId: conversion ID
  • ip: IP address
  • cc: country code
  • userAgent: user agent
  • device: device
  • lpId: landing page ID
  • payout: conversion payout
  • amount: conversion amount
  • amspedOrderId: AMSped order ID. Only present when the lead has an AMSped order
  • amspedApiKey: numeric ID of the AMSped key that created the order, not the key itself. It identifies the AMSped account the order belongs to. Only present when the lead has an AMSped order
  • amspedStatus: order status as last returned by AMSped, or null
  • amspedNotes: advertiser notes as last returned by AMSped, or null
  • trackingParams: tracking parameters
    • subid: subid
    • subid2: subid2
    • subid3: subid3
    • subid4: subid4
    • pubid: pubid
    • utm_source: utm_source
    • utm_medium: utm_medium
    • utm_campaign: utm_campaign
    • utm_term: utm_term
    • utm_content: utm_content

Request example

GET https://demo.trafficmanager.com/api/v1/leads-list/2019-01-01/2024-10-22?id=2&offer=4

Response example

[
  {
    "id": 2,
    "orderId": 2,
    "uuid": null,
    "status": "STATUS_CANCELED",
    "offer": 4,
    "offerName": "Test Offer",
    "affId": 2,
    "affUsername": "admin",
    "clickid": "DEV7eb40a60d0ecf08d5a784ccaf02db6d9",
    "tel": null,
    "data": {
      "nome": "Test Lead",
      "clickid": "7eb40a60d0ecf08d5a784ccaf02db6d9",
      "Telefono": "456789123",
      "Price": "50.00"
    },
    "notes": null,
    "createdAt": "2020-06-01 17:49:19",
    "updatedAt": "2020-06-01 17:49:19",
    "convId": null,
    "ip": "127.0.0.1",
    "cc": "JP",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
    "device": "Windows",
    "lpId": 4,
    "trackingParams": {
      "subid": "",
      "subid2": "",
      "subid3": "",
      "subid4": "",
      "pubid": "",
      "utm_source": "",
      "utm_medium": "",
      "utm_campaign": "",
      "utm_term": "",
      "utm_content": ""
    }
  }
]