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
Request
- Base URLhttp://api-gateway-eu.phorest.com/third-party-api-server
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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 200
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"
}
]
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.