curl --request POST \
--url https://api.endaoment.org/v1/donation-pledges/partner/stock-settled \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stockPledgeData": {
"shares": 100,
"ticker": "AAPL",
"lots": [
{
"numberOfShares": 50,
"purchasePrice": 150.75,
"purchaseDate": "2023-01-15T00:00:00.000Z",
"employeeStockPlan": "RSU",
"lotId": "LOT123"
}
]
},
"receivingFundId": "123e4567-e89b-12d3-a456-426614174000",
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"donationValueMicroDollars": "50000000000",
"partnerOperationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
}
'import requests
url = "https://api.endaoment.org/v1/donation-pledges/partner/stock-settled"
payload = {
"stockPledgeData": {
"shares": 100,
"ticker": "AAPL",
"lots": [
{
"numberOfShares": 50,
"purchasePrice": 150.75,
"purchaseDate": "2023-01-15T00:00:00.000Z",
"employeeStockPlan": "RSU",
"lotId": "LOT123"
}
]
},
"receivingFundId": "123e4567-e89b-12d3-a456-426614174000",
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"donationValueMicroDollars": "50000000000",
"partnerOperationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stockPledgeData: {
shares: 100,
ticker: 'AAPL',
lots: [
{
numberOfShares: 50,
purchasePrice: 150.75,
purchaseDate: '2023-01-15T00:00:00.000Z',
employeeStockPlan: 'RSU',
lotId: 'LOT123'
}
]
},
receivingFundId: '123e4567-e89b-12d3-a456-426614174000',
idempotencyKey: '123e4567-e89b-12d3-a456-426614174000',
donationValueMicroDollars: '50000000000',
partnerOperationId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
partnerUserIdentifier: 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f'
})
};
fetch('https://api.endaoment.org/v1/donation-pledges/partner/stock-settled', 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.endaoment.org/v1/donation-pledges/partner/stock-settled",
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([
'stockPledgeData' => [
'shares' => 100,
'ticker' => 'AAPL',
'lots' => [
[
'numberOfShares' => 50,
'purchasePrice' => 150.75,
'purchaseDate' => '2023-01-15T00:00:00.000Z',
'employeeStockPlan' => 'RSU',
'lotId' => 'LOT123'
]
]
],
'receivingFundId' => '123e4567-e89b-12d3-a456-426614174000',
'idempotencyKey' => '123e4567-e89b-12d3-a456-426614174000',
'donationValueMicroDollars' => '50000000000',
'partnerOperationId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'partnerUserIdentifier' => 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.endaoment.org/v1/donation-pledges/partner/stock-settled"
payload := strings.NewReader("{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.endaoment.org/v1/donation-pledges/partner/stock-settled")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/donation-pledges/partner/stock-settled")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000"
}Create stock donation pledge
Creates a liquidated stock donation pledge for a donation that has already settled at a tech-platform partner.
Authentication is required:
- A valid tech-platform API key
- The acting Endaoment user, provided either via the
x-endaoment-user-idheader or, when partner inflow routes are enabled, via a bodypartnerUserIdentifieron an API-key-only request (no impersonation header). Body resolution additionally requires the partner to havecanManageUsers.
This endpoint allows permissioned partners to:
- Record an already-settled stock donation against a receiving fund
- Provide the settled stock metadata and partner operation reference
- Create the resulting placeholder Donation in the same transaction
curl --request POST \
--url https://api.endaoment.org/v1/donation-pledges/partner/stock-settled \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"stockPledgeData": {
"shares": 100,
"ticker": "AAPL",
"lots": [
{
"numberOfShares": 50,
"purchasePrice": 150.75,
"purchaseDate": "2023-01-15T00:00:00.000Z",
"employeeStockPlan": "RSU",
"lotId": "LOT123"
}
]
},
"receivingFundId": "123e4567-e89b-12d3-a456-426614174000",
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"donationValueMicroDollars": "50000000000",
"partnerOperationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
}
'import requests
url = "https://api.endaoment.org/v1/donation-pledges/partner/stock-settled"
payload = {
"stockPledgeData": {
"shares": 100,
"ticker": "AAPL",
"lots": [
{
"numberOfShares": 50,
"purchasePrice": 150.75,
"purchaseDate": "2023-01-15T00:00:00.000Z",
"employeeStockPlan": "RSU",
"lotId": "LOT123"
}
]
},
"receivingFundId": "123e4567-e89b-12d3-a456-426614174000",
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"donationValueMicroDollars": "50000000000",
"partnerOperationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stockPledgeData: {
shares: 100,
ticker: 'AAPL',
lots: [
{
numberOfShares: 50,
purchasePrice: 150.75,
purchaseDate: '2023-01-15T00:00:00.000Z',
employeeStockPlan: 'RSU',
lotId: 'LOT123'
}
]
},
receivingFundId: '123e4567-e89b-12d3-a456-426614174000',
idempotencyKey: '123e4567-e89b-12d3-a456-426614174000',
donationValueMicroDollars: '50000000000',
partnerOperationId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
partnerUserIdentifier: 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f'
})
};
fetch('https://api.endaoment.org/v1/donation-pledges/partner/stock-settled', 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.endaoment.org/v1/donation-pledges/partner/stock-settled",
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([
'stockPledgeData' => [
'shares' => 100,
'ticker' => 'AAPL',
'lots' => [
[
'numberOfShares' => 50,
'purchasePrice' => 150.75,
'purchaseDate' => '2023-01-15T00:00:00.000Z',
'employeeStockPlan' => 'RSU',
'lotId' => 'LOT123'
]
]
],
'receivingFundId' => '123e4567-e89b-12d3-a456-426614174000',
'idempotencyKey' => '123e4567-e89b-12d3-a456-426614174000',
'donationValueMicroDollars' => '50000000000',
'partnerOperationId' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'partnerUserIdentifier' => 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.endaoment.org/v1/donation-pledges/partner/stock-settled"
payload := strings.NewReader("{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.endaoment.org/v1/donation-pledges/partner/stock-settled")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/donation-pledges/partner/stock-settled")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stockPledgeData\": {\n \"shares\": 100,\n \"ticker\": \"AAPL\",\n \"lots\": [\n {\n \"numberOfShares\": 50,\n \"purchasePrice\": 150.75,\n \"purchaseDate\": \"2023-01-15T00:00:00.000Z\",\n \"employeeStockPlan\": \"RSU\",\n \"lotId\": \"LOT123\"\n }\n ]\n },\n \"receivingFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"donationValueMicroDollars\": \"50000000000\",\n \"partnerOperationId\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\"\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000"
}Authorizations
Headers
UUID of the Endaoment user for this partner-settled operation. Optional when a body partnerUserIdentifier is supplied on an API-key-only request.
Partner API key used for authentication
Body
Settled stock pledge details reported by the partner
Show child attributes
Show child attributes
Unique identifier of the receiving fund
"123e4567-e89b-12d3-a456-426614174000"
Client-generated key to ensure idempotency of the request
"123e4567-e89b-12d3-a456-426614174000"
Settled donation value in microdollars
"50000000000"
Partner-owned reference for this operation
36"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Opaque partner-generated identifier for the acting user. Used only to resolve or corroborate the user; it is not stored on the pledge or returned in the response.
8 - 64^[\x20-\x7E]{8,64}$"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
Response
Partner-settled stock donation pledge successfully created
Unique identifier of the created donation pledge
"123e4567-e89b-12d3-a456-426614174000"
Was this page helpful?