v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Lead

List leads

Get a list of leads for the specified business id and branch id. List can be filtered by lead name, lead status, contactableByEmail flag and contactableByMobile flag with possibility to include message history for each lead

get/api/business/{businessId}/branch/{branchId}/leads

Path parameters

businessIdstring required
branchIdstring required

Query parameters

namestring

lead first name and last name to filter by

statusstring[]

lead status to filter by, multiple statuses can be provided

contactableByEmailboolean

include only leads that are/are not contactable by email in the list

contactableByMobileboolean

include only leads that are/are not contactable by mobile in the list

fetchMessageHistoryboolean

include message history for each lead

number of lead records to return, max is 100

page number, default is 0 and is optional

Response

Leads listed

Example response

{
  "_embedded": {
    "leads": [
      {
        "leadId": 12345,
        "businessId": "business123",
        "branchId": "branch456",
        "mobile": "1234567890",
        "email": "john.doe@example.com",
        "firstName": "John",
        "lastName": "Doe",
        "contactableByEmail": true,
        "contactableByMobile": true,
        "source": "THIRD_PARTY_API",
        "lastActivityDate": "2024-01-15T10:30:00Z",
        "clientId": "client789",
        "updatedBy": "user123",
        "adCampaignName": "Summer Sale Campaign",
        "messageHistory": [
          {
            "type": "EMAIL",
            "sendDate": "2024-01-15T10:30:00Z",
            "channel": "email"
          }
        ],
        "note": "Interested in hair styling services"
      }
    ]
  }
}