curl --request GET \
--url https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}', 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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"account_name": "<string>",
"amount": 123,
"close_date": "<string>",
"created_at": "<string>",
"crm_opportunity_id": "<string>",
"description": "<string>",
"fields": {},
"is_closed": false,
"is_won": false,
"name": "<string>",
"owner": "<string>",
"source": "<string>",
"stage": "<string>",
"type": "<string>"
}Get one opportunity
Returns one opportunity by id. Standard fields sit at the top level and custom fields under fields, keyed as GET /v1/fields?object=opportunity lists them. account and owner hold the id of one record (an account, a user); account_name is the account’s name. The account may since have been deleted: the opportunity still names it. is_closed and is_won are read-only (a synced opportunity carries your CRM’s flags, and an edit to the stage in Statisfy sets them from that stage); one that is not set reads as false. source is where the opportunity came from: statisfy, your CRM’s name, crm for a synced one with no name recorded, or system for a renewal Statisfy generated. Archived opportunities are never returned.
curl --request GET \
--url https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}', 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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.statisfy.com/v1/objects/opportunity/records/{opportunity_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/opportunity/records/{opportunity_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"account": "<string>",
"account_name": "<string>",
"amount": 123,
"close_date": "<string>",
"created_at": "<string>",
"crm_opportunity_id": "<string>",
"description": "<string>",
"fields": {},
"is_closed": false,
"is_won": false,
"name": "<string>",
"owner": "<string>",
"source": "<string>",
"stage": "<string>",
"type": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Query Parameters
Response
Successful Response
Was this page helpful?