NAV
shell ruby python csharp php

Donation

The Donation object

The Donation object looks like this in JSON:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
transaction_id Yes int
number No int
canadian_donation_receipt_id No int
payment_method No enum (cash, check, credit_card, ach, money_order, gift_in_kind, other, paypal)
payment_reference No text (300)
online Yes bool
online_payment_id No int
recurring Yes bool
donor_id No int
first_name No text (100)
last_name No text (100)
initial_organization_name No text (100)
phone_number No text (100)
email_address No text (100)
donor_comment No text
staff_comment No text
gift_in_kind_description No text
acknowledged_at No datetime
acknowledged_by_id No int
secret No text (200)
amount Yes decimal
currency No text (3)
exchange_rate No decimal
home_currency_amount Yes decimal
donate_page_id No int
campaign_id No int
appeal_id No int
recurring_money_transfer_id No int
refunded_by_transaction_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "filter": {"0":{"logic":"ALL","fields":[{"name":"posted_date","value":{"type":"RANGE","start":"2021-01-01","end":"2022-03-17"},"positive":1},{"name":"amount","value":{"type":"RANGE","start":"10.5","end":"900.15"},"positive":1}]}}
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": 200,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "donation",
            "id": 7,
            "transaction_id": 13,
            "number": 44,
            "canadian_donation_receipt_id": null,
            "payment_method": "credit_card",
            "payment_reference": null,
            "online": true,
            "online_payment_id": null,
            "recurring": false,
            "donor_id": null,
            "first_name": "Bobby",
            "last_name": "Hilton",
            "initial_organization_name": null,
            "phone_number": "444-7777",
            "email_address": "bobby662@yahoo.co",
            "donor_comment": null,
            "staff_comment": null,
            "gift_in_kind_description": null,
            "acknowledged_at": null,
            "acknowledged_by_id": null,
            "secret": "16b97ef909e2f02dd1f16a3c2b0b8b6a",
            "amount": 100,
            "currency": "USD",
            "exchange_rate": null,
            "home_currency_amount": 100,
            "donate_page_id": null,
            "campaign_id": null,
            "appeal_id": null,
            "recurring_money_transfer_id": 2,
            "refunded_by_transaction_id": null,
            "report_data": {
                "posted_date": "2015-03-10",
                "posted_year": 2015,
                "transaction_added_at": "2015-03-10 19:33:11",
                "fund_names": "Building Fund",
                "fund_ids": "3",
                "fund_breakdown": "7:3:100.00",
                "acknowledged": null,
                "donor_name": "Bobby Hilton",
                "person_id": null,
                "person_firstname": null,
                "person_lastname": null,
                "person_deceased": 0,
                "contact_organization_id": null,
                "contact_org_name": null,
                "donor_model_type": null,
                "donor_model_id": null,
                "has_donor_model_id": 0,
                "assigned_to_id": null,
                "donor_primary_address_id": null,
                "donor_street": null,
                "donor_city": null,
                "donor_state": null,
                "donor_zip": null,
                "donor_country": null,
                "num_soft_credits": 0,
                "export_helper_donation_id": 7,
                "donor_primary_email": null,
                "row_id": 7
            }
        }
    ],
    "sandbox": true
}

Retrieves all Donation objects that match given filter conditions.

HTTP Request

GET /donations

Parameters

Name Required Data Type Description
filter No mixed See available filter conditions
page No int The page of results to return if more than 200 records are found.

Expandable Properties

Filter Condition Parameters

These conditions can be used to narrow the results returned.

Name Type
posted_date date
tax_year year
donation_number integer
donor_name text
address address
donor_type choice
acknowledged bool
online_donation bool
online_donation_page object id
recurring_donation bool
campaign object id
appeal object id
fund object id
fund_amount decimal
linked_to_donor bool
num_soft_credits integer
payment_method enum
amount decimal
donor_representative object id
donor_is_deceased bool
refunded bool
tag tag
donor_comment text
staff_comment text
custom_field custom

Permissions

One of the following roles is required to call this method:

