Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Get sales estimates grid

What are Sales Estimates? Sales Estimates provides a unified overview of all ongoing offers and sales opportunities in Leadtime. This endpoint combines two types of estimates into a single grid view:

  • Project Documents: Detailed estimates linked to larger projects, created through the project planning process with products, modules, and custom items
  • Express Quotations: Quick estimates created directly from tickets for smaller, ad-hoc customer requests

What data is returned: The response includes a paginated grid of estimate items with comprehensive pricing information:

  • Each item represents either a project document estimate or an express quotation
  • Only the latest estimate per project or task is returned (older versions are excluded)
  • Pricing breakdown includes fixed prices, subscription prices, and per-unit prices
  • Aggregated totals across all filtered results are provided at the response level

Pricing components: Each estimate can have three types of pricing:

  • Fixed Price: One-time charges for services or products
  • Subscriptions: Recurring prices (monthly, quarterly, semi-annually, or annually)
  • Per Unit: Prices based on quantity (e.g., price per user or workspace)

The response includes both individual item pricing and aggregated totals (totalPriceFixed, totalPriceSubscriptions, totalPricePerUnit) across all filtered results.

Estimate types:

  • PROJECT_DOCUMENT: Estimates created as part of project planning, typically more detailed and structured
  • EXPRESS_QUOTATION: Quick estimates created from tickets, ideal for small add-on tasks or support services

Estimate statuses:

  • Draft: Estimate is being prepared and has not been sent
  • WaitingForApproval: Estimate is pending internal approval before sending
  • Final: Estimate has been finalized and approved
  • Pending: Express quotation has been sent to customer, awaiting response
  • Accepted: Customer has accepted the estimate
  • Rejected: Customer has rejected the estimate
  • Parked: Estimate has been set aside temporarily

Access restrictions:

  • This endpoint is restricted to employees only. Organization members (external contacts) cannot access it
  • Results are automatically filtered by the user’s project access permissions
  • Only estimates for projects the user has access to are returned

Supported operations:

  • Filter by type, organization, project, task, status, pricing components, creator, and creation date
  • Sort by any field including title, organization, project, status, pricing, and dates
  • Quick search across estimate titles
  • Pagination with configurable page size
  • Field selection to return only specific fields in the response

Use cases:

  • Generate sales pipeline reports showing all active estimates
  • Track revenue potential across different estimate types
  • Monitor estimate status distribution (draft, pending, accepted, etc.)
  • Analyze pricing breakdowns by organization or project
  • Export estimate data for external reporting tools

Retrieves a paginated grid of estimates with filtering and sorting capabilities. Quick search available on: title, displayTitle. Filterable fields: id, type, title, displayTitle, organizationId, projectId, taskId, createdAt, status, priceFixed, priceSubscriptions, pricePerUnit, createdById, offerNumber. Sortable fields: id, type, title, displayTitle, organizationId, organizationName, projectId, projectName, taskId, taskShortNumber, createdAt, status, total, priceFixed, priceSubscriptions, pricePerUnit, createdById, createdByName, offerNumber.

GET/sales/estimates/grid
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
pagenumber

Page number (1-based)

pageSizenumber

Number of items per page

viewIdstring

View identifier for saved grid configurations

quickSearchstring

Quick search text. Searches across: title, displayTitle

filtersstring

JSON string containing filter configuration.

Available Fields:

  • id (string): Estimate ID
  • type (string): Estimate type (PROJECT_DOCUMENT or EXPRESS_QUOTATION)
  • title (string): Estimate title
  • displayTitle (string): Display title (combined title/offerNumber based on documentStyle)
  • organizationId (string): Organization ID
  • projectId (string): Project ID
  • taskId (string): Task ID (only for EXPRESS_QUOTATION)
  • createdAt (date): Creation timestamp
  • status (string): Estimate status (Draft, Final, WaitingForApproval, Pending, etc.)
  • priceFixed (number): Fixed price
  • priceSubscriptions (number): Subscription price
  • pricePerUnit (number): Per-unit price
  • createdById (string): Creator user ID
  • offerNumber (number): Offer number (for PROJECT_DOCUMENT type)

Filter Structure:

[
  {
    "type": "string|number|date|set|boolean|array|task_status|task_type",
    "fieldName": "field_name",
    "value": {
      "comparison": "comparison_type",
      "value": "filter_value"
    }
  }
]

