cURL
curl --request POST \
--url https://app.revyops.com/api/public/opportunities/mappings \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"mappings": {}
}'import requests
url = "https://app.revyops.com/api/public/opportunities/mappings"
payload = { "mappings": {} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({mappings: {}})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mappings' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.revyops.com/api/public/opportunities/mappings"
payload := strings.NewReader("{\n \"mappings\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.revyops.com/api/public/opportunities/mappings")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mappings\": {}\n}")
.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::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mappings\": {}\n}"
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>"
}
],
"deals_updated": 123
}Opportunities
Save Opportunity Mappings
Maps CRM stages or lost reasons onto the standard values for one CRM. Only the values you send change; null removes a mapping. Stored deals are updated before the call returns.
POST
/
public
/
opportunities
/
mappings
cURL
curl --request POST \
--url https://app.revyops.com/api/public/opportunities/mappings \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"mappings": {}
}'import requests
url = "https://app.revyops.com/api/public/opportunities/mappings"
payload = { "mappings": {} }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({mappings: {}})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mappings' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.revyops.com/api/public/opportunities/mappings"
payload := strings.NewReader("{\n \"mappings\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.revyops.com/api/public/opportunities/mappings")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mappings\": {}\n}")
.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::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mappings\": {}\n}"
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>"
}
],
"deals_updated": 123
}Maps one CRM’s deal stages or lost reasons onto the standard values that fill Normalized Stage and Lost Reason Category. Take the source values from List Opportunity Mappings; they match after trimming spaces. Only the values you send change, and
null removes a mapping. Stored deals are updated before the call returns, and the response is the same listing for that CRM plus deals_updated.
{
"kind": "stage",
"origin": "closecrm",
"mappings": {"Qualified": "qualification", "Proposal Sent": "proposal", "Demo Done": null}
}
stage takes qualification, discovery, evaluation, proposal or negotiation. Won and lost deals are closed automatically, so closed is not accepted here. lost_reason takes price, product_gap, timing, competitor, no_decision, disqualified or other.Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
stage- stagelost_reason- lost_reason
Available options:
stage, lost_reason closecrm- closecrmhubspot- hubspot
Available options:
closecrm, hubspot CRM value to standard value, e.g. {"Proposal Sent": "proposal"}. null removes a mapping.
Show child attributes
Show child attributes
Was this page helpful?

