Create async entity transfer
curl --request POST \
--url https://api.endaoment.org/v1/transfers/async-entity-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"requestedAmount": "1000000",
"originFundId": "123e4567-e89b-12d3-a456-426614174000",
"originOrgId": "123e4567-e89b-12d3-a456-426614174000",
"destinationFundId": "123e4567-e89b-12d3-a456-426614174000",
"destinationOrgId": "123e4567-e89b-12d3-a456-426614174000",
"chainId": 1,
"shareMyEmail": false
}
'import requests
url = "https://api.endaoment.org/v1/transfers/async-entity-transfers"
payload = {
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"requestedAmount": "1000000",
"originFundId": "123e4567-e89b-12d3-a456-426614174000",
"originOrgId": "123e4567-e89b-12d3-a456-426614174000",
"destinationFundId": "123e4567-e89b-12d3-a456-426614174000",
"destinationOrgId": "123e4567-e89b-12d3-a456-426614174000",
"chainId": 1,
"shareMyEmail": False
}
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({
idempotencyKey: '123e4567-e89b-12d3-a456-426614174000',
requestedAmount: '1000000',
originFundId: '123e4567-e89b-12d3-a456-426614174000',
originOrgId: '123e4567-e89b-12d3-a456-426614174000',
destinationFundId: '123e4567-e89b-12d3-a456-426614174000',
destinationOrgId: '123e4567-e89b-12d3-a456-426614174000',
chainId: 1,
shareMyEmail: false
})
};
fetch('https://api.endaoment.org/v1/transfers/async-entity-transfers', 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/transfers/async-entity-transfers",
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([
'idempotencyKey' => '123e4567-e89b-12d3-a456-426614174000',
'requestedAmount' => '1000000',
'originFundId' => '123e4567-e89b-12d3-a456-426614174000',
'originOrgId' => '123e4567-e89b-12d3-a456-426614174000',
'destinationFundId' => '123e4567-e89b-12d3-a456-426614174000',
'destinationOrgId' => '123e4567-e89b-12d3-a456-426614174000',
'chainId' => 1,
'shareMyEmail' => false
]),
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.endaoment.org/v1/transfers/async-entity-transfers"
payload := strings.NewReader("{\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\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.endaoment.org/v1/transfers/async-entity-transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/transfers/async-entity-transfers")
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 \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "entity",
"status": "approved",
"transactionHash": "0x1234567890abcdef",
"netAmount": "1000000",
"fee": "10000",
"createdAtUtc": "2024-03-20T10:30:00Z",
"requestedAmount": "1000000",
"updatedAtUtc": "2024-03-20T10:30:00Z",
"asyncStatus": "pending",
"chainId": 1
}Grant Transfers
Create async entity transfer
Creates a pending (async) entity transfer request that will be processed by Endaoment. The transfer will be in a pending state until it is fully processed.
Entity transfers support Fund to Fund, Org to Org, and Org to Fund transfers.
This endpoint requires authentication and the user must have permission to create transfers from the specified origin entity.
POST
/
v1
/
transfers
/
async-entity-transfers
Create async entity transfer
curl --request POST \
--url https://api.endaoment.org/v1/transfers/async-entity-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"requestedAmount": "1000000",
"originFundId": "123e4567-e89b-12d3-a456-426614174000",
"originOrgId": "123e4567-e89b-12d3-a456-426614174000",
"destinationFundId": "123e4567-e89b-12d3-a456-426614174000",
"destinationOrgId": "123e4567-e89b-12d3-a456-426614174000",
"chainId": 1,
"shareMyEmail": false
}
'import requests
url = "https://api.endaoment.org/v1/transfers/async-entity-transfers"
payload = {
"idempotencyKey": "123e4567-e89b-12d3-a456-426614174000",
"requestedAmount": "1000000",
"originFundId": "123e4567-e89b-12d3-a456-426614174000",
"originOrgId": "123e4567-e89b-12d3-a456-426614174000",
"destinationFundId": "123e4567-e89b-12d3-a456-426614174000",
"destinationOrgId": "123e4567-e89b-12d3-a456-426614174000",
"chainId": 1,
"shareMyEmail": False
}
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({
idempotencyKey: '123e4567-e89b-12d3-a456-426614174000',
requestedAmount: '1000000',
originFundId: '123e4567-e89b-12d3-a456-426614174000',
originOrgId: '123e4567-e89b-12d3-a456-426614174000',
destinationFundId: '123e4567-e89b-12d3-a456-426614174000',
destinationOrgId: '123e4567-e89b-12d3-a456-426614174000',
chainId: 1,
shareMyEmail: false
})
};
fetch('https://api.endaoment.org/v1/transfers/async-entity-transfers', 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/transfers/async-entity-transfers",
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([
'idempotencyKey' => '123e4567-e89b-12d3-a456-426614174000',
'requestedAmount' => '1000000',
'originFundId' => '123e4567-e89b-12d3-a456-426614174000',
'originOrgId' => '123e4567-e89b-12d3-a456-426614174000',
'destinationFundId' => '123e4567-e89b-12d3-a456-426614174000',
'destinationOrgId' => '123e4567-e89b-12d3-a456-426614174000',
'chainId' => 1,
'shareMyEmail' => false
]),
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.endaoment.org/v1/transfers/async-entity-transfers"
payload := strings.NewReader("{\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\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.endaoment.org/v1/transfers/async-entity-transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endaoment.org/v1/transfers/async-entity-transfers")
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 \"idempotencyKey\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"requestedAmount\": \"1000000\",\n \"originFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"originOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationFundId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"destinationOrgId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"chainId\": 1,\n \"shareMyEmail\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "entity",
"status": "approved",
"transactionHash": "0x1234567890abcdef",
"netAmount": "1000000",
"fee": "10000",
"createdAtUtc": "2024-03-20T10:30:00Z",
"requestedAmount": "1000000",
"updatedAtUtc": "2024-03-20T10:30:00Z",
"asyncStatus": "pending",
"chainId": 1
}Authorizations
Body
application/json
Response
Async entity transfer request successfully created
Was this page helpful?