Get sales funnel counts
curl --request GET \
--url http://localhost:4000/api/v1/analytics/funnel \
--header 'X-API-Key: <api-key>'import requests
url = "http://localhost:4000/api/v1/analytics/funnel"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('http://localhost:4000/api/v1/analytics/funnel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/api/v1/analytics/funnel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "http://localhost:4000/api/v1/analytics/funnel"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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("http://localhost:4000/api/v1/analytics/funnel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/api/v1/analytics/funnel")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"stages": {
"New": {
"count": 140,
"percentage": 100,
"conversionRate": 100
},
"Qualified": {
"count": 72,
"percentage": 51.4,
"conversionRate": 51.4
},
"Closed Won": {
"count": 19,
"percentage": 13.6,
"conversionRate": 26.4
}
},
"dropOffPoints": [
{
"fromStage": "New",
"toStage": "Qualified",
"dropOffRate": 48.6,
"count": 68
}
],
"pipelineStages": [
{
"id": "st_1",
"name": "New",
"count": 140,
"percentage": 100,
"color": "#64748B"
}
]
}
}Get sales funnel counts
GET
/
api
/
v1
/
analytics
/
funnel
Get sales funnel counts
curl --request GET \
--url http://localhost:4000/api/v1/analytics/funnel \
--header 'X-API-Key: <api-key>'import requests
url = "http://localhost:4000/api/v1/analytics/funnel"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('http://localhost:4000/api/v1/analytics/funnel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/api/v1/analytics/funnel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "http://localhost:4000/api/v1/analytics/funnel"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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("http://localhost:4000/api/v1/analytics/funnel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/api/v1/analytics/funnel")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"stages": {
"New": {
"count": 140,
"percentage": 100,
"conversionRate": 100
},
"Qualified": {
"count": 72,
"percentage": 51.4,
"conversionRate": 51.4
},
"Closed Won": {
"count": 19,
"percentage": 13.6,
"conversionRate": 26.4
}
},
"dropOffPoints": [
{
"fromStage": "New",
"toStage": "Qualified",
"dropOffRate": 48.6,
"count": 68
}
],
"pipelineStages": [
{
"id": "st_1",
"name": "New",
"count": 140,
"percentage": 100,
"color": "#64748B"
}
]
}
}Authorizations
Query Parameters
Response
200 - application/json
Sales funnel conversion breakdown
The response is of type object.
