Every Funraisin platform comes with it’s very own API allowing you to access your data from other 3rd party applications. Using the API you can tap directly into your data in real-time and at any time for things like storing your data in other CRM systems, or for simply displaying things like leaderboards on other websites.

Today’s post is not for everyone and certainly not for the the faint hearted. Packed with detail this is awesome bedtime reading for those of us less technically inclined.

But without further adue, we wanted to give you the breakdown of Funraisin’s API.

Creating a User

To connect to your API first you need to create a user and allow that user access to the API. This can be done in Funraisin > User Admin. Jump in and create a new user and make sure you tick the “API Access” checkbox and then keep these credentials handy.

screen-shot-2016-12-24-at-12-46-49-pm

Your API URL

To access your API you can use https://yourdomain.com/api/{endpoint}

Authentication

When connecting to your API you need to send through the email address and password of the user that you created in the step above. This can be done via simple GET variables “username” and “password”, when retrieving records or POST variables when updating or creating new records.

For example https://yourdomain.com/api/{endpoint}?username=apiuser@yourdomain.com&password=myapipassword

Make sure you keep your username and password safe and make sure you always access your API via https and not http.

Specifying Formats and Date Ranges

When accessing each endpoint you can send a GET variable “format” to specify whether you want us to return the data in CSV of JSON format. If you don’t specify the format then you we will use CSV.

Each endpoint also has additional GET variables for filtering the data date ranges. When using dates please use the form “yyyy-mm-dd”.

Using “date_from” will return any record created or modified since that date. Using “date_to” will return any record created or modified prior to that date. Both “date_from” and “date_to” can be used together or on their own.

e.g. The below example will grab all donations made in 2016

https://yourdomain.com/api/donations?username=apiuser@yourdomain.com&password=apipassword&date_from=2016-01-01&date_to=2016-12-31

Paging & Limiting Results

For large datasets you can use the GET parameter “limit” to restrict the number of rows returned. Additionally, you can use the “offset” parameter to then handle paging.

e.g. https://yourdomain.com/api/donations?username=apiuser@yourdomain.com&password=apipassword&limit=1000&offset=1000

Updating and Creating New Records

Some endpoints will allow you to update or create new records by posting an array called “data” to the endpoint.

Example: POST to https://yourdomain.com/api/donations/123

data[d_email] = joeblogs@gmail.com;
data[d_phone_mobile] = 0404 123 456;

Will update donation record 123 with the above details.

Available Endpoints

There are 2 types of endpoints for accessing your data, we have static endpoints and dynamic endpoints.

Static endpoints are simply direct access to your data tables, they return every column, un-formatted by us, making it ideal for accessing data for the purposes of storing in an external CRM.

Dynamic endpoints are the exact opposite. They consist of data that has been manipulated by us to produce more meaningful information, making these ideal for the use of displaying things like leaderboards on external websites.

The following static endpoints allow you to access your data tables.

Donations

Url: https://yourdomain.com/api/donations
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: donation_id

