Skip to main content

Get Current Leads on Hopper by Campaign

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

Parameter Value Description
goAction getLeadsOnHopper Action to get the leads for a specific campaign.
goUser MyUser API authorized user.
goPass MyPass Password for the API authorized user.
campaign_id ID-Campaign (number) Campaign identifier to search hopper.
responsetype json/xml Format 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 Name Description
lead_id Unique identifier of the lead
last_local_call_time Timestamp of the last local call to the lead (if any)
loan_id Vendor lead code (often a unique external ID like a loan or case ID)
phone_number Lead's phone number
state US State (if available) from lead data
disposition Status or outcome of the last interaction (e.g., NEW, CALLBK, SALE)
count Number of times this lead has been called
gmt_offset_now GMT offset of the lead's time zone
hopper_id Internal hopper ID (queue ID)
alt_dial Alternative dialing method or flag
list_name Name of the list this lead belongs to
list_id ID of the list
priority Lead priority in the hopper
source Source of the lead (e.g., WEB, IMPORT)
numrows Total number of rows returned (same for all rows, used for frontend)
delete HTML snippet for a delete button (used in frontend UI)