cURL
curl --request GET \
--url https://app.revyops.com/api/public/opportunities/mappings \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.revyops.com/api/public/opportunities/mappings"
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('https://app.revyops.com/api/public/opportunities/mappings', 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://app.revyops.com/api/public/opportunities/mappings",
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 := "https://app.revyops.com/api/public/opportunities/mappings"
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("https://app.revyops.com/api/public/opportunities/mappings")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.revyops.com/api/public/opportunities/mappings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"canonical_options": {
"stage": [
"<string>"
],
"lost_reason": [
"<string>"
]
},
"values": [
{
"origin": "closecrm",
"kind": "stage",
"source_value": "<string>",
"deals": 123,
"canonical_value": "<string>"
}
]
}Opportunities
List Opportunity Mappings
Every open deal stage and lost reason your synced deals carry, how many deals carry each, and the standard value it maps to (null when unmapped). Won and lost deals are always “closed”, so only open stages are listed.
GET
/
public
/
opportunities
/
mappings
cURL
curl --request GET \
--url https://app.revyops.com/api/public/opportunities/mappings \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.revyops.com/api/public/opportunities/mappings"
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('https://app.revyops.com/api/public/opportunities/mappings', 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://app.revyops.com/api/public/opportunities/mappings",
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 := "https://app.revyops.com/api/public/opportunities/mappings"
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("https://app.revyops.com/api/public/opportunities/mappings")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.revyops.com/api/public/opportunities/mappings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"canonical_options": {
"stage": [
"<string>"
],
"lost_reason": [
"<string>"
]
},
"values": [
{
"origin": "closecrm",
"kind": "stage",
"source_value": "<string>",
"deals": 123,
"canonical_value": "<string>"
}
]
}Returns every open deal stage and lost reason your synced Close CRM and HubSpot deals carry, how many deals carry each, and the standard value it maps to.
canonical_value is null for a value nobody has mapped yet. Won and lost deals are always closed, so only open stages are listed. A mapping with deals: 0 is one no deal uses yet.
{
"canonical_options": {
"stage": ["qualification", "discovery", "evaluation", "proposal", "negotiation"],
"lost_reason": ["price", "product_gap", "timing", "competitor", "no_decision", "disqualified", "other"]
},
"values": [
{"origin": "closecrm", "kind": "stage", "source_value": "Qualified", "deals": 63, "canonical_value": "qualification"},
{"origin": "closecrm", "kind": "stage", "source_value": "Proposal Sent", "deals": 62, "canonical_value": null},
{"origin": "closecrm", "kind": "lost_reason", "source_value": "Lost - Price", "deals": 14, "canonical_value": "price"}
]
}
Was this page helpful?

