Peer-to-peer – REST API
For developers and advanced users only
The Peer-to-peer Application Programming Interface (API) provides a way for you to integrate your existing systems with your p2p events. You can also create custom leaderboards, thermometers or searches that provide your supporter a unique experience.
For example, access donor, fundraiser, and gift information and display this data in the format you choose and in your style on your website.
The API provides secure connections to the database, allowing read access in real time.
Common uses of the APIs allow developers to create content rich applications for web sites to display donor and gift information.
The API is a set of RESTfull method calls and parameters. Data is returned in JSON format. JSON data ‘streams’ can be easily parsed using many popular tools. The parameters allow client programmers to easily filter, sort, and truncate the data from P2P sites.
Developer Information
The API is a set of RESTfull method calls and parameters. Data is returned in JSON format. JSON data ‘streams’ can be easily parsed using many popular tools. The parameters allow client programmers to easily filter, sort, and truncate the data from P2P sites.
Each method call will respond with a ‘status’ node. The status of the call will be ‘true’ for properly executed requests and responses, or ‘false’ for exception states. If an exception has occurred due to user input, an ‘error’ node with a message describing the exception will be returned. If the request has executed properly, a ‘data’ node with the requested information will be returned.
As all methods in v1.0 of the P2P are read-only methods, they are relatively safe to use in browser-side javascript. Browser-side javascript will expose your API Key to anyone curious enough to look at your code, so this must be considered if you want to safeguard all access to your site data. If you want to keep your API Key perfectly safe, you must only access the API from server-side code.