Skip to main content

API: Retrieve Donations

With an authenticated user it is possible to retrieve completed donations.

Domonkos Horváth avatar
Written by Domonkos Horváth
Updated over 12 months ago

With an authenticated user (see https://how.cambuildr.com/en/articles/5161332-api-authentication) it is possible to load completed donations via the API

API Call

GET <cambuildr-url>/api/v1/donations

The donations are returned paginated. The page number can be defined with the query parameter page (page=1, page=2, ...).

The elements are ordered by creation date in descending order. Timestamps are UTC.

Response

{
"error": false,
"donations": {
"current_page": 1,
"data": [
{
"id": 200,
"name": "max",
"surname": "muster",
"amount": 50,
"is_anonymous": false,
"created_at": "2025-02-17 15:54:10",
"was_created_manually": false,
"email": "[email protected]",
"is_deduction": false,
"birthdate": null,
"payment_id": "transaction-id",
"payment_type": null,
"brand": null,
"webhook_code": "Webhook-Code-1",
"webhook_purpose": "Purpose for Code 1",
"address": {
"street": null,
"city": null,
"zip_code": "1010",
"country_alpha2": null
}
}
],
...
"next_page_url": "<cambuildr-url>/api/v1/donations?page=2",
"path": "<cambuildr-url>/api/v1/donations",
"prev_page_url": null,
"total": 90
},
"total_count": 90
}
Did this answer your question?