Close a retainer pack
curl --request POST \
--url https://api.stardex.ai/v1/retainer-packs/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refund_amount": 123,
"refund_comment": "<string>",
"refund_date": "2023-12-25"
}
'import requests
url = "https://api.stardex.ai/v1/retainer-packs/{id}/close"
payload = {
"refund_amount": 123,
"refund_comment": "<string>",
"refund_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refund_amount: 123, refund_comment: '<string>', refund_date: '2023-12-25'})
};
fetch('https://api.stardex.ai/v1/retainer-packs/{id}/close', 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/retainer-packs/{id}/close",
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([
'refund_amount' => 123,
'refund_comment' => '<string>',
'refund_date' => '2023-12-25'
]),
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/retainer-packs/{id}/close"
payload := strings.NewReader("{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.stardex.ai/v1/retainer-packs/{id}/close")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stardex.ai/v1/retainer-packs/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4e5f6a7b-8c9d-4e0f-9a1b-3c4d5e6f7a8b",
"organization_company_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"organization_company_name": "Acme Corp",
"name": "H1 2026 leadership pack",
"currency_code": "EUR",
"invoice_number": "INV-0981",
"link_extra_hires": true,
"firm_commission_percent": 0,
"is_closed": true,
"closed_at": "2026-07-01T10:00:00.000Z",
"fee_status": {
"id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b",
"name": "Paid",
"status_type": "paid",
"color": "#22c55e"
},
"expected_date": "2026-01-15",
"actual_payment_date": "2026-02-01",
"amount_each": 10000,
"default_split": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100
}
],
"retainers": [
{
"id": "5f6a7b8c-9d0e-4f1a-8b2c-4d5e6f7a8b9c",
"position": 1,
"amount": 10000,
"firm_commission_percent": 0,
"claim": {
"is_restricted": false,
"placement_fee_event_id": "1e2f3a4b-5c6d-4e7f-8a8b-9c0d1e2f3a4b",
"job_id": "6a7b8c9d-0e1f-4a2b-9c3d-5e6f7a8b9c0d",
"job_title": "Chief Financial Officer",
"candidate_id": "7b8c9d0e-1f2a-4b3c-8d4e-6f7a8b9c0d1e",
"person_id": "8c9d0e1f-2a3b-4c4d-9e5f-7a8b9c0d1e2f",
"person_name": "Priya Shah",
"start_date": "2026-03-02"
},
"splits": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100,
"split_amount": 10000
}
]
},
{
"id": "6a7b8c9d-0e1f-4a2b-8c3d-5e6f7a8b9c0e",
"position": 2,
"amount": 10000,
"firm_commission_percent": 0,
"claim": {
"is_restricted": false,
"placement_fee_event_id": "2f3a4b5c-6d7e-4f8a-9b9c-0d1e2f3a4b5c",
"job_id": "9d0e1f2a-3b4c-4d5e-8f6a-8b9c0d1e2f3a",
"job_title": "Head of Sales",
"candidate_id": "0e1f2a3b-4c5d-4e6f-9a7b-9c0d1e2f3a4b",
"person_id": "1f2a3b4c-5d6e-4f7a-8b8c-0d1e2f3a4b5c",
"person_name": "Marcus Webb",
"start_date": "2026-04-13"
},
"splits": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100,
"split_amount": 10000
}
]
}
],
"extra_hires": [
{
"placement_fee_event_id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
"job_id": "2a3b4c5d-6e7f-4a8b-9c9d-1e2f3a4b5c6e",
"job_title": "VP of Marketing",
"candidate_id": "4b5c6d7e-8f9a-4b0c-9d1e-2f3a4b5c6d7e",
"person_id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"person_name": "Elena Novak",
"start_date": "2026-06-01"
}
],
"adjustments": [
{
"id": "6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a",
"amount": 2500,
"comment": "Goodwill credit after a guarantee replacement",
"adjusted_on": "2026-07-01",
"created_at": "2026-07-01T10:00:00.000Z"
}
],
"summary": {
"retainer_count": 2,
"claimed_count": 2,
"open_count": 0,
"extra_hire_count": 1,
"total_amount": 20000,
"remaining_amount": 0,
"adjustments_total": 2500,
"net_retained": 17500
},
"created_at": "2026-01-10T08:30:00.000Z",
"updated_at": "2026-07-01T10:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Retainer Packs
Close a retainer pack
Closed packs are no longer offered when logging placements. The pack status does not change. Optionally records a refund for unclaimed retainers as an adjustment.
Returns the full pack with its retainers, claims, splits, extra hires, adjustments and summary.
Access: Session and OAuth callers need permission to edit CRM records (org:crm:edit; org:admin always can). API keys need the fees:write scope.
POST
/
v1
/
retainer-packs
/
{id}
/
close
Close a retainer pack
curl --request POST \
--url https://api.stardex.ai/v1/retainer-packs/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refund_amount": 123,
"refund_comment": "<string>",
"refund_date": "2023-12-25"
}
'import requests
url = "https://api.stardex.ai/v1/retainer-packs/{id}/close"
payload = {
"refund_amount": 123,
"refund_comment": "<string>",
"refund_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refund_amount: 123, refund_comment: '<string>', refund_date: '2023-12-25'})
};
fetch('https://api.stardex.ai/v1/retainer-packs/{id}/close', 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/retainer-packs/{id}/close",
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([
'refund_amount' => 123,
'refund_comment' => '<string>',
'refund_date' => '2023-12-25'
]),
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/retainer-packs/{id}/close"
payload := strings.NewReader("{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.stardex.ai/v1/retainer-packs/{id}/close")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stardex.ai/v1/retainer-packs/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refund_amount\": 123,\n \"refund_comment\": \"<string>\",\n \"refund_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "4e5f6a7b-8c9d-4e0f-9a1b-3c4d5e6f7a8b",
"organization_company_id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
"organization_company_name": "Acme Corp",
"name": "H1 2026 leadership pack",
"currency_code": "EUR",
"invoice_number": "INV-0981",
"link_extra_hires": true,
"firm_commission_percent": 0,
"is_closed": true,
"closed_at": "2026-07-01T10:00:00.000Z",
"fee_status": {
"id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b",
"name": "Paid",
"status_type": "paid",
"color": "#22c55e"
},
"expected_date": "2026-01-15",
"actual_payment_date": "2026-02-01",
"amount_each": 10000,
"default_split": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100
}
],
"retainers": [
{
"id": "5f6a7b8c-9d0e-4f1a-8b2c-4d5e6f7a8b9c",
"position": 1,
"amount": 10000,
"firm_commission_percent": 0,
"claim": {
"is_restricted": false,
"placement_fee_event_id": "1e2f3a4b-5c6d-4e7f-8a8b-9c0d1e2f3a4b",
"job_id": "6a7b8c9d-0e1f-4a2b-9c3d-5e6f7a8b9c0d",
"job_title": "Chief Financial Officer",
"candidate_id": "7b8c9d0e-1f2a-4b3c-8d4e-6f7a8b9c0d1e",
"person_id": "8c9d0e1f-2a3b-4c4d-9e5f-7a8b9c0d1e2f",
"person_name": "Priya Shah",
"start_date": "2026-03-02"
},
"splits": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100,
"split_amount": 10000
}
]
},
{
"id": "6a7b8c9d-0e1f-4a2b-8c3d-5e6f7a8b9c0e",
"position": 2,
"amount": 10000,
"firm_commission_percent": 0,
"claim": {
"is_restricted": false,
"placement_fee_event_id": "2f3a4b5c-6d7e-4f8a-9b9c-0d1e2f3a4b5c",
"job_id": "9d0e1f2a-3b4c-4d5e-8f6a-8b9c0d1e2f3a",
"job_title": "Head of Sales",
"candidate_id": "0e1f2a3b-4c5d-4e6f-9a7b-9c0d1e2f3a4b",
"person_id": "1f2a3b4c-5d6e-4f7a-8b8c-0d1e2f3a4b5c",
"person_name": "Marcus Webb",
"start_date": "2026-04-13"
},
"splits": [
{
"team_member_id": "6f7a8b9c-0d1e-4f2a-9b4c-5d6e7f8a9b0c",
"team_member_name": "Theo Grant",
"role": "Sales",
"split_percentage": 100,
"split_amount": 10000
}
]
}
],
"extra_hires": [
{
"placement_fee_event_id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
"job_id": "2a3b4c5d-6e7f-4a8b-9c9d-1e2f3a4b5c6e",
"job_title": "VP of Marketing",
"candidate_id": "4b5c6d7e-8f9a-4b0c-9d1e-2f3a4b5c6d7e",
"person_id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"person_name": "Elena Novak",
"start_date": "2026-06-01"
}
],
"adjustments": [
{
"id": "6d7e8f9a-0b1c-4d2e-9f3a-4b5c6d7e8f9a",
"amount": 2500,
"comment": "Goodwill credit after a guarantee replacement",
"adjusted_on": "2026-07-01",
"created_at": "2026-07-01T10:00:00.000Z"
}
],
"summary": {
"retainer_count": 2,
"claimed_count": 2,
"open_count": 0,
"extra_hire_count": 1,
"total_amount": 20000,
"remaining_amount": 0,
"adjustments_total": 2500,
"net_retained": 17500
},
"created_at": "2026-01-10T08:30:00.000Z",
"updated_at": "2026-07-01T10:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Authenticate with a Bearer token: API key, OAuth token, or session token.
Path Parameters
Retainer pack ID
Body
application/json
Money returned to the client for unclaimed retainers. Recorded as an adjustment on the pack; at most the net retained amount.
Note on the refund, at most 500 characters.
Maximum string length:
500Date of the refund (YYYY-MM-DD). Defaults to today.
Was this page helpful?