Obtenir les transactions hors ligne
curl --request GET \
--url https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list \
--header 'Authorization: <api-key>'import requests
url = "https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list"
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/private/fundraiser/{id}/offline-donations/list', 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/private/fundraiser/{id}/offline-donations/list",
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/private/fundraiser/{id}/offline-donations/list"
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/private/fundraiser/{id}/offline-donations/list")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list")
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[
{
"id": 1,
"amount": 100,
"amount_total": 100,
"currency": "USD",
"is_pending": false,
"pledge_code": "PLEDGE_CODE",
"tax_eligible_amount": 100,
"has_tax_receipt": false,
"created_at": "2024-01-01 16:00:03",
"billing": {
"business_name": "Company Inc",
"is_foundation": false,
"title": "Mr.",
"name": "Mr. John Snow",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"fundraiser_page": {
"id": 1001,
"name": "Personal Page name"
},
"fundraiser_team": {
"id": 1001,
"name": "Team name"
},
"tax_receipt": {
"id": 1001,
"amount_donation": 100.99,
"amount_benefit": 10.49,
"amount_eligible": 90.5,
"name_on_receipt": "John Smith",
"issued_on": "2021-01-01 19:00:00",
"receipt_number": "TAX-0012345",
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"transaction_meta": {
"is_lump_sum": false,
"is_foundation": false
}
}
]
API spécifiques à la campagne
Obtenir les transactions hors ligne
Récupérez la liste paginée des dons hors ligne enregistrés à une campagne CrowdChange, incluant montant, donateur et métadonnées d’inscription.
GET
/
v2
/
private
/
fundraiser
/
{id}
/
offline-donations
/
list
Obtenir les transactions hors ligne
curl --request GET \
--url https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list \
--header 'Authorization: <api-key>'import requests
url = "https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list"
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/private/fundraiser/{id}/offline-donations/list', 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/private/fundraiser/{id}/offline-donations/list",
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/private/fundraiser/{id}/offline-donations/list"
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/private/fundraiser/{id}/offline-donations/list")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.crowdchange.dev/v2/private/fundraiser/{id}/offline-donations/list")
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[
{
"id": 1,
"amount": 100,
"amount_total": 100,
"currency": "USD",
"is_pending": false,
"pledge_code": "PLEDGE_CODE",
"tax_eligible_amount": 100,
"has_tax_receipt": false,
"created_at": "2024-01-01 16:00:03",
"billing": {
"business_name": "Company Inc",
"is_foundation": false,
"title": "Mr.",
"name": "Mr. John Snow",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"fundraiser_page": {
"id": 1001,
"name": "Personal Page name"
},
"fundraiser_team": {
"id": 1001,
"name": "Team name"
},
"tax_receipt": {
"id": 1001,
"amount_donation": 100.99,
"amount_benefit": 10.49,
"amount_eligible": 90.5,
"name_on_receipt": "John Smith",
"issued_on": "2021-01-01 19:00:00",
"receipt_number": "TAX-0012345",
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"transaction_meta": {
"is_lump_sum": false,
"is_foundation": false
}
}
]
Paramètres de chemin
integer
requis
Identifiant de la campagne.
Paramètres de requête
string
Statut de la transaction. Valeurs permises :
received, pendinginteger
Équipe de la campagne.
integer
Page personnelle de la campagne.
integer
Numéro de page. Par défaut :
1integer
Nombre de résultats à retourner. Par défaut :
10string
Terme de recherche.
Réponse
Retourne un tableau d’objets contenant les champs suivants.integer
Identifiant de la transaction.
number
Montant.
number
Montant total.
string
Code de devise. Valeurs permises :
CAD, USD, AUD, EURboolean
Vrai si la transaction est en attente.
string
Code d’engagement (pledge).
number
Montant admissible aux fins fiscales.
boolean
Vrai si la transaction a un reçu fiscal.
string
Date de création de la transaction.
object
Informations de facturation de l’utilisateur.
Afficher propriétés
Afficher propriétés
string
Nom de l’entreprise.
boolean
Cette transaction est-elle effectuée par une fondation?
string
Titre honorifique (p. ex. M. / Mme / etc.).
string
Nom complet de l’utilisateur, incluant le titre honorifique.
string
Prénom de l’utilisateur.
string
Nom de famille de l’utilisateur.
string
Nom et numéro de rue.
string
Nom de la ville.
string
Code du pays.
string
État ou province.
string
Code postal.
string
Adresse courriel de l’utilisateur.
object
object
Informations sur le reçu fiscal.
Afficher propriétés
Afficher propriétés
integer
Identifiant unique.
number
Montant total du don.
number
Montant de l’avantage.
number
Montant admissible.
string
Nom figurant sur le reçu.
string
Date à laquelle le reçu fiscal a été émis.
string
Numéro du reçu fiscal
string
Titre honorifique (p. ex. M. / Mme / etc.).
string
Prénom.
string
Nom de famille.
string
Nom et numéro de rue.
string
Nom de la ville.
string
Code du pays.
string
État ou province.
string
Code postal.
string
Adresse courriel.
object
| Statut | Description |
|---|---|
400 | Requête invalide |
403 | Interdit |
[
{
"id": 1,
"amount": 100,
"amount_total": 100,
"currency": "USD",
"is_pending": false,
"pledge_code": "PLEDGE_CODE",
"tax_eligible_amount": 100,
"has_tax_receipt": false,
"created_at": "2024-01-01 16:00:03",
"billing": {
"business_name": "Company Inc",
"is_foundation": false,
"title": "Mr.",
"name": "Mr. John Snow",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"fundraiser_page": {
"id": 1001,
"name": "Personal Page name"
},
"fundraiser_team": {
"id": 1001,
"name": "Team name"
},
"tax_receipt": {
"id": 1001,
"amount_donation": 100.99,
"amount_benefit": 10.49,
"amount_eligible": 90.5,
"name_on_receipt": "John Smith",
"issued_on": "2021-01-01 19:00:00",
"receipt_number": "TAX-0012345",
"title": "Mr.",
"first_name": "John",
"last_name": "Snow",
"street_address": "100 Main Street",
"city": "Toronto",
"country": "CA",
"state": "ON",
"postal": "A1A 1A1",
"email": "john@example.com"
},
"transaction_meta": {
"is_lump_sum": false,
"is_foundation": false
}
}
]
Cette page vous a-t-elle été utile ?
⌘I