Column Type Null Default Comments
donation_id bigint(20) No
event_id bigint(20) No 0
team_id bigint(20) No 0
member_id bigint(20) No 0
cause_id bigint(20) No
fbuser_id varchar(150) No
fbuser_pic varchar(150) No
history_id bigint(20) No 0
page_id bigint(20) No
donation_hash varchar(255) No
donation_type varchar(20) No online
donation_frequency varchar(50) No
donation_reason varchar(100) No
donation_reason_for text No
donation_interval varchar(50) No
display_on enum(‘Y’, ‘N’) No Y
d_photo varchar(150) No
d_title varchar(20) No
d_fname varchar(150) No
d_lname varchar(150) No
d_organisation varchar(255) No
d_email varchar(150) No
d_optin enum(‘Y’, ‘N’) No N
d_optin_charity enum(‘Y’, ‘N’) No N
d_optin_fees enum(‘Y’, ‘N’) No N
d_fee double(7,2) No
d_gender enum(‘M’, ‘F’) No M
d_dob date No
d_address_unit varchar(20) No
d_address_number varchar(20) No
d_address_street varchar(150) No
d_address_suburb varchar(150) No
d_address_pcode varchar(50) No
d_address_state varchar(150) No
d_address_country varchar(150) No
d_phone varchar(100) No
d_phone_home varchar(80) No
d_phone_work varchar(80) No
d_phone_mobile varchar(80) No
d_comments text No
d_display_name varchar(150) No
d_receipt varchar(50) No personal
d_anonymous enum(‘Y’, ‘N’) No N
d_amount double(13,2) No 0.00
d_amount_free double(7,2) No
d_amount_sel double(7,2) No
gateway_customer_ref varchar(255) No
gateway_card_ref varchar(255) No
po_number varchar(32) No
tax_ref varchar(80) No
card_type varchar(20) No
payment_method varchar(60) No credit card
card_number varchar(20) No
card_name varchar(150) No
card_expiry varchar(20) No
cheque_name varchar(150) No
cheque_number varchar(150) No
date_paid datetime No
d_status varchar(10) No paid
d_receipt_num int(7) No 0000000
d_receipt_sent enum(‘Y’, ‘N’) No N
is_mobile enum(‘Y’, ‘N’) No N
is_donation enum(‘Y’, ‘N’) No Y
is_profile_donation enum(‘Y’, ‘N’) No N
d_refund_amount double(7,2) No
d_refund_reason text No
d_refund_date datetime No
sent_thanks enum(‘Y’, ‘N’) No N
in_memory_title varchar(50) No
in_memory_fname varchar(150) No
in_memory_lname varchar(150) No
kw_address varchar(255) No
donor_lat varchar(150) No
donor_lng varchar(150) No
donor_ip varchar(150) No
utm_campaign text No
utm_source text No
utm_medium text No
utm_content text No
utm_term text No
donation_tags text No
crm_donor_id varchar(255) No
last_logged_in date No
last_updated datetime No 0000-00-00 00:00:00
date_created

Get all donations

To access your donation data you can use the below methods.

GET https://yourdomain.com/api/donations

Get a single donation

If you want to get a specific donation record you can specify the id of the donation in the url

GET https://yourdomain.com/api/donations/{donation_id}

Create a new donation

To create a new donation record you can send a POST request with the fields sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/donations

This will produce a result of Success or Failure.

Update a donation

To update an existing donation you can send a POST request specifying the donation_id in the url, with any field that you want updated sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/donations/{donation_id}

This will product a result of Success or Failure.

Recurring Donations

Url: https://yourdomain.com/api/recurringdonations
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: id
Read only

Column Type Null Default Comments
id bigint(20) No
donation_id bigint(20) No
d_amount double(7,2) No
po_number varchar(150) No
tax_ref varchar(255) No
crm_donation_id varchar(255) No
date_created datetime No

Get all donations

To access your donation data you can use the below methods.

GET https://yourdomain.com/api/recurringdonations

Get a single donation

If you want to get a specific donation record you can specify the id of the donation in the url

GET https://yourdomain.com/api/recurringdonations/{id}

Participants

Url: https://yourdomain.com/api/participants/
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: member_id

To access your fundraisers / participants you can use the below methods. Note that this data will NOT contain any information relating to their event, it will only give you the main contact details for each participant such as names, email, phone numbers, address data etc. To get information relating to their event, use the below method Participants Events.

