List sales opportunities
Retrieves a paginated grid of sales opportunities with filtering and sorting capabilities. Quick search available on: name, shortName, orgName. Filterable fields: id, name, shortName, type, valueGroup, categoryId, statusId, phaseId, deadline, organizationId, orgName, guestAccess, isFavorite, isArchived, openTasksCount, createdAt, editedAt. Sortable fields: id, name, shortName, type, valueGroup, categoryId, statusId, phaseId, deadline, organizationId, orgName, guestAccess, isFavorite, isArchived, openTasksCount, createdAt, editedAt.
What are Sales Opportunities?
Sales opportunities represent potential projects in the customer lifecycle where a customer has not placed any order yet. They are used to organize leads, track sales stages, manage contacts, and systematically move potential deals forward. In Leadtime, sales opportunities work as projects that are assigned to an external organization (customer). The goal of every opportunity is to create an offer, and if successful, it can turn into an implementation project.
How Sales Opportunities Work:
- Sales opportunities are Single-type projects that have an organizationId (external projects)
- They can be linked to one or more offers or estimates
- They use project phases to track progress through the sales process (e.g., Uncontacted, Research, Contact made, Reminder, Implementation, Won, Finished)
- They support custom fields for storing additional information like probability, source, region, or segment
- They include a journal for documenting activities, feedback, and interactions with potential customers
Automatic Filtering:
This endpoint automatically applies three filters to ensure only relevant sales opportunities are returned:
- Project type: Must be Single (only single projects can be sales opportunities)
- Organization ID: Must not be empty (only external projects linked to organizations)
- Status exclusion: Projects with Done status type are automatically excluded (only active opportunities are shown)
Data Returned:
The response includes project grid items with fields such as:
- Project identification: id, name, shortName, icon
- Project classification: type, valueGroup, categoryId, statusId, phaseId
- Organization information: organizationId, orgName, orgColor
- Project metadata: createdAt, editedAt, isFavorite, isArchived, guestAccess
- Task information: openTasksCount
Access Control:
Users can only see opportunities for projects they have access to based on their project permissions. The endpoint requires the Opportunities.manageSalesOpportunities permission.
/sales/opportunitiesAuthorizationOAuth2 access token · headerrequiredapi:readAuthorizationBearer token (JWT) · headerrequiredpagenumberpageSizenumberviewIdstringquickSearchstringfiltersstringsortstringfieldsToReturnany[]curl -X GET "https://leadtime.app/api/public/sales/opportunities" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/sales/opportunities", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/sales/opportunities",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)