API
Our API can be used by developers to integrate Charity and information about their Projects into their own apps and sites to create interesting and compelling giving experiences. Developers can publish project videos, show targets and allow users to donate directly from their app or site.
The output from all our API methods is JSON and details of the available methods are listed below.
API Methods
The available API methods for retrieving charity and project related information are listed below.
GetAllCharities
URL: http://www.seethedifference.org/services/charities/getallcharities
Parameters: None
This method will return all of the charities that are on See The Difference. The method returns an array of Charity objects.
GetCharities
URL: http://www.seethedifference.org/services/charities/getcharities
Parameters: Filter (String). The filter is specified as a range of letters to use to filter the number of charities returned. The available filters are, a-d,e-h,i-l,m-p,q-t,u-x,y-z
This method will return all of the charities on See The Difference where the name begins with the letter range specified in the filter. The method returns an array of Charity objects.
GetProjectsByCategory
URL: http://www.seethedifference.org/services/projects/getprojectsbycategory
Parameters: Category (String). The available categories are:
- Most Watched
- Latest Projects
- Most Donated
- Success Stories
- Volunteer
- Celebrities
- Adult Welfare
- Animals & Nature
- Children & Youth
- Culture & Sport
- Disability
- Education & Skills
- Health
- International
This method will return all of the projects on See The Difference that belong to a particular category. The method returns an array of Project objects with the following properties.
GetProjectInformation
URL: http://www.seethedifference.org/services/projects/getprojectsbycategory
Parameters: ProjectID (String). This is the unique project identifier which is returned as part of the Project object.
This method will return a Project object with full details of a project including the project description from the See The Difference site as well as project funding targets.
Making A Donation
Donations can only be made to Charity Projects. To donate to a charity only, there are some projects setup to allow for un-restricted funding but alternatively you can donate to the first project that is returned against a charity.
To initiate the donation process from your app or site simply navigate to the following URL providing appropriate values for the parameters:
http://www.seethedifference.org/project/donate?projectid={Project ID}&amount={Amount To Donate}&returnurl={Return Page URL}
ProjectId - This is the unique identifier for the project you wish to donate to
Amount - The amount to donate. The minimum is £1 and maximum is £50000
ReturnURL - The URL of the page you want to direct your users once they have gone through the donation process.
All of the above parameters are required and once you navigate to this URL, the user will be taken through the See The Difference donation pages to make a donation for the selected project.
Objects
Below are the different objects and their properties that are returned as JSON output for methods listed above.
Charity Object
CharityName - the name of the charity
CharityDescription - details of what the charity does (this will contain formatted HTML)
CharityLogo - URL to the logo of the charity
VideoHealine - Headline of the main charity video, if specified by the charity
Video - The URL of the Flash Video, if specified by the charity
VideoPoster - The URL of the poster image for the video, if one specified by the charity
Address - HTML formatted address of the charity
TagLine - Short description of what the charity does
Projects - An array of Project objects listing details of charity projects published by the charity
Project Object
ProjectName - the name of the project
ProjectDescription - description of the project, what it is trying to achieve and what will be the end result (this will contain formatted HTML & only available when the GetProjectInformation method is called)
Video - The URL of the Flash Video for the project
VideoPoster - The URL of the poster image for the video
ProjectId - The unique identifier for the project
ProjectUrl - The URL to the Project page on the See The Difference site
ProjectTitle - The Project headline
TotalRaised - The total amount raised for the project (only available when the GetProjectInformation method is called)
Examples
You can see examples of how to use the API at:
http://cdn.seethedifference.org/scripts/widgets.html
Simply view the source of the page to see how the API is used.
Image and Video Dimensions
The dimensions for project videos and video poster images is 475px high and 583px wide. All project thumbnail images are 162px high and 217px wide.