API documentation  GET /leads/{id}

Get information about one or more leads

GET https://demo.trafficmanager.com/api/v1.1/leads/{id}

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:

  • {id}: Comma-separated list of lead UUIDs.

Response codes:

  • 200: The lead exists and its information is returned.
  • 403: Authentication failed.
  • 404: The lead doesn't exist, or it doesn't belong to the authenticated user.

Returned values:

  • id: Lead ID. This is a standard UUIDv7.
  • createdAt: Creation date.
  • updatedAt: Date of the last change to the lead.
  • clickid: clickid of the click that generated the lead.
  • leadStatus: status of the lead (order). Possible values are:
    - STATUS_PENDING: the lead is still in its initial state
    - STATUS_CALL_BACK: the lead has been handled but the customer must be called back (unreachable, they couldn't talk, etc...)
    - STATUS_CONFIRMED: the lead has been confirmed (shipping to the customer)
    - STATUS_CANCELED: the lead has been canceled (the customer doesn't want the product anymore)
    - STATUS_POTENTIAL_DOUBLE: the lead is likely a double/invalid
    - STATUS_DOUBLE: the lead is double (double orders, complaints, etc...)
    - STATUS_TRASH: the lead is trash (spam, test, fake, etc...)
    - STATUS_SHIPPED: the order has been shipped/out for delivery
    - STATUS_DELIVERED: the order has been delivered, and paid if COD
    - STATUS_RETURNED: the order has not been delivered, shipment failed (address non-existent/client refused to pay)
    Note: in api version /v1/, STATUS_CONFIRMED was called STATUS_APPROVED. v1 endpoint is deprecated since April 2022 and will be aliased to v1.1 in the future.
  • conversionStatus: status of the conversion associated with the lead. Possible values are:
    - PENDING: the conversion is still pending
    - APPROVED: the conversion has been paid to the affiliate
    - CANCELED: the conversion has been canceled
  • conversionPayout: payout paid to the affiliate for this lead. null if there is not associated conversion.
  • data: form data submitted by the user.
  • affiliateId: Affiliate ID. This field is available only for admins and advertisers.

Request example

GET https://demo.trafficmanager.com/api/v1/leads/0193033a-db17-7d4e-bde6-78135a8b639e,0193034b-201b-76d7-9267-45a8191fb068

Response example

{
    "0193033a-db17-7d4e-bde6-78135a8b639e": {
        "id": "0193033a-db17-7d4e-bde6-78135a8b639e",
        "createdAt": "Mon, 12 Oct 2020 09:29:33 +0000",
        "updatedAt": "Mon, 12 Oct 2020 09:29:33 +0000",
        "clickid": "TM38ee58d4f3b1ca7bba92d3d841731eeb",
        "leadStatus": "STATUS_PENDING",
        "conversionStatus": "PENDING",
        "data": {
            "tel": "3329090907",
            "name": "test 3",
            "price": "50.00",
            "custom": {
                "api": "1",
                "offerta": "M"
            },
            "_source": "API",
            "street-address": "via dei test 3"
        }
    },
    "0193034b-201b-76d7-9267-45a8191fb068": {
        "id": "0193034b-201b-76d7-9267-45a8191fb068",
        "createdAt": "Tue, 13 Oct 2020 11:22:39 +0000",
        "updatedAt": "Tue, 13 Oct 2020 11:22:39 +0000",
        "clickid": "TMd59e6a59297f6b698469b3f02cd57f40",
        "leadStatus": "STATUS_APPROVED",
        "conversionStatus": "APPROVED",
        "data": {
            "tel": "7050991010",
            "name": "John Real 3",
            "price": "56.00",
            "_source": "APIv1",
            "street-address": "TM street, 56"
        }
    }
}