Skip to main content

New Page

API: getLeadsOnHopper


Description

This endpoint retrieves all leads currently in the hopper for a specific campaign. The hopper is a queue of leads that are ready to be dialed. The response includes detailed lead information such as loan ID, phone number, call disposition, source, list name, and an HTML button to delete the lead.

🔗 URL

https://DOMAIN.croco-dial.net/goAPIv2/goCampaigns/goAPI.php

Note: Replace DOMAIN with the specific domain you want to query.


📝 Required Parameters

ParameterValueDescription
goActiongetLeadsOnHopperAction to get the leads for a specific campaign.
goUserMyUserAPI authorized user.
goPassMyPassPassword for the API authorized user.
campaign_idID-Campaign (number)Campaign identifier to search hopper.
responsetypejson/xmlFormat of the response (json recommended).

Note: This endpoint uses body parameters for authentication instead of tokens or headers.

Request Examples:

GET:

curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goCampaigns/goAPI.php?goAction=getLeadsOnHopper&goUser=MyUser&goPass=MyPass&responsetype=json&campaign_id=123456"

POST (Form Data):

If you prefer to send the data as form parameters:

curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goCampaigns/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=getLeadsOnHopper" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=Mypass" \
  --data-urlencode "campaign_id=123456" \
  --data-urlencode "responsetype=json"

  Example Response

{
  "result": "success",
  "data": {
    "rows": [
      {
        "lead_id": "10001",
        "last_local_call_time": "2025-06-01 14:23:45",
        "loan_id": "LN123456",
        "phone_number": "5551234567",
        "state": "CA",
        "disposition": "NEW",
        "count": 0,
        "gmt_offset_now": "-8.00",
        "hopper_id": "5001",
        "alt_dial": "MAIN",
        "list_name": "Default Leads List",
        "list_id": "901",
        "priority": 99,
        "source": "WEBFORM",
        "numrows": 2,
        "delete": "<button class=\"btn btn-delete\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>"
      },
      {
        "lead_id": "10002",
        "last_local_call_time": "2025-06-01 13:12:09",
        "loan_id": "LN654321",
        "phone_number": "5559876543",
        "state": "TX",
        "disposition": "CALLBK",
        "count": 1,
        "gmt_offset_now": "-6.00",
        "hopper_id": "5002",
        "alt_dial": "ALT",
        "list_name": "Follow-up List",
        "list_id": "902",
        "priority": 90,
        "source": "IMPORT",
        "numrows": 2,
        "delete": "<button class=\"btn btn-delete\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></button>"
      }
    ],
    "headers": [
      { "title": "Loan ID", "field": "loan_id" },
      { "title": "Phone Number", "field": "phone_number" },
      { "title": "Disposition", "field": "disposition" },
      { "title": "Count", "field": "count" },
      { "title": "Source", "field": "source" },
      { "title": "List Name", "field": "list_name" },
      { "title": "Lead ID", "field": "lead_id" },
      { "title": "Delete", "field": "delete", "formatter": "html" }
    ],
    "html": "<div class=\"toggleTitlesAction tabulator-Y3Yc\" style=\"width: 90%\">...</div>",
    "content": "table"
  }
}

📌 Response Fields

Field NameDescription
lead_idUnique identifier of the lead
last_local_call_timeTimestamp of the last local call to the lead (if any)
loan_idVendor lead code (often a unique external ID like a loan or case ID)
phone_numberLead's phone number
stateUS State (if available) from lead data
dispositionStatus or outcome of the last interaction (e.g., NEW, CALLBK, SALE)
countNumber of times this lead has been called
gmt_offset_nowGMT offset of the lead's time zone
hopper_idInternal hopper ID (queue ID)
alt_dialAlternative dialing method or flag
list_nameName of the list this lead belongs to
list_idID of the list
priorityLead priority in the hopper
sourceSource of the lead (e.g., WEB, IMPORT)
numrowsTotal number of rows returned (same for all rows, used for frontend)
deleteHTML snippet for a delete button (used in frontend UI)