create

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X POST
-d '{
    "payment_method": "credit_card",
    "amount": 40,
    "funds": "{\"3\":40}",
    "deposit_into_account_id": "56",
    "posted_date": "2023-12-31",
    "person_id": "344",
    "organization_id": "48"
}' \ 
require 'httparty'
response = HTTParty.post(
 'https://yourschool.populiweb.com/api2/donations',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :payment_method => 'credit_card',
  :amount => 40,
  :funds => {"3":40},
  :deposit_into_account_id => '56'
 }.to_json
)
puts response.body
import requests
response = requests.post(
 'https://yourschool.populiweb.com/api2/donations',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'payment_method': 'credit_card',
  'amount': 40,
  'funds': {"3":40},
  'deposit_into_account_id': '56'
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  payment_method = "credit_card",
  amount = 40,
  funds = {"3":40},
  deposit_into_account_id = "56"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'payment_method' => 'credit_card',
  'amount' => 40,
  'funds' => {"3":40},
  'deposit_into_account_id' => '56'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 21,
    "transaction_id": 102,
    "number": 1,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": false,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": null,
    "last_name": null,
    "initial_organization_name": null,
    "phone_number": null,
    "email_address": null,
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "621ceeb3e41ef8c0bd2114aeefccce27",
    "amount": 40,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 40,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "donor": null,
    "funds": [
        {
            "object": "donation_fund",
            "id": 8,
            "donation_id": 21,
            "fund_id": 3,
            "is_tax_deductible": false,
            "amount": 40,
            "home_currency_amount": 40
        }
    ],
    "sandbox": true
}

Creates a new Donation object.

HTTP Request

POST /donations

Parameters

Name Required Data Type Description
payment_method Yes enum (cash, check, credit_card, ach, money_order, gift_in_kind, other, paypal)
amount Yes decimal
funds Yes collection of fund_ids and amounts
deposit_into_account_id Yes int
org_name No text (100)
campaign_id No int
appeal_id No int
staff_comment No text
gift_in_kind_description No text
payment_reference No text (300)
posted_date No date
currency No text (3)
exchange_rate No decimal
person_id No int
organization_id No int

Permissions

One of the following roles is required to call this method:

show

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/(donation)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/(donation)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/(donation)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "sandbox": true
}

Retrieves a specific Donation object.

HTTP Request

GET /donations/(donation)

Parameters

No additional parameters are needed beyond the ID of the object being requested that appears in the URL.

Expandable Properties

Permissions

One of the following roles is required to call this method:

update

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/(donation)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X PUT
require 'httparty'
response = HTTParty.put(
 'https://yourschool.populiweb.com/api2/donations/(donation)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.put(
 'https://yourschool.populiweb.com/api2/donations/(donation)',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/(donation)"), Method.Put);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/(donation)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "sandbox": true
}

Updates an existing Donation object.

HTTP Request

PUT /donations/(donation)

Parameters

Name Required Data Type Description
campaign_id No int
appeal_id No int
staff_comment No text
acknowledged_at No datetime
acknowledged_by No int

Permissions

One of the following roles is required to call this method:

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/(donation)/link_to_owner" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "owner_type": "person",
    "owner_id": 11
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/link_to_owner',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :owner_type => 'person',
  :owner_id => 11
 }.to_json
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/link_to_owner',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'owner_type': 'person',
  'owner_id': 11
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/(donation)/link_to_owner"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  owner_type = "person",
  owner_id = 11
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/(donation)/link_to_owner');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'owner_type' => 'person',
  'owner_id' => 11
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "donor": null,
    "soft_credits": [],
    "sandbox": true
}

HTTP Request

GET /donations/(donation)/link_to_owner

Parameters

Name Required Data Type Description
owner_type Yes enum person OR contact_org
owner_id Yes int
soft_credit No bool

Permissions

One of the following roles is required to call this method:

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/(donation)/unlink_donor" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_donor',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_donor',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/(donation)/unlink_donor"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_donor');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "sandbox": true
}

HTTP Request

GET /donations/(donation)/unlink_donor

Parameters

None

Permissions

One of the following roles is required to call this method:

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/(donation)/unlink_soft_credit" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "donor_id": 14
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_soft_credit',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :donor_id => 14
 }.to_json
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_soft_credit',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'donor_id': 14
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/(donation)/unlink_soft_credit"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  donor_id = 14
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/(donation)/unlink_soft_credit');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'donor_id' => 14
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "donation",
    "id": 6,
    "transaction_id": 200,
    "number": 43,
    "canadian_donation_receipt_id": null,
    "payment_method": "credit_card",
    "payment_reference": null,
    "online": true,
    "online_payment_id": null,
    "recurring": false,
    "donor_id": null,
    "first_name": "Bonny",
    "last_name": "McMurry",
    "initial_organization_name": null,
    "phone_number": "444-7777",
    "email_address": "bonny551@hotmail.co",
    "donor_comment": null,
    "staff_comment": null,
    "gift_in_kind_description": null,
    "acknowledged_at": null,
    "acknowledged_by_id": null,
    "secret": "16b97ef909e2f05dd1f16a3c2b0b8b6a",
    "amount": 100,
    "currency": "USD",
    "exchange_rate": null,
    "home_currency_amount": 100,
    "donate_page_id": null,
    "campaign_id": null,
    "appeal_id": null,
    "recurring_money_transfer_id": null,
    "refunded_by_transaction_id": null,
    "soft_credits": [],
    "sandbox": true
}

HTTP Request

GET /donations/(donation)/unlink_soft_credit

Parameters

Name Required Data Type Description
donor_id Yes int

Permissions

One of the following roles is required to call this method:

recurring

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donations/recurring" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
-d '{
    "filter": {"0":{"logic":"ALL","fields":[{"name":"amount","value":{"type":"RANGE","start":"10.5","end":"900.15"},"positive":1}]}}
}' \ 
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donations/recurring',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donations/recurring',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/donations/recurring"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/donations/recurring');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "recurring_money_transfer",
            "id": 2,
            "type": "donation",
            "donor_id": 1,
            "student_id": null,
            "payer_type": null,
            "payer_id": null,
            "payment_plan_student_id": null,
            "treat_as_aid": false,
            "pay_beyond_balance": false,
            "payment_method": "credit_card",
            "gateway_token_provider": "stripe",
            "payment_gateway_id": null,
            "gateway_customer_token": "cus_MLxeHuvTzFyb2N",
            "gateway_source_token": "card_1Ld0FNGz1v34x3yFuC2B0L72",
            "start_date": "2022-08-31",
            "end_date": null,
            "last_charged_on": "2022-09-16",
            "last_attempt_at": null,
            "last_attempt_by_id": null,
            "interval": "1_month",
            "day": true,
            "max_additional_times": null,
            "total_times_charged": 2,
            "amount": 90,
            "currency": "USD",
            "secret": "bfb9d17fa8a24e02f864b12f5a732177",
            "first_name": "Donny",
            "last_name": "McDonor",
            "org_name": null,
            "email_address": "donnyd@yahoo.co",
            "phone_number": "123-123-1234",
            "street": "123 Street",
            "city": "Moscow",
            "state": "ID",
            "postal": "83843",
            "country": "US",
            "last_digits": "4242",
            "card_bin": null,
            "card_is_international": false,
            "bank_name": null,
            "donation_campaign_id": 1,
            "donation_appeal_id": null,
            "donation_donate_page_id": null,
            "donation_fund_id": 3,
            "donation_split_fund_id": null,
            "donation_split_fund_amount": 0,
            "donation_staff_comment": "virtual terminal recurring test",
            "status": "active",
            "status_date": "2022-09-16",
            "problem_message": null,
            "cancel_type": null,
            "times_left": null,
            "fund_names": "Building Fund",
            "donate_page_name": null,
            "fund_ids": "|3|",
            "donor_name": "Donny McDonor",
            "donor_model_type": null,
            "donor_model_id": null,
            "donor_street": null,
            "donor_city": null,
            "donor_state": null,
            "donor_zip": null,
            "donor_country": null,
            "campaign_name_cached": "New Building Campaign",
            "appeal_name_cached": null,
            "assigned_to_id": null,
            "donor_representative": null,
            "person_first_name": null,
            "person_last_name": null,
            "contact_org_name": null,
            "person_deceased": 0,
            "donor_primary_email": null,
            "added_at": "2022-08-31T23:23:05+00:00",
            "added_by_id": 10,
            "updated_at": "2022-09-16T21:10:53+00:00",
            "updated_by_id": 10
        }
    ],
    "sandbox": true
}

HTTP Request

GET /donations/recurring

Parameters

Name Required Data Type Description
filter No mixed See available filter conditions
page No int The page of results to return if more than 200 records are found.

Filter Condition Parameters

These conditions can be used to narrow the results returned.

Name Type
start_date date
end_date date
scheduled_to_end choice
last_charged_on date
day integer
donor_name text
donor_type choice
online_donation_page object id
campaign object id
appeal object id
fund object id
donor_representative object id
linked_to_donor bool
payment_method enum
times_charged integer
times_left integer
amount decimal
status enum
tag tag
custom_field custom

Permissions

One of the following roles is required to call this method: