accounts
Returns details for a fundraiser account, including the active products and fundraising cause as specified for the supplied channel.
HTTP request
Section titled “HTTP request”GET /accounts/{id}Authentication
Section titled “Authentication”client_id and client_secret headers. See Authentication.
Parameters
Section titled “Parameters”Header
Section titled “Header”| Parameter | Required | Type | Description |
|---|---|---|---|
X-Correlation-ID | Yes | uuid | Fresh UUID per request. |
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | string | ASF Member Number |
| Parameter | Required | Type | Description |
|---|---|---|---|
channel | Yes | SourceChannel | Partner platform making the request. |
Returns
Section titled “Returns”SuccessEnvelope with data.items:
| Field | Type | Description |
|---|---|---|
name | string | Account display name. |
memberNumber | string | ASF member number. |
products[] | object[] | Activated products for the channel. |
products[].name | string | Product name (matches SourceChannel). |
products[].description | string | Product description for UI display. |
products[].status | string | Activation status, typically Activated. |
products[].logo | string | Logo image URL. |
products[].coverImage | string | Cover image URL. |
products[].donationAmounts | number[] | Suggested donation amounts in AUD. |
Sample
Section titled “Sample”import osimport uuidimport requests
BASE_URL = "https://sit.api.asf.org.au/fundraisers/api/v1"
response = requests.get( f"{BASE_URL}/accounts/ASF123456", params={"channel": "XYZ Platform"}, headers={ "client_id": os.environ["ASF_CLIENT_ID"], "client_secret": os.environ["ASF_CLIENT_SECRET"], "X-Correlation-ID": str(uuid.uuid4()), }, timeout=10,)response.raise_for_status()
for product in response.json()["data"]["items"]["products"]: print(product["name"], product["donationAmounts"])import { randomUUID } from 'node:crypto';
const BASE_URL = 'https://sit.api.asf.org.au/fundraisers/api/v1';
const url = new URL(`${BASE_URL}/accounts/ASF123456`);url.searchParams.set('channel', 'XYZ Platform');
const response = await fetch(url, { method: 'GET', headers: { client_id: process.env.ASF_CLIENT_ID!, client_secret: process.env.ASF_CLIENT_SECRET!, 'X-Correlation-ID': randomUUID(), },});if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const body = await response.json();for (const product of body.data.items.products) { console.log(product.name, product.donationAmounts);}<?php$baseUrl = 'https://sit.api.asf.org.au/fundraisers/api/v1';$id = 'ASF123456';$query = http_build_query(['channel' => 'XYZ Platform']);$correlationId = bin2hex(random_bytes(16));
$ch = curl_init("$baseUrl/accounts/$id?$query");curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'client_id: ' . getenv('ASF_CLIENT_ID'), 'client_secret: ' . getenv('ASF_CLIENT_SECRET'), 'X-Correlation-ID: ' . $correlationId, ],]);
$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);if ($status >= 400) throw new Exception("HTTP $status: $response");
$body = json_decode($response, true);foreach ($body['data']['items']['products'] as $product) { printf("%s %s\n", $product['name'], json_encode($product['donationAmounts']));}Example response
Section titled “Example response”{ "apiVersion": "1.0.0", "correlationId": "210c68180-2ac6-11ee-b000-111", "method": "/accounts/:id", "data": { "items": { "name": "Wombat Park Softball Club", "memberNumber": "ASF123456", "products": [ { "name": "XYZ Platform", "description": "Your support will help our club upgrade our digital scoreboard.", "status": "Activated", "logo": "https://content.example/logo.png", "coverImage": "https://content.example/cover.png", "donationAmounts": [10, 20, 50, 100] } ] } }}Errors
Section titled “Errors”| Status | Code | When it fires |
|---|---|---|
401 | — | Basic credentials or client_id/client_secret are invalid. |
404 | ACCOUNT:NOT_FOUND | No fundraiser account exists for the supplied id. |
429 | — | Request quota exhausted. |
500 | FUNDRAISER:UNKNOWN | Unhandled server error. Retry with backoff. |
503 | — | Server temporarily unavailable. |