Column Type Null Default Comments
member_id bigint(20) No
member_hash varchar(255) No
related_member_id bigint(20) No
m_rego_number varchar(150) No
fbuser_id varchar(150) No
fbuser_pic varchar(255) No
m_status_type varchar(100) No
m_title varchar(50) No
m_fname varchar(150) No
m_lname varchar(150) No
m_maiden varchar(100) No
m_email varchar(150) No
m_username varchar(50) No
m_pass varchar(32) No
m_dob date No 0000-00-00
m_gender enum(‘M’, ‘F’) No M
m_address_unit varchar(20) No
m_address_number varchar(20) No
m_address_street varchar(255) No
m_address_2 varchar(255) No
m_address_suburb varchar(255) No
m_address_pcode varchar(20) No
m_address_state varchar(20) No
m_address_country varchar(150) No
postal_is_same enum(‘Y’, ‘N’) No N
m_postal_street varchar(255) No
m_postal_suburb varchar(255) No
m_postal_pcode varchar(20) No
m_postal_state varchar(20) No
m_phone_home varchar(80) No
m_phone_work varchar(80) No
m_phone_mobile varchar(80) No
m_emergency_contact varchar(150) No
m_emergency_contact_alt varchar(150) No
m_emergency_contact_type varchar(150) No
m_emergency_phone varchar(150) No
m_medical_conditions varchar(10) No
m_medical_conditions_text text No
m_business_contact_name varchar(150) No
m_business_contact_number varchar(150) No
m_medication varchar(10) No
m_medication_details text No
m_hospitalised varchar(10) No
m_hospitalised_details text No
m_addition_care text No
m_twitter varchar(150) No
m_pinterest varchar(150) No
participated_prior enum(‘Y’, ‘N’) No N
m_photo varchar(255) No
m_coverphoto_personal varchar(255) No
m_background varchar(255) No
m_insupport varchar(150) No
m_confirmation_sent enum(‘Y’, ‘N’) No N
m_reminder_sent enum(‘Y’, ‘N’) No N
m_donation_sent enum(‘Y’, ‘N’) No N
m_goal_sent enum(‘Y’, ‘N’) No N
m_alert_donation enum(‘Y’, ‘N’) No Y
m_alert_goal enum(‘Y’, ‘N’) No Y
m_agreed_waiver enum(‘Y’, ‘N’) No N
m_name_alt varchar(155) No
m_gallery_title varchar(150) No
m_gallery_copy text No
m_ranking_overall_on enum(‘Y’, ‘N’) No Y
m_ranking_team_on enum(‘Y’, ‘N’) No Y
agree_site_terms enum(‘Y’, ‘N’) No N
participated_before varchar(255) No
agree_to_pay enum(‘Y’, ‘N’) No Y
agree_over_18 enum(‘Y’, ‘N’) No N
agree_to_fundraise enum(‘Y’, ‘N’) No N
m_company varchar(150) No
m_company_matchgiving enum(‘Y’, ‘N’) No N
m_position varchar(150) No
referal varchar(150) No
is_mobile enum(‘Y’, ‘N’) No N
optin enum(‘Y’, ‘N’) No N
m_optin enum(‘Y’, ‘N’) No Y
crm_member_id varchar(255) No
ecrm_customer_id varchar(255) No
gateway_customer_ref varchar(255) No
gateway_card_ref varchar(255) No
m_status int(1) No 0
last_logged_in datetime No
last_updated datetime No 0000-00-00 00:00:00
date_created

Get all participants

GET https://yourdomain.com/api/participants

Get a single participant

GET https://yourdomain.com/api/participants/{member_id}

Create a new participant

POST https://yourdomain.com/api/participants

Update a participant

POST https://yourdomain.com/api/participants/{member_id}

Participants Events

Url: https://yourdomain.com/api/participantsevents
Formats: CSV (default) or JSON
Options: date_from, date_to, member_id, event_id
Primary key: history_id

The participants events endpoint produces information relating to each participant’s event that they are taking part in, whether it be an online event, offline event of a diy event. Information such as their fundraising target, payment information is held in this table.

Column Type Null Default Comments
history_id bigint(20) No
member_id bigint(20) No 0
event_id bigint(20) No 0
team_id bigint(20) No 0
group_id bigint(20) No
table_id bigint(20) No
history_type enum(‘online’, ‘offline’, ‘diy’) No online
member_type varchar(150) No
bib_number varchar(20) No
seat_number int(4) No
is_active enum(‘Y’, ‘N’) No N
is_archived enum(‘Y’, ‘N’) No N
is_fundraising enum(‘Y’, ‘N’) No Y
is_team enum(‘Y’, ‘N’) No N
done_personaldetails enum(‘Y’, ‘N’) No N
done_eventoptions enum(‘Y’, ‘N’) No N
done_fundraising enum(‘Y’, ‘N’) No N
done_teamdetails enum(‘Y’, ‘N’) No N
conf_key varchar(80) No
entry_code varchar(20) No
promo_id bigint(20) No
paypal_token varchar(150) No
ticket varchar(32) No
number_tickets int(4) No
number_tables int(4) No
team_access enum(‘Y’, ‘N’) No N
m_display_reason enum(‘Y’, ‘N’) No N
m_target double(9,0) No 0
m_target_distance double(8,0) No
m_comments text No
m_reason text No
m_page_title varchar(255) No
m_coverphoto varchar(255) No
m_donation_amount double(7,2) No 0.00
m_donation_amount_sel varchar(20) No
m_donation_amount_free varchar(20) No
m_donation_po varchar(50) No
m_donation_fee double(8,2) No
m_donation_fee_optin enum(‘Y’, ‘N’) No N
is_paid enum(‘Y’, ‘N’) No N
is_complete enum(‘Y’, ‘N’) No N
date_completed datetime No
total_paid double(7,2) No 0.00
total_paid_entry double(7,2) No
total_paid_ticket double(7,2) No 0.00
total_paid_paypal double(7,2) No 0.00
total_paid_card double(7,2) No 0.00
total_paid_extra double(7,2) No 0.00
total_paid_merchandise double(7,2) No
total_paid_donation double(7,2) No
total_paid_fees double(7,2) No
m_receipt_sent enum(‘Y’, ‘N’) No N
m_confirmation_sent enum(‘Y’, ‘N’) No N
payment_method varchar(50) No credit card
payment_source enum(‘online’, ‘offline’) No online
po_number varchar(150) No
tax_ref varchar(150) No
card_type varchar(20) No
card_number varchar(20) No
card_expiry varchar(20) No
card_name varchar(150) No
date_paid datetime No
bsb_number varchar(20) No
account_number varchar(50) No
cheque_name varchar(150) No
money_order_number varchar(50) No
sort_order bigint(20) No 0
activity_lat varchar(150) No
activity_lng varchar(150) No
card_token varchar(150) No
customer_token varchar(150) No
utm_campaign text No
utm_source text No
utm_medium text No
utm_content text No
utm_term text No
m_thanks_message text No
m_thanks_video varchar(255) No
m_thanks_image varchar(255) No
in_memory_name varchar(150) No
crm_history_id varchar(255) No
last_updated datetime No
date_created datetime No 0000-00-00 00:00:00

Get all events

Use this to return ALL participant events

ttps://yourdomain.com/api/participantsevents

Get a specific record

To return a specific record you can send through the history_id

GET https://yourdomain.com/api/participantsevents/{history_id}

Get a specific participant’s events

To get any events for a specific person you can send through the optional “member_id” in the querystring.

GET ttps://yourdomain.com/api/participantsevents?member_id=1234

Get all entries for a specific event

To retrieve a list of entries for a specific event you can send through the optional “event_id” in the querystring

GET https://yourdomain.com/api/participantsevents?event_id=123

Participants Products

Url: https://yourdomain.com/api/participantsproducts/{history_id}
Formats: CSV (default) or JSON
Options: date_from, date_to

The participants products endpoint produces information relating to each participant’s products purchased during an event registration, if applicable.

This table is read only.

Column Type Null Default Comments
id bigint(20) No
option_type varchar(100) No
event_id bigint(20) No 0
member_id bigint(20) No 0
history_id bigint(20) No 0
product_id bigint(20) No
shop_product_id bigint(20) No
option_id bigint(20) No 0
option_num int(2) No 0
option_textfield text No
option_cost double(7,2) No 0.00
date_created datetime No 0000-00-00 00:00:00

Get all records

To retrieve all participant’s products use

GET ttps://yourdomain.com/api/participantsproducts

Get a specific participant’s records

To retrieve product information during a specific registration you can send through the history_id of the registration (from the participants events table)

GET ttps://yourdomain.com/api/participantsproducts/{history_id}

Teams

Url: https://yourdomain.com/api/teams
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: team_id

Column Type Null Default Comments
team_id bigint(20) No
event_id bigint(20) No 0
history_id bigint(20) No 0
captain_id bigint(20) No 0
bib_number varchar(20) No
t_name varchar(150) No
t_url varchar(150) No
t_target double(9,0) No 0
is_featured enum(‘Y’, ‘N’) No N
t_comments text No
t_page_title varchar(255) No
t_company_name varchar(150) No
t_company_website varchar(255) No
t_industry varchar(150) No
t_industry_other varchar(150) No
t_photo varchar(255) No
t_coverphoto varchar(255) No
t_background varchar(150) No
t_alert_donation enum(‘Y’, ‘N’) No Y
t_alert_member enum(‘Y’, ‘N’) No Y
t_alert_goal enum(‘Y’, ‘N’) No Y
t_goal_sent enum(‘Y’, ‘N’) No N
t_gallery_title varchar(150) No
t_gallery_copy text No
t_thanks_message text No
t_rank_position int(11) No 0
t_rank_aveposition int(11) No 0
t_rank_category varchar(10) No
t_ranking_overall_on enum(‘Y’, ‘N’) No Y
t_ranking_average_on enum(‘Y’, ‘N’) No Y
t_donations_total double(8,2) No 0.00
t_members_total int(4) No 0
t_representing varchar(150) No
related_teams text No
t_public enum(‘Y’, ‘N’) No Y
crm_team_id varchar(255) No
t_status int(1) No 1
last_updated datetime No 0000-00-00 00:00:00
date_created datetime No 0000-00-00 00:00:00

Get all teams

To access your team data you can use the below methods.

GET https://yourdomain.com/api/teams

Get a single team

If you want to get a specific team record you can specify the team_id of the team in the url

GET https://yourdomain.com/api/teams/{team_id}

Create a new team

To create a new team record you can send a POST request with the fields sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/teams

This will produce a result of Success or Failure.

Update a team

To update an existing team you can send a POST request specifying the team_id in the url, with any field that you want updated sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/teams/{team_id}

This will product a result of Success or Failure.

Events

Url: https://yourdomain.com/api/events
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: event_id

Column Type Null Default Comments
event_id bigint(20) No
created_member_id bigint(20) No
page_id bigint(20) No
event_key varchar(255) No
event_code varchar(20) No
is_locked enum(‘Y’, ‘N’) No N
has_page enum(‘Y’, ‘N’) No N
event_name varchar(150) No
event_type enum(‘online’, ‘offline’, ‘diy’) No online
event_category varchar(150) No
allow_entries enum(‘Y’, ‘N’) No Y
entry_type varchar(80) No
entry_limit varchar(20) No
use_entry_code enum(‘Y’, ‘N’) No N
entry_code varchar(50) No
event_fee double(7,2) No 0.00
event_fee_description text No
event_ticket_price double(7,2) No
event_tickets int(5) No
event_tickets_max int(4) No
event_tickets_min int(3) No 1
event_allow_tables enum(‘Y’, ‘N’) No N
event_tables int(4) No
event_table_price double(7,2) No
event_seats_per_table int(4) No
event_fundraising enum(‘Y’, ‘N’) No N
event_domain varchar(255) No
st_prefix_donation varchar(50) No DON
st_prefix_registration varchar(50) No REG
st_prefix_ticket varchar(50) No TKT
st_prefix_shop varchar(80) No SHP
event_closed enum(‘Y’, ‘N’) No N
event_closed_date date No
event_closed_time time No
event_closed_msg text No
event_short_desc text No
event_about_info text No
event_about_image varchar(255) No
event_important_info text No
event_important_image varchar(255) No
event_banner varchar(255) No
event_mobile_banner varchar(255) No
event_image varchar(255) No
event_header_height int(3) No 300
event_header_bgcolor varchar(50) No
event_header_html text No
event_header_mask enum(‘Y’, ‘N’) No Y
event_header_mask_color varchar(20) No #ffffff
event_header_mask_opacity varchar(5) No 0.6
event_thumb varchar(255) No
event_target double(13,2) No 0.00
event_offline double(13,2) No
event_date date No
event_expiry date No
event_time varchar(50) No
event_end_time varchar(10) No
event_location varchar(255) No
event_unit varchar(20) No
event_number varchar(20) No
event_street varchar(150) No
event_suburb varchar(150) No
event_city varchar(50) No
event_postcode varchar(80) No
event_state varchar(20) No
event_country varchar(255) No
event_map text No
event_website varchar(255) No
show_address enum(‘Y’, ‘N’) No N
show_emergency_contact enum(‘Y’, ‘N’) No N
show_terms enum(‘Y’, ‘N’) No N
show_waiver enum(‘Y’, ‘N’) No N
event_waiver text No
show_dob enum(‘Y’, ‘N’) No N
show_gender enum(‘Y’, ‘N’) No N
show_phone enum(‘Y’, ‘N’) No N
show_mobile enum(‘Y’, ‘N’) No N
show_donation enum(‘Y’, ‘N’) No Y
show_progress enum(‘Y’, ‘N’) No N
event_fundraising_banner varchar(255) No
event_fundraising_banner_mobile varchar(255) No
st_target_team int(7) No 3000
st_target_distance_member int(7) No 0
st_target_member int(7) No 1000
st_title_member varchar(255) No
event_fundraising_message text No
event_blog_message text No
st_title_team varchar(150) No
event_teamfundraising_message text No
event_facebook_like_member text No
event_facebook_like_team text No
event_twitter_like_member text No
event_twitter_like_team text No
event_email_like_member text No
event_email_like_team text No
event_email_like_subject_member varchar(150) No
event_email_like_subject_team varchar(150) No
event_email_join_team text No
event_email_join_subject_team varchar(150) No
event_facebook_share_member text No
event_facebook_share_team text No
event_twitter_share_member text No
event_twitter_share_team text No
event_social_sharing enum(‘Y’, ‘N’) No Y
event_social_sharing_public enum(‘Y’, ‘N’) No Y
event_alerts enum(‘Y’, ‘N’) No N
event_alert_ids varchar(255) No
event_campaign_from date No
st_teams enum(‘Y’, ‘N’) No N
st_donations enum(‘Y’, ‘N’) No Y
st_donations_personal enum(‘Y’, ‘N’) No Y
event_on_header enum(‘Y’, ‘N’) No N
event_on_home enum(‘Y’, ‘N’) No N
event_on_landing enum(‘Y’, ‘N’) No N
event_default_image varchar(255) No
event_default_team_image varchar(255) No
confirmation_page_id bigint(20) No
confirmation_url varchar(255) No
event_confirmation_html text No
send_confirmation_email enum(‘Y’, ‘N’) No Y
confirmation_email_template_id bigint(20) No
confirmation_email_subject varchar(255) No
confirmation_email_body text No
event_page_facts enum(‘Y’, ‘N’) No Y
event_page_date enum(‘Y’, ‘N’) No Y
event_page_location enum(‘Y’, ‘N’) No Y
event_page_fees enum(‘Y’, ‘N’) No Y
event_page_about enum(‘Y’, ‘N’) No N
event_page_info enum(‘Y’, ‘N’) No N
sort_order bigint(20) No
event_status int(1) No 0
crm_event_id varchar(255) No
last_updated datetime No
date_created datetime No 0000-00-00 00:00:00

Get all events

To access your event data you can use the below methods.

GET https://yourdomain.com/api/events

Get a single event

If you want to get a specific event record you can specify the id of the event in the url

GET https://yourdomain.com/api/events/{event_id}

Create a new event

To create a new event record you can send a POST request with the fields sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/events

This will produce a result of Success or Failure.

Update a event

To update an existing event you can send a POST request specifying the event_id in the url, with any field that you want updated sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/events/{event_id}

This will product a result of Success or Failure.

Shop Products

Url: https://yourdomain.com/api/products
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: product_id

Column Type Null Default Comments
product_id bigint(20) No
product_name varchar(150) No
product_tags text No
product_slug varchar(255) No
product_category varchar(150) No
product_code varchar(50) No
product_image varchar(255) No
product_image_large varchar(255) No
product_cost double(7,2) No
product_price double(7,2) No
product_description text No
product_description_long text No
product_delivery_price double(5,2) No
product_status int(1) No 1
sort_order int(4) No
last_updated datetime No
date_created datetime No

Get all products

GET https://yourdomain.com/api/products

Get a specific Product

GET https://yourdomain.com/api/products/{product_id}

Shop Sales

Url: https://yourdomain.com/api/sales
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: sale_id

Column Type Null Default Comments
sale_id bigint(20) No
member_id bigint(20) No
history_id bigint(20) No
po_number varchar(150) No
sale_type enum(‘sale’, ‘credit’) No sale
voucher_id bigint(20) No
voucher varchar(80) No
title varchar(50) No
first_name varchar(150) No
last_name varchar(150) No
email varchar(150) No
mobile varchar(50) No
phone varchar(80) No
unit varchar(50) No
number varchar(50) No
street varchar(150) No
postcode varchar(20) No
suburb varchar(150) No
state varchar(20) No nsw
country varchar(150) No
age varchar(20) No
gender enum(‘M’, ‘F’) No F
company varchar(150) No
sub_total double(7,2) No
gst double(7,2) No
delivery double(7,2) No
total double(7,2) No
date_paid datetime No
tax_ref varchar(150) No
payment_method varchar(30) No
email_sent enum(‘Y’, ‘N’) No N
email_sent_date datetime No
notes text No
card_type varchar(100) No
card_name varchar(100) No
card_number varchar(25) No
card_expiry varchar(10) No
referral varchar(150) No
deliver_to_billing enum(‘Y’, ‘N’) No N
delivery_unit varchar(50) No
delivery_number varchar(50) No
delivery_street varchar(150) No
delivery_suburb varchar(150) No
delivery_postcode varchar(10) No
delivery_state varchar(20) No
shipped enum(‘Y’, ‘N’) No N
shipped_date datetime No
shipped_tracking varchar(150) No
is_mobile enum(‘Y’, ‘N’) No N
last_updated datetime No
date_created datetime No

Get all Sales

GET https://yourdomain.com/api/sales

Get a specific Sale

GET GET https://yourdomain.com/api/sales/{sale_id}

Transactions

Url: https://yourdomain.com/api/transactions
Formats: CSV (default) or JSON
Options: date_from, date_to
Primary key: transaction_id

The transactions table, as the name suggests, stores information on all monetary transactions, from donations to registrations and merchandise purchases.

Column Type Null Default Comments
transaction_id int(11) No
transaction_type enum(‘donation’, ‘registration’, ‘merchandise’, ‘refund’) No
transaction_value double(8,2) No
transaction_fees double(8,2) No
transaction_notes text No
payment_type enum(‘credit card’, ‘paypal’, ‘refund’, ‘cash’, ‘cheque’) No
payment_reference varchar(255) No
member_id bigint(20) No
history_id bigint(20) No
donation_id bigint(20) No
schedule_id bigint(20) No
related_transaction_id bigint(20) No
crm_transaction_id varchar(255) No
date_created datetime No

Get all transactions

GET https://yourdomain.com/api/transactions

Get a specific transaction

GET https://yourdomain.com/api/transactions/{transaction_id}

Create a new transaction

To create a new transaction record you can send a POST request with the fields sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/transactions

This will produce a result of Success or Failure.

Update a transaction

To update an existing transaction you can send a POST request specifying the transaction_id in the url, with any field that you want updated sent via the $_POST[“data”] array.

POST https://yourdomain.com/api/transactions/{transaction_id}

This will product a result of Success or Failure.

Dynamic Endpoints

The below endpoints provide you access to information that would otherwise require querying multiple data tables to determine the result such as leaderboards. The data produced from these endpoints are created on the fly based on the data in the database and as a result they are cached for a period of 10 minutes to protect the integrity of the live database.

Top Fundraisers

Url: https://yourdomain.com/api/topfundraisers/{optional limit}/{optional event_id}
Formats: CSV (default) or JSON

Returns an unformatted list of your top fundraisers in order of total amount raised, restricted to the optional limit. If no limit provided then it defaults to 100.

If you wish to restrict the results to a certain event you can pass through the optional event_id paramater in the url.

Data Returned
member_id, name, page url, raised, target, photo, event

Top Teams

Url: https://yourdomain.com/api/topteams/{optional limit}/{optional event_id}
Formats: CSV (default) or JSON

Returns an unformatted list of your top teams in order of total amount raised, restricted to the optional limit. If no limit provided then it defaults to 100.

If you wish to restrict the results to a certain event you can pass through the optional event_id paramater in the url.

Data Returned
team_id_id, name, page url, raised, target, photo, event

Top Donations

Url: https://yourdomain.com/api/topdonations/{optional limit}/{optional event_id}
Formats: CSV (default) or JSON

Returns an unformatted list of your top donations in order of total amount raised, restricted to the optional limit. If no limit provided then it defaults to 100.

If you wish to restrict the results to a certain event you can pass through the optional event_id paramater in the url.

Data Returned
donation_id_id, display name, comments, amount donated, photo, page url of person or team sponsored

About Scott Dilley

Scott Dilley is is Co Founder and Platform Director of Funraisin. Scott has worked with many of Australia’s largest nonprofits, advising and implementing their online fundraising requirements. If you'd like to get in touch with Scott, drop him a line on +61 2 8006 1009 or email scott@funraisin.co