NAV
shell ruby python csharp php

DonatePage

The DonatePage object

The DonatePage object looks like this in JSON:

{
    "object": "donate_page",
    "id": 30,
    "current_version_id": null,
    "name": "Special Page",
    "title": null,
    "content": null,
    "published": true,
    "fund_direction": "any",
    "fund_id": 2,
    "split_fund_id": null,
    "split_fund_amount": null,
    "campaign_id": null,
    "appeal_id": null,
    "amount_type": "variable",
    "min_amount": 0,
    "amount_choices": null,
    "fixed_amount": 0,
    "status": "active",
    "thank_you_type": "default",
    "thank_you_message": null,
    "thank_you_url": null,
    "send_receipt_email": true,
    "enable_comment": true,
    "custom_css": null,
    "allow_recurring": true,
    "allow_cover_processing_fee": true,
    "payment_gateway_id": null,
    "secret": null,
    "retired_at": null,
    "retired_by_id": null,
    "added_at": "2014-02-20T00:47:28+00:00",
    "added_by_id": null,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
current_version_id No int
name No text (300)
title No text (300)
content No text
published Yes bool
fund_direction Yes enum (any, single, multi)
fund_id No int
split_fund_id No int
split_fund_amount No decimal
campaign_id No int
appeal_id No int
amount_type Yes enum (variable, choices, fixed, choices_variable)
min_amount No decimal
amount_choices No text (1000)
fixed_amount No decimal
status Yes enum (active, deleted)
thank_you_type Yes enum (default, message, redirect)
thank_you_message No text
thank_you_url No text (2000)
send_receipt_email Yes bool
enable_comment Yes bool
custom_css No text
allow_recurring Yes bool
allow_cover_processing_fee No bool
payment_gateway_id No int
secret No text (255)
retired_at No datetime
retired_by_id No int
added_at No datetime
added_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/donatepages" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donatepages',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donatepages',
 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/donatepages"), 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/donatepages');
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": "donate_page",
            "id": 30,
            "current_version_id": null,
            "name": "Special Page",
            "title": null,
            "content": null,
            "published": true,
            "fund_direction": "any",
            "fund_id": 2,
            "split_fund_id": null,
            "split_fund_amount": null,
            "campaign_id": null,
            "appeal_id": null,
            "amount_type": "variable",
            "min_amount": 0,
            "amount_choices": null,
            "fixed_amount": 0,
            "status": "active",
            "thank_you_type": "default",
            "thank_you_message": null,
            "thank_you_url": null,
            "send_receipt_email": true,
            "enable_comment": true,
            "custom_css": null,
            "allow_recurring": true,
            "allow_cover_processing_fee": true,
            "payment_gateway_id": null,
            "secret": null,
            "retired_at": null,
            "retired_by_id": null,
            "added_at": "2014-02-20T00:47:28+00:00",
            "added_by_id": null
        }
    ],
    "sandbox": true
}

Retrieves all DonatePage objects.

HTTP Request

GET /donatepages

Parameters

None

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/donatepages/(donatepage)" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/donatepages/(donatepage)',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/donatepages/(donatepage)',
 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/donatepages/(donatepage)"), 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/donatepages/(donatepage)');
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": "donate_page",
    "id": 30,
    "current_version_id": null,
    "name": "Special Page",
    "title": null,
    "content": null,
    "published": true,
    "fund_direction": "any",
    "fund_id": 2,
    "split_fund_id": null,
    "split_fund_amount": null,
    "campaign_id": null,
    "appeal_id": null,
    "amount_type": "variable",
    "min_amount": 0,
    "amount_choices": null,
    "fixed_amount": 0,
    "status": "active",
    "thank_you_type": "default",
    "thank_you_message": null,
    "thank_you_url": null,
    "send_receipt_email": true,
    "enable_comment": true,
    "custom_css": null,
    "allow_recurring": true,
    "allow_cover_processing_fee": true,
    "payment_gateway_id": null,
    "secret": null,
    "retired_at": null,
    "retired_by_id": null,
    "added_at": "2014-02-20T00:47:28+00:00",
    "added_by_id": null,
    "sandbox": true
}

Retrieves a specific DonatePage object.

HTTP Request

GET /donatepages/(donatepage)

Parameters

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

Permissions

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