Look up beneficiaries
curl --request GET \
--url https://api.donate.gg/api/v2/beneficiaries/lookupimport requests
url = "https://api.donate.gg/api/v2/beneficiaries/lookup"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/beneficiaries/lookup', 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.donate.gg/api/v2/beneficiaries/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.donate.gg/api/v2/beneficiaries/lookup"
req, _ := http.NewRequest("GET", url, nil)
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.donate.gg/api/v2/beneficiaries/lookup")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/beneficiaries/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"type": "charity",
"id": "9b4dae4e-d8c1-4322-a594-35a4858296b2",
"available": true,
"name": "Make-A-Wish America",
"imageUrl": "https://docs.candid.org/edoc/11142134",
"url": "https://www.donate.gg/charities/make-a-wish-america",
"source": null
},
{
"type": "campaign",
"id": "cmr2icrm701xu04jxvybvmgwn",
"available": true,
"name": "Kintara for St. Jude",
"imageUrl": "https://donategg-user-assets-prod.s3.us-east-1.amazonaws.com/image/e6a658a4-ee8a-4428-960d-56e16bfe9c91/1874bf55-7026-40be-a1ff-5fbedb6a0fd1.png",
"url": "https://www.donate.gg/campaigns/kintara-for-st-jude",
"source": "donate"
}
],
"nextCursor": null
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"issues": [
{
"path": "<string>",
"code": "required",
"message": "<string>"
}
]
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Beneficiaries
Look up beneficiaries
Turn references you already hold, from a config or a coin, into what to show: one summary for each reference, in the order asked. A reference sent twice is answered once. A recipient whose own profile is withheld comes back with available: false and a stand-in name and image to show in its place; an id that names nothing comes back with available: false and nulls. So a page that lists what a config pays always gets a row for every recipient. Public: no API key is needed. Send one to use your organization’s rate limit.
GET
/
v2
/
beneficiaries
/
lookup
Look up beneficiaries
curl --request GET \
--url https://api.donate.gg/api/v2/beneficiaries/lookupimport requests
url = "https://api.donate.gg/api/v2/beneficiaries/lookup"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/beneficiaries/lookup', 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.donate.gg/api/v2/beneficiaries/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.donate.gg/api/v2/beneficiaries/lookup"
req, _ := http.NewRequest("GET", url, nil)
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.donate.gg/api/v2/beneficiaries/lookup")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/beneficiaries/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"type": "charity",
"id": "9b4dae4e-d8c1-4322-a594-35a4858296b2",
"available": true,
"name": "Make-A-Wish America",
"imageUrl": "https://docs.candid.org/edoc/11142134",
"url": "https://www.donate.gg/charities/make-a-wish-america",
"source": null
},
{
"type": "campaign",
"id": "cmr2icrm701xu04jxvybvmgwn",
"available": true,
"name": "Kintara for St. Jude",
"imageUrl": "https://donategg-user-assets-prod.s3.us-east-1.amazonaws.com/image/e6a658a4-ee8a-4428-960d-56e16bfe9c91/1874bf55-7026-40be-a1ff-5fbedb6a0fd1.png",
"url": "https://www.donate.gg/campaigns/kintara-for-st-jude",
"source": "donate"
}
],
"nextCursor": null
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"issues": [
{
"path": "<string>",
"code": "required",
"message": "<string>"
}
]
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Headers
Query Parameters
Was this page helpful?