Deals
Get historical analogues of a deal
Returns other deals whose recorded state is similar to the latest state snapshot of this deal. state tells you if results are ready. If state is not ready, analogues is empty. Rate limit: 300 requests per minute for each workspace.
GET
/
deal
/
{deal_id}
/
historical-analogues
Get historical analogues of a deal
curl --request GET \
--url https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues', 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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues",
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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues"
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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues")
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{
"state": "ready",
"target_deal": {},
"target_snapshot_id": "<string>",
"target_observed_at": "2023-11-07T05:31:56Z",
"analogues": [
{}
]
}Authorizations
A Doris API key that starts with sk-live-. A workspace admin creates keys in Settings > Workspace > Developer. A key works only on /api/v1/ontology/ routes.
Path Parameters
The deal ID.
Query Parameters
The number of analogues to return.
Required range:
1 <= x <= 25Response
200 - application/json
The analogues and their state.
Get historical analogues of a deal
curl --request GET \
--url https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues', 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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues",
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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues"
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://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.meetdoris.com/api/v1/ontology/deal/{deal_id}/historical-analogues")
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{
"state": "ready",
"target_deal": {},
"target_snapshot_id": "<string>",
"target_observed_at": "2023-11-07T05:31:56Z",
"analogues": [
{}
]
}