Skip to main content
PATCH
/
v1
/
deals
/
{id}
Update deal
curl --request PATCH \
  --url https://api.stardex.ai/v1/deals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "currency_code": "<string>",
  "compensation": 1,
  "compensation_currency_code": "<string>",
  "pricing_rate": 50,
  "win_probability": 50,
  "deal_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "closed_date": "<string>",
  "job_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "referred_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "client_contact_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "custom_fields": [
    {
      "attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "value": "<string>",
      "add_values": [
        "<string>"
      ],
      "remove_values": [
        "<string>"
      ],
      "add_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "remove_team_member_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "clear_all": true
    }
  ]
}
'
import requests

url = "https://api.stardex.ai/v1/deals/{id}"

payload = {
"name": "<string>",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency_code": "<string>",
"compensation": 1,
"compensation_currency_code": "<string>",
"pricing_rate": 50,
"win_probability": 50,
"deal_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"closed_date": "<string>",
"job_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"referred_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"client_contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_fields": [
{
"attribute_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>",
"add_values": ["<string>"],
"remove_values": ["<string>"],
"add_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_team_member_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"clear_all": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
client_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
currency_code: '<string>',
compensation: 1,
compensation_currency_code: '<string>',
pricing_rate: 50,
win_probability: 50,
deal_status_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>',
closed_date: '<string>',
job_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
referred_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
client_contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_fields: [
{
attribute_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
value: '<string>',
add_values: ['<string>'],
remove_values: ['<string>'],
add_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_team_member_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
clear_all: true
}
]
})
};

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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'client_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'currency_code' => '<string>',
'compensation' => 1,
'compensation_currency_code' => '<string>',
'pricing_rate' => 50,
'win_probability' => 50,
'deal_status_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>',
'closed_date' => '<string>',
'job_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'referred_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'owner_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'client_contact_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_fields' => [
[
'attribute_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>',
'add_values' => [
'<string>'
],
'remove_values' => [
'<string>'
],
'add_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'remove_team_member_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'clear_all' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://api.stardex.ai/v1/deals/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.stardex.ai/v1/deals/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}")
.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::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"currency_code\": \"<string>\",\n \"compensation\": 1,\n \"compensation_currency_code\": \"<string>\",\n \"pricing_rate\": 50,\n \"win_probability\": 50,\n \"deal_status_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"closed_date\": \"<string>\",\n \"job_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"referred_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"owner_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"client_contact_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_fields\": [\n {\n \"attribute_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\",\n \"add_values\": [\n \"<string>\"\n ],\n \"remove_values\": [\n \"<string>\"\n ],\n \"add_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_team_member_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"clear_all\": true\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "message": "Deal updated successfully"
  }
}
{
"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

Body

application/json
name
string

Deal name.

Minimum string length: 1
client_id
string<uuid>

Client company UUID.

amount
number

Deal amount.

currency_code
string

ISO 4217 currency code (e.g. USD, EUR, GBP).

Required string length: 3
compensation
number

Candidate's expected total annual compensation.

Required range: x >= 0
compensation_currency_code
string

ISO 4217 currency code for compensation.

Required string length: 3
pricing_rate
number

Recruitment fee percentage (0–100).

Required range: 0 <= x <= 100
win_probability
number

Win probability (0–100).

Required range: 0 <= x <= 100
deal_status_id
string<uuid>

Deal status UUID.

description
string

Description.

closed_date
string | null

ISO 8601 close date. Pass null to clear.

job_ids
string<uuid>[]

Job UUIDs to link to this deal. Replaces all existing deal_jobs links.

referred_by
string<uuid>

Person UUID of the referrer.

owner_ids
string<uuid>[]

Team member UUIDs to assign as deal owners. Replaces all existing deal_owners links. Pass an empty array to remove all owners.

client_contact_ids
string<uuid>[]

Client contact UUIDs to attach as deal contacts. Replaces all existing deal_client_contacts links. Pass an empty array to detach all contacts. Each contact must belong to this team.

custom_fields
object[]

Custom field values to update.

Response

Deal updated

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