curl --request GET \
--url https://api.decodahealth.com/opportunity/list \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/opportunity/list"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/opportunity/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/opportunity/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/opportunity/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodahealth.com/opportunity/list")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/opportunity/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"firstName": "<string>",
"pipelineId": "<string>",
"patientId": "<string>",
"stageEnteredAt": "2023-11-07T05:31:56Z",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"sourceDetail": "<string>",
"campaignId": "<string>",
"locationId": "<string>",
"currentStageId": "<string>",
"assignedProviderId": "<string>",
"status": "OPEN",
"wonAt": "2023-11-07T05:31:56Z",
"lostAt": "2023-11-07T05:31:56Z",
"lostReasonId": "<string>",
"lostReasonLabel": "<string>",
"convertedDate": "2023-11-07T05:31:56Z",
"lostReason": "<string>",
"originatingTouchpointId": "<string>",
"estValueCents": 123,
"contactAttempts": 0,
"firstResponseDueAt": "2023-11-07T05:31:56Z",
"firstResponseAt": "2023-11-07T05:31:56Z",
"lastEngagedAt": "2023-11-07T05:31:56Z",
"automationsPaused": false,
"stale": false,
"isExistingPatient": false,
"latestBooking": {
"conversionId": "<string>",
"eventId": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"appointmentStart": "2023-11-07T05:31:56Z",
"appointmentEnd": "2023-11-07T05:31:56Z",
"isLinked": true,
"locationName": "<string>",
"isArchived": false
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"currentStage": {
"id": "<string>",
"pipelineId": "<string>",
"name": "<string>",
"stageNumber": 123,
"color": "<string>",
"kind": "WORKING",
"staleAfterDays": 123,
"isTerminalWon": false,
"isTerminalLost": false,
"autoConvert": false,
"actions": [
{
"id": "<string>",
"stageId": "<string>",
"actionOrder": 123,
"delayMinutes": 0,
"config": {},
"isActive": true
}
]
},
"assignedProvider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
},
"campaign": {
"id": "<string>",
"name": "<string>",
"locationId": "<string>",
"description": "<string>",
"platformId": "<string>",
"platformAssetId": "<string>",
"externalCampaignId": "<string>",
"externalResourceName": "<string>",
"externalName": "<string>",
"externalStatus": "<string>",
"externalCurrency": "<string>",
"externalDailyBudgetCents": 123,
"externalLifetimeBudgetCents": 123,
"externalLastSeenAt": "2023-11-07T05:31:56Z",
"externalLastSyncedAt": "2023-11-07T05:31:56Z",
"externalStaleAt": "2023-11-07T05:31:56Z",
"externalSyncError": "<string>",
"isActive": true,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"budgetCents": 123,
"pipelineId": "<string>",
"webhook": {
"webhookKey": "<string>",
"webhookUrl": "<string>",
"redirectUrl": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"opportunityCount": 0,
"convertedCount": 0
}
}
],
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}List Opportunities
List opportunities matching the given filters, paginated.
curl --request GET \
--url https://api.decodahealth.com/opportunity/list \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'import requests
url = "https://api.decodahealth.com/opportunity/list"
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>'}};
fetch('https://api.decodahealth.com/opportunity/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decodahealth.com/opportunity/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"TENANT: <tenant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decodahealth.com/opportunity/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decodahealth.com/opportunity/list")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/opportunity/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"firstName": "<string>",
"pipelineId": "<string>",
"patientId": "<string>",
"stageEnteredAt": "2023-11-07T05:31:56Z",
"lastName": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"sourceDetail": "<string>",
"campaignId": "<string>",
"locationId": "<string>",
"currentStageId": "<string>",
"assignedProviderId": "<string>",
"status": "OPEN",
"wonAt": "2023-11-07T05:31:56Z",
"lostAt": "2023-11-07T05:31:56Z",
"lostReasonId": "<string>",
"lostReasonLabel": "<string>",
"convertedDate": "2023-11-07T05:31:56Z",
"lostReason": "<string>",
"originatingTouchpointId": "<string>",
"estValueCents": 123,
"contactAttempts": 0,
"firstResponseDueAt": "2023-11-07T05:31:56Z",
"firstResponseAt": "2023-11-07T05:31:56Z",
"lastEngagedAt": "2023-11-07T05:31:56Z",
"automationsPaused": false,
"stale": false,
"isExistingPatient": false,
"latestBooking": {
"conversionId": "<string>",
"eventId": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"appointmentStart": "2023-11-07T05:31:56Z",
"appointmentEnd": "2023-11-07T05:31:56Z",
"isLinked": true,
"locationName": "<string>",
"isArchived": false
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"currentStage": {
"id": "<string>",
"pipelineId": "<string>",
"name": "<string>",
"stageNumber": 123,
"color": "<string>",
"kind": "WORKING",
"staleAfterDays": 123,
"isTerminalWon": false,
"isTerminalLost": false,
"autoConvert": false,
"actions": [
{
"id": "<string>",
"stageId": "<string>",
"actionOrder": 123,
"delayMinutes": 0,
"config": {},
"isActive": true
}
]
},
"assignedProvider": {
"id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"createdDate": "2023-11-07T05:31:56Z"
},
"campaign": {
"id": "<string>",
"name": "<string>",
"locationId": "<string>",
"description": "<string>",
"platformId": "<string>",
"platformAssetId": "<string>",
"externalCampaignId": "<string>",
"externalResourceName": "<string>",
"externalName": "<string>",
"externalStatus": "<string>",
"externalCurrency": "<string>",
"externalDailyBudgetCents": 123,
"externalLifetimeBudgetCents": 123,
"externalLastSeenAt": "2023-11-07T05:31:56Z",
"externalLastSyncedAt": "2023-11-07T05:31:56Z",
"externalStaleAt": "2023-11-07T05:31:56Z",
"externalSyncError": "<string>",
"isActive": true,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"budgetCents": 123,
"pipelineId": "<string>",
"webhook": {
"webhookKey": "<string>",
"webhookUrl": "<string>",
"redirectUrl": "<string>"
},
"createdDate": "2023-11-07T05:31:56Z",
"updatedDate": "2023-11-07T05:31:56Z",
"opportunityCount": 0,
"convertedCount": 0
}
}
],
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Query Parameters
x >= 1x >= 1asc, desc Filter by one or more pipelines
Filter by one or more current stages
Filter by one or more campaigns
Filter by one or more assigned providers
Filter by one or more opportunity statuses
Terminal-capable status for a pursuit episode (separate from stage).
Schema column lands with the opportunity rebuild; enum ships early so intake/services can type against it without a second enum PR.
OPEN, WON, LOST, DISQUALIFIED Filter by one or more originating source channels
How a marketing interaction was observed.
Reporting dimension #1 on the touchpoint ledger. Add values only with a writer in the same PR (TypedEnum decodes unmapped strings to None).
META_LEAD_FORM, GOOGLE_LEAD_FORM, PAID_CLICK, WEB_ORGANIC, WEB_FORM, WEB_CHAT, PHONE_CALL, SMS_INBOUND, EMAIL_INBOUND, DM_INSTAGRAM, DM_FACEBOOK, REFERRAL, WALK_IN, QR, IMPORT, OTHER Search in name, email, phone
Filter converted/unconverted opportunities
