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 pagex-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 formatY-m-dendDate: end date in the formatY-m-d- The date range is ignored when
idoramspedOrderIdis 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 withstatus[]-1: double-2: potential double-3: trash
0: pending1: confirmed2: canceled3: to call back4: shipped5: delivered6: returned7: unreachable
Example:GET https://demo.trafficmanager.com/api/v1/leads-list/2020-10-01/2020-10-31?status=0
Returned values:
id: lead IDorderId: order ID, same value asiduuid: lead UUIDstatus: lead statusoffer: offer IDofferName: offer nameofferCountries: countries targeted by the offer. An empty list means Worldwidesku: product SKU of the order, ornullprice: order price, ornullaffId: affiliate IDaffUsername: affiliate usernameclickid: click IDtel: phone numberdata: lead datanotes: lead notescreatedAt: lead creation dateupdatedAt: lead update dateconvId: conversion IDip: IP addresscc: country codeuserAgent: user agentdevice: devicelpId: landing page IDpayout: conversion payoutamount: conversion amountamspedOrderId: AMSped order ID. Only present when the lead has an AMSped orderamspedApiKey: 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 orderamspedStatus: order status as last returned by AMSped, ornullamspedNotes: advertiser notes as last returned by AMSped, ornulltrackingParams: tracking parameters-
subid: subidsubid2: subid2subid3: subid3subid4: subid4pubid: pubidutm_source: utm_sourceutm_medium: utm_mediumutm_campaign: utm_campaignutm_term: utm_termutm_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": ""
}
}
]
English
العربية
Dansk
Deutsch
Español
Suomi
Italiano
Português
Română
Українська
Русский
Svenska
中文