Group Filters (AND/OR Combinations):

[
  {
    "type": "group",
    "fieldName": "group0.18807479823070028",
    "value": {
      "type": "or",
      "filters": [
        {
          "type": "string",
          "fieldName": "fileName",
          "value": {
            "comparison": "contain",
            "value": "aa"
          }
        },
        {
          "type": "number",
          "fieldName": "rowCount",
          "value": {
            "comparison": ">=",
            "value": 33
          }
        }
      ]
    }
  }
]

Available Comparison Operators:

  • id (string): Estimate ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • type (string): Estimate type (PROJECT_DOCUMENT or EXPRESS_QUOTATION) (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • title (string): Estimate title (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • displayTitle (string): Display title (combined title/offerNumber based on documentStyle) (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • organizationId (string): Organization ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • projectId (string): Project ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • taskId (string): Task ID (only for EXPRESS_QUOTATION) (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • createdAt (date): Creation timestamp (date filter). Available comparisons: equal, not_equal, >, <, >=, <=, between, lastMonth, thisMonth, is_empty, is_not_empty
  • status (string): Estimate status (Draft, Final, WaitingForApproval, Pending, etc.) (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • priceFixed (number): Fixed price (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • priceSubscriptions (number): Subscription price (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • pricePerUnit (number): Per-unit price (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty
  • createdById (string): Creator user ID (string filter). Available comparisons: contain, not_contain, equal, starts_with, ends_with, is_empty, is_not_empty
  • offerNumber (number): Offer number (for PROJECT_DOCUMENT type) (number filter). Available comparisons: equal, not_equal, >, <, >=, <=, is_empty, is_not_empty

Note: Use quickSearch parameter for simple text search instead of adding it to filters.

sortstring

JSON array of sort objects.

Sortable Fields:

  • id: Estimate ID
  • type: Estimate type (PROJECT_DOCUMENT or EXPRESS_QUOTATION)
  • title: Estimate title
  • displayTitle: Display title (combined title/offerNumber based on documentStyle)
  • organizationId: Organization ID
  • organizationName: Organization name
  • projectId: Project ID
  • projectName: Project name
  • taskId: Task ID (only for EXPRESS_QUOTATION)
  • taskShortNumber: Task short number (only for EXPRESS_QUOTATION)
  • createdAt: Creation timestamp
  • status: Estimate status (Draft, Final, WaitingForApproval, Pending, etc.)
  • total: Total price (for express quotations)
  • priceFixed: Fixed price
  • priceSubscriptions: Subscription price
  • pricePerUnit: Per-unit price
  • createdById: Creator user ID
  • createdByName: Creator name
  • offerNumber: Offer number (for PROJECT_DOCUMENT type)

Sort Structure:

[
  {
    "field": "field_name",
    "direction": "asc|desc"
  }
]

Default Sort: createdAt (desc)

fieldsToReturnstring[]

Comma-separated list of field names to include in response items. If not provided, all fields are returned.

Available Fields: id, type, title, displayTitle, organizationId, organizationName, projectId, projectName, taskId, taskShortNumber, createdAt, status, total, priceFixed, priceSubscriptions, pricePerUnit, priceSubscriptionsDetail, pricePerUnitDetail, createdById, createdByName, offerNumber, formattedOfferNumber

Responses
200

Estimates grid with pricing totals (totalPriceFixed, totalPriceSubscriptions, totalPricePerUnit)

itemsEstimateGridItemResponseDto[]required

Array of estimate items matching the query parameters. Each item represents either a project document estimate or an express quotation.

Show properties
Array of EstimateGridItemResponseDto
createdAtstringrequired

ISO 8601 timestamp indicating when the estimate was created. Format: YYYY-MM-DDTHH:mm:ss.sssZ

createdByIdstring

Unique identifier of the user who created this estimate. UUID format.

createdByNamestring

Full name of the user who created this estimate. Provided for convenience to avoid additional user lookups.

idstringrequired

Unique identifier for the estimate. UUID format.

organizationIdstringrequired

Unique identifier of the organization (customer) this estimate belongs to. UUID format.

organizationNamestring

Display name of the organization. Provided for convenience to avoid additional lookups.

priceFixednumber

Fixed price component representing one-time charges for services or products. This is a single payment amount, not recurring.

pricePerUnitnumber

Per-unit price component representing charges based on quantity (e.g., price per user license, price per workspace, price per API call). The total of all per-unit items in the estimate.

pricePerUnitDetailobject

Detailed breakdown of per-unit prices by product or service name. Key-value pairs where keys are product/service names and values are their per-unit prices. Useful for understanding which items contribute to the total per-unit price. Null if no per-unit items exist.

priceSubscriptionsnumber

Subscription price component representing recurring charges (monthly, quarterly, semi-annually, or annually). The total of all subscription items in the estimate.

priceSubscriptionsDetailobject

Detailed breakdown of subscription prices by product or service name. Key-value pairs where keys are product/service names and values are their subscription prices. Useful for understanding which items contribute to the total subscription price. Null if no subscription items exist.

projectIdstringrequired

Unique identifier of the project this estimate is linked to. UUID format. Required for both estimate types.

projectNamestring

Display name of the project. Provided for convenience to avoid additional lookups.

statusstringrequired

Current status of the estimate. Indicates where the estimate is in the sales process: Draft (being prepared), WaitingForApproval (pending internal approval), Final (approved), Pending (sent to customer), Accepted (customer accepted), Rejected (customer rejected), or Parked (temporarily set aside).

Allowed:DraftFinalWaitingForApprovalPendingAcceptedRejectedParked
taskIdstring

Unique identifier of the task (ticket) this express quotation is linked to. Only present for EXPRESS_QUOTATION type estimates. UUID format.

taskShortNumbernumber

Short numeric identifier of the task. Only present for EXPRESS_QUOTATION type estimates. Used for display purposes (e.g., "Task #42").

titlestringrequired

Human-readable title of the estimate. Used for quick search and display purposes.

totalnumber

Total price for express quotations. This is the sum of all price components (fixed + subscriptions + per-unit). Only present for EXPRESS_QUOTATION type estimates.

typestringrequired

Type of estimate. PROJECT_DOCUMENT for detailed project estimates, EXPRESS_QUOTATION for quick ticket-based estimates.

Allowed:PROJECT_DOCUMENTEXPRESS_QUOTATION
pagenumberrequired

Current page number (1-based). Used for pagination navigation.

pageSizenumberrequired

Number of items returned per page. Determines how many estimate items are included in the items array.

totalnumberrequired

Total number of estimate items matching the query filters across all pages. Use this value to calculate total pages: Math.ceil(total / pageSize).

totalPriceFixednumberrequired

Aggregated sum of all fixed price components across all filtered estimate items. This represents the total one-time revenue potential from fixed-price items. Calculated by summing priceFixed from all items in the filtered result set.

totalPricePerUnitnumberrequired

Aggregated sum of all per-unit price components across all filtered estimate items. This represents the total revenue potential from per-unit items. Calculated by summing pricePerUnit from all items in the filtered result set.

totalPriceSubscriptionsnumberrequired

Aggregated sum of all subscription price components across all filtered estimate items. This represents the total recurring revenue potential from subscription items. Calculated by summing priceSubscriptions from all items in the filtered result set.

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/sales/estimates/grid" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "items": [
    {
      "createdAt": "2024-11-06T12:00:00.000Z",
      "createdById": "123e4567-e89b-12d3-a456-426614174004",
      "createdByName": "John Doe",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "organizationId": "123e4567-e89b-12d3-a456-426614174001",
      "organizationName": "Acme Corp",
      "priceFixed": 3000,
      "pricePerUnit": 100,
      "pricePerUnitDetail": {
        "api-calls": 50,
        "user-licenses": 50
      },
      "priceSubscriptions": 500,
      "priceSubscriptionsDetail": {
        "hosting": 200,
        "support": 300
      },
      "projectId": "123e4567-e89b-12d3-a456-426614174002",
      "projectName": "Website Redesign",
      "status": "Draft",
      "taskId": "123e4567-e89b-12d3-a456-426614174003",
      "taskShortNumber": 42,
      "title": "Website Redesign Estimate",
      "total": 5000,
      "type": "PROJECT_DOCUMENT"
    }
  ],
  "page": 1,
  "pageSize": 10,
  "total": 150,
  "totalPriceFixed": 125000,
  "totalPricePerUnit": 15000,
  "totalPriceSubscriptions": 45000
}