Skip to main content
GET
/
deals
curl "https://app.usehindsight.com/api/v1/deals?page_size=20&sort=created_at&sort_order=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "id": "deal_123",
    "name": "Acme Corp - Enterprise License",
    "amount": 50000,
    "status_id": "negotiation",
    "previous_status_id": "qualification",
    "proposal_due": "2026-03-15",
    "created_at": "2023-11-07T05:31:56Z",
    "owner_id": "<string>",
    "salesforce_id": "<string>",
    "hubspot_id": "<string>",
    "deal_analyzed": true,
    "analysis_verified": true,
    "type": "New Business",
    "region": "<string>",
    "deal_competitor_associations": [
      {
        "competitor_id": "<string>",
        "is_primary": true,
        "is_incumbent": true
      }
    ],
    "drivers": [
      {
        "reason_id": "<string>",
        "positive": true,
        "summary": "<string>"
      }
    ],
    "wl_product_fit_score": 123,
    "wl_sales_execution_score": 123,
    "wl_relationship_score": 123
  }
]
Retrieve deals with flexible filtering, sorting, and pagination. Returns deal objects with all their properties and relationships.
GET https://app.usehindsight.com/api/v1/deals
Authorization: Bearer YOUR_API_KEY

Query Parameters:
  # Pagination
  page_size: number (default: 50, max: 100)
  page_index: number (default: 0)
  count: boolean (return only count, not data)
  
  # Sorting
  sort: string (column name to sort by)
  sort_order: "asc" | "desc" (default: "desc")
  
  # Column selection
  columns: string (comma-separated column names, default: "*")
  
  # Search
  searchQuery: string (fuzzy search across deal names)
  
  # Filters (same as bulk export)
  owner_ids: string (JSON array of owner IDs)
  owner_filter_type: "is any of" | "is not"
  status: string (JSON array of deal stages)
  status_filter_type: "is any of" | "is not"
  close_date: string (JSON object: {"from": "2026-01-01", "to": "2026-03-31"})
  amount: string (JSON object: {"min": 10000, "max": 100000})
  competitor: string (JSON array of competitor IDs)
  competitor_filter_type: "is any of" | "is not"
  deal_type: string (JSON array)
  deal_type_filter_type: "is any of" | "is not"
  region: string (JSON array)
  region_filter_type: "is any of" | "is not"
  industry: string (JSON array)
  industry_filter_type: "is any of" | "is not"
  product_labels: string (JSON array of product IDs)
  product_filter_type: "is any of" | "is not" | "include all of"
  deal_analyzed: string (JSON array: ["true"] or ["false"])
  analysis_verified: string (JSON array: ["true"] or ["false"])
  # ... and more (see full filter list below)

200 Response:
[
  {
    "id": "deal_123",
    "name": "Acme Corp - Enterprise License",
    "amount": 50000,
    "status_id": "negotiation",
    "previous_status_id": "qualification",
    "proposal_due": "2026-03-15",
    "created_at": "2026-01-10T12:00:00Z",
    "owner_id": "user_abc",
    "salesforce_id": "006xxxxxxxxxxxx",
    "hubspot_id": "789123456",
    "deal_analyzed": true,
    "analysis_verified": true,
    "type": "New Business",
    "region": "North America",
    "deal_competitor_associations": [
      {
        "competitor_id": "comp_123",
        "is_primary": true,
        "is_incumbent": false
      }
    ],
    "drivers": [
      {
        "reason_id": "reason_456",
        "positive": true,
        "summary": "Strong product fit"
      }
    ],
    "wl_product_fit_score": 4.2,
    "wl_sales_execution_score": 3.8,
    "wl_relationship_score": 4.5,
    // ... additional fields based on columns parameter
  }
]

Rate limits: 60 req/min (Essentials), 300 req/min (Growth), 1000 req/min (Enterprise)

Overview

Use this endpoint to programmatically access your deal data with real-time filtering and pagination. Unlike bulk export which generates a CSV file, this endpoint returns JSON objects immediately and is ideal for:
  • Building custom dashboards and reports
  • Syncing deal data to external systems
  • Real-time data access for integrations
  • Paginating through large datasets
For large datasets or CSV format, use the Bulk Export Deals endpoint instead.

Pagination

ParameterTypeDescriptionDefault
page_sizenumberNumber of deals to return per page50
page_indexnumberZero-based page index0
countbooleanIf true, returns only the total countfalse
Example:
GET /deals?page_size=20&page_index=0  # First 20 deals
GET /deals?page_size=20&page_index=1  # Next 20 deals
GET /deals?count=true                  # Get total deal count

Column Selection

ParameterTypeDescription
columnsstringComma-separated column names to return. Use * for all columns. See Available Columns for the full list.
Limit returned data to only the fields you need to reduce response size and improve performance. Example:
GET /deals?columns=name,amount,deal_status,proposal_due,owner_id
GET /deals?columns=*  # All columns (default)
For a complete list of available columns (standard and dynamic), see the Available Columns section in the Bulk Export Deals documentation.
ParameterTypeDescription
searchQuerystringFuzzy search across deal names
Example:
GET /deals?searchQuery=acme

Filters

All filters from the bulk export endpoint are supported. Filters are passed as query parameters with JSON-encoded values for arrays and objects.

Deal Identification

FilterTypeDescriptionExample
idsstringJSON array of specific deal IDs["deal_123","deal_456"]
owner_idsstringJSON array of owner IDs["user_abc"]
owner_filter_typestringFilter type for ownersis any of
collaboratorsstringJSON array of collaborator IDs["user_def"]
collaborator_filter_typestringFilter type for collaboratorsis any of

Deal Attributes

FilterTypeDescriptionExample
statusstringJSON array of deal stages["Closed Won","Closed Lost"]
status_filter_typestringFilter typeis any of
deal_typestringJSON array of deal types["New Business","Expansion"]
deal_type_filter_typestringFilter typeis any of
regionstringJSON array of regions["North America","EMEA"]
region_filter_typestringFilter typeis any of
industrystringJSON array of industries["Technology","Healthcare"]
industry_filter_typestringFilter typeis any of
product_labelsstringJSON array of product IDs["prod_123"]
product_filter_typestringFilter typeis any of | include all of

Date & Amount

FilterTypeDescriptionExample
close_datestringJSON object with date range{"from":"2026-01-01","to":"2026-03-31"}
amountstringJSON object with min/max{"min":10000,"max":100000}

Competitive Intelligence

FilterTypeDescriptionExample
competitorstringJSON array of competitor IDs["comp_123"]
competitor_filter_typestringFilter typeis any of
any_competitorstringJSON array: ["true"] or ["false"]["true"]

Analysis

FilterTypeDescriptionExample
deal_analyzedstringJSON array: ["true"] or ["false"]["true"]
analysis_verifiedstringJSON array: ["true"] or ["false"]["true"]

Win-Loss Scores

Filters for deal analysis scores (range queries):
FilterFormatExample
wl_product_fit_score{"min": number, "max": number}{"min":3,"max":5}
wl_sales_execution_score{"min": number, "max": number}{"min":3,"max":5}
wl_relationship_score{"min": number, "max": number}{"min":3,"max":5}
wl_price_sensitivity_score{"min": number, "max": number}{"min":1,"max":3}
wl_competitive_intensity_score{"min": number, "max": number}{"min":3,"max":5}
wl_customer_fit_score{"min": number, "max": number}{"min":3,"max":5}
wl_messaging_fit_score{"min": number, "max": number}{"min":3,"max":5}
wl_messaging_accuracy_score{"min": number, "max": number}{"min":3,"max":5}

CRM Filters (Advanced)

FilterTypeDescriptionExample
salesforce_filtersstringJSON array of Salesforce filter objectsSee CRM Filters
hubspot_filtersstringJSON array of HubSpot filter objectsSee CRM Filters

Segments

FilterTypeDescriptionExample
segmentstringJSON array of segment IDs["seg_123","seg_456"]
segment_filter_typestringis any of | include all ofis any of

Sorting

ParameterTypeDescriptionDefault
sortstringColumn name to sort bycreated_at
sort_orderstringasc or descdesc
Available sort columns:
  • created_at - Creation date
  • proposal_due - Expected/actual close date
  • amount - Deal value
  • name - Deal name
  • wl_product_fit_score - Product fit score
  • wl_sales_execution_score - Sales execution score
  • wl_relationship_score - Relationship score
  • wl_price_sensitivity_score - Price sensitivity score
  • wl_competitive_intensity_score - Competitive intensity score
  • wl_customer_fit_score - Customer fit score
  • wl_messaging_fit_score - Messaging fit score
  • wl_messaging_accuracy_score - Messaging accuracy score
Example:
GET /deals?sort=proposal_due&sort_order=asc
GET /deals?sort=amount&sort_order=desc

Response Format

Standard Response

Returns an array of deal objects with all requested fields:
[
  {
    "id": "deal_123",
    "name": "Acme Corp - Enterprise License",
    "amount": 50000,
    "status_id": "negotiation",
    "previous_status_id": "qualification",
    "proposal_due": "2026-03-15",
    "created_at": "2026-01-10T12:00:00Z",
    "owner_id": "user_abc",
    "salesforce_id": "006xxxxxxxxxxxx",
    "hubspot_id": "789123456",
    "deal_analyzed": true,
    "analysis_verified": true,
    "type": "New Business",
    "region": "North America",
    "deal_competitor_associations": [
      {
        "competitor_id": "comp_123",
        "is_primary": true,
        "is_incumbent": false,
        "positioning_summary": "Main competitor evaluation"
      }
    ],
    "drivers": [
      {
        "reason_id": "reason_456",
        "positive": false,
        "summary": "Price too high compared to competitor"
      }
    ],
    "wl_product_fit_score": 4.2,
    "wl_sales_execution_score": 3.8,
    "wl_relationship_score": 4.5
  }
]

Count Response

When count=true, returns only the total count:
142

CRM Filters

For advanced filtering using CRM-specific properties:
GET /deals?salesforce_filters=[{"property":"Account.Industry","operator":"is","value":"Technology"}]
Salesforce filter object structure:
{
  "property": "Account.Industry",
  "operator": "is",
  "value": "Technology"
}
Supported operators:
  • is, is not
  • is greater than, is less than
  • is greater than or equal to, is less than or equal to
  • is before, is after (for dates)
  • contains, does not contain (for text)

Rate Limits

PlanRequests per Minute
Essentials60
Growth300
Enterprise1,000

Examples

curl "https://app.usehindsight.com/api/v1/deals?page_size=20&sort=created_at&sort_order=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"

Best Practices

  1. Use Pagination: Always paginate through large datasets rather than requesting all at once
  2. Select Columns: Use the columns parameter to only fetch fields you need
  3. Cache Counts: If you need counts frequently, cache them with appropriate TTL
  4. Filter Server-Side: Apply filters in the API request rather than fetching all data and filtering client-side
  5. Handle Rate Limits: Implement exponential backoff when you receive 429 responses
  6. Use Bulk Export for Large Datasets: If you need to analyze thousands of deals, use the bulk export endpoint instead

Comparison: Get Deals vs Bulk Export

FeatureGET /dealsPOST /deals/export
Response FormatJSONCSV
Response TimeImmediate2-3 minutes
Use CaseReal-time access, integrationsReports, analysis, backups
PaginationBuilt-inN/A (single file)
Max RecordsUnlimited (paginated)Unlimited
Rate Limits60-1000 req/min5-100 exports/hour
Data FreshnessReal-timeSnapshot at export time

Error Responses

Status CodeDescription
400Invalid request (e.g., invalid filter format, invalid column name)
401Invalid or missing API key
403Insufficient permissions
429Rate limit exceeded
500Internal server error
Example error response:
{
  "message": "Invalid filter format: close_date must be a valid JSON object"
}

Authorizations

Authorization
string
header
required

API key from Hindsight dashboard

Query Parameters

page_size
integer
default:50

Number of deals per page

Required range: x <= 100
page_index
integer
default:0

Zero-based page index

count
boolean

If true, returns only the total count

sort
enum<string>

Column to sort by

Available options:
created_at,
updated_at,
close_date,
amount,
name
sort_order
enum<string>
default:desc

Sort direction

Available options:
asc,
desc
columns
string

Comma-separated list of columns to return

searchQuery
string

Fuzzy search across deal names

status
string

JSON array of deal stages

owner_ids
string

JSON array of owner IDs

close_date
string

JSON object: {"from": "2026-01-01", "to": "2026-03-31"}

amount
string

JSON object: {"min": 10000, "max": 100000}

Response

Successful response

id
string

Hindsight deal ID

Example:

"deal_123"

name
string

Deal name

Example:

"Acme Corp - Enterprise License"

amount
number

Deal value

Example:

50000

status_id
string

Current deal stage ID

Example:

"negotiation"

previous_status_id
string | null

Previous deal stage ID

Example:

"qualification"

proposal_due
string<date>

Expected or actual close date

Example:

"2026-03-15"

created_at
string<date-time>

Deal creation timestamp

owner_id
string

Deal owner ID

salesforce_id
string | null

Salesforce Opportunity ID

hubspot_id
string | null

HubSpot Deal ID

deal_analyzed
boolean

Whether deal has been analyzed

analysis_verified
boolean

Whether analysis has been verified

type
string | null

Type of deal

Example:

"New Business"

region
string | null

Geographic region

deal_competitor_associations
object[]

Array of competitor associations

drivers
object[]

Array of deal drivers/reasons

wl_product_fit_score
number | null

Product fit score (1-5)

wl_sales_execution_score
number | null

Sales execution score (1-5)

wl_relationship_score
number | null

Relationship score (1-5)