Skip to main content
GET
/
v1
/
deals
/
{id}
Get deal by ID
curl --request GET \
  --url https://api.stardex.ai/v1/deals/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.stardex.ai/v1/deals/{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.stardex.ai/v1/deals/{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.stardex.ai/v1/deals/{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.stardex.ai/v1/deals/{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.stardex.ai/v1/deals/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.stardex.ai/v1/deals/{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
{
  "success": true,
  "data": {
    "id": "aaa11111-bbbb-cccc-dddd-eeeeeeee1111",
    "name": "Acme Corp Staffing Agreement",
    "amount": 150000,
    "currency_code": "USD",
    "compensation": 750000,
    "compensation_currency_code": "USD",
    "pricing_rate": 20,
    "win_probability": 75,
    "description": "Annual staffing contract for engineering positions.",
    "closed_date": "2024-06-30T00:00:00Z",
    "referred_by": "fff66666-0000-1111-2222-333333336666",
    "job_ids": [
      "eee55555-ffff-0000-1111-222222225555"
    ],
    "client_id": "bbb22222-cccc-dddd-eeee-ffffffff2222",
    "client_name": "Acme Corp",
    "deal_status": {
      "id": "ccc33333-dddd-eeee-ffff-000000003333",
      "name": "Proposal Sent"
    },
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-02-01T12:00:00Z",
    "owners": [
      {
        "id": "ddd44444-eeee-ffff-0000-111111114444",
        "name": "Jane Smith"
      }
    ],
    "custom_fields": [
      {
        "attribute_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
        "attribute_name": "Deal Priority",
        "data_type": "single-select",
        "value": null,
        "tag": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "High"
        },
        "team_member": null
      }
    ]
  }
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}
{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

Authenticate with a Bearer token: API key, OAuth token, or session token.

Path Parameters

id
string
required

Deal UUID

Query Parameters

include
string

Comma-separated extra sections. Values: custom_fields. Default: custom_fields. Pass empty string for base fields only.

Response

Deal fetched

success
enum<boolean>
required
Available options:
true
data
object
required