Objectif / Montant amassé
curl --request GET \
--url https://api.crowdchange.dev/v2/client/fundraiser/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.crowdchange.dev/v2/client/fundraiser/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.crowdchange.dev/v2/client/fundraiser/{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.crowdchange.dev/v2/client/fundraiser/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.crowdchange.dev/v2/client/fundraiser/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.crowdchange.dev/v2/client/fundraiser/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/client/fundraiser/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "amount",
"goal": 10000,
"raised": 5000,
"donors": 25,
"n_teams": 10,
"n_pages": 25,
"name": "Gala Night",
"description": "Help us reach our goal and make a difference!",
"images": {
"original": "https://img.crowdchange.dev/files/abc.png"
},
"event": {
"start_at": "2024-01-01 18:00:00",
"end_at": "2024-01-01 22:00:00"
}
}
API spécifiques à la campagne
Objectif / Montant amassé
Récupérez l’objectif, le montant amassé, le nombre de donateurs et les métadonnées d’une campagne CrowdChange à partir de son identifiant.
GET
/
v2
/
client
/
fundraiser
/
{id}
Objectif / Montant amassé
curl --request GET \
--url https://api.crowdchange.dev/v2/client/fundraiser/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.crowdchange.dev/v2/client/fundraiser/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.crowdchange.dev/v2/client/fundraiser/{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.crowdchange.dev/v2/client/fundraiser/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.crowdchange.dev/v2/client/fundraiser/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.crowdchange.dev/v2/client/fundraiser/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/client/fundraiser/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "amount",
"goal": 10000,
"raised": 5000,
"donors": 25,
"n_teams": 10,
"n_pages": 25,
"name": "Gala Night",
"description": "Help us reach our goal and make a difference!",
"images": {
"original": "https://img.crowdchange.dev/files/abc.png"
},
"event": {
"start_at": "2024-01-01 18:00:00",
"end_at": "2024-01-01 22:00:00"
}
}
Paramètres de chemin
integer
requis
ID de la campagne.
Paramètres de requête
boolean
Inclure uniquement les transactions reçues pour le montant amassé. Par défaut :
falseRéponse
string
Type d’objectif. Valeurs permises :
amount, donorsnumber
Montant de l’objectif.
number
Montant amassé.
number
Nombre de participants.
number
Nombre d’équipes dans la campagne.
number
Nombre de pages personnelles dans la campagne.
string
Nom de la campagne.
string
Description de la campagne.
object
Images de la campagne.
object
| Statut | Description |
|---|---|
400 | Requête invalide |
403 | Interdit |
{
"type": "amount",
"goal": 10000,
"raised": 5000,
"donors": 25,
"n_teams": 10,
"n_pages": 25,
"name": "Gala Night",
"description": "Help us reach our goal and make a difference!",
"images": {
"original": "https://img.crowdchange.dev/files/abc.png"
},
"event": {
"start_at": "2024-01-01 18:00:00",
"end_at": "2024-01-01 22:00:00"
}
}
Dernière modification le 2 juillet 2026
Cette page vous a-t-elle été utile ?