API Documentation

Base URL
https://app.donorsync.io/api/v1
🔑 Authentication

The API uses Basic Authentication. Each charity has a username and password generated during signup.

All requests must include the Authorization header:

Authorization: Basic {base64(username:password)}
Accept: application/json
Example (cURL):
curl -X POST https://app.donorsync.io/api/v1/me \
  -H "Accept: application/json" \
  -u charity_user:charity_pass

📍 Endpoints

1. Test Connection

Verify that your API credentials are valid.

Endpoint:
POST /me
Request:

No body required.

Response (200):
{
"success": true,
"message": "Authenticated",
"data": {
"name": "Username",
"email": "Email"
}
}
Error (401):
{
"message": "Unauthorized"
}
2. Create Donation

Create a new donation record.

Endpoint:
POST /donation/create
Request Body:
{
"donor_first_name": "John",
"donor_last_name": "Doe",
"donor_email": "john.doe@example.com",
"donor_phone": "123456789",
"donor_address": "Hotel Gotham",
"donor_city": "Manchester",
"donor_postcode": "SW1Y 4PH",
"donor_ip": "",
"gift_aid": "yes",
"amount": "20",
"payment_method": "cash",
"payment_confirmation_number": "",
"donation_type": "one-time",
"donation_date": "25-02-2021",
"zakat_donation": "yes"
}
Validation Rules:
  • donor_email: required, valid email
  • gift_aid: required, must be yes or no
  • amount: required, numeric, minimum 0.01
  • donation_type: required, one of one-time, recurring, renewal
  • Other donor fields are optional but recommended
Successful Response (200):
{
"data": {
"id": 2013,
"donor_first_name": "John",
"donor_last_name": "Doe",
"donor_email": "john.doe@example.com",
"donor_phone": "123456789",
"donor_address": "Hotel Gotham",
"donor_city": "Manchester",
"donor_postcode": "SW1Y 4PH",
"donor_ip": null,
"gift_aid": "yes",
"amount": "20",
"payment_method": "cash",
"payment_confirmation_number": "",
"donation_type": "one-time",
"donation_date": "2021-02-25T12:41:39.000000Z",
"zakat_donation": true
}
}
Error Response (422):
{
"message": "The given data was invalid.",
"errors": {
"donor_email": [
"The donor email is required."
]
}
}
⚠️ Error Codes
Status CodeMeaning
200Success
201Resource created successfully
401Unauthorized (invalid credentials)
422Validation error in request data
500Internal server error

Subscribe to our Newsletter

Subscribe for Updates: Stay informed about the latest investor updates, financial results, and announcements by subscribing to our newsletter.

Scroll to Top