API Documentation
API Documentation
API Documentation
Rev 1/5/17
Contents:
Integration Considerations 1
Data Mapping 1
Middleware 2
Synchronization 2
Step 1: Determine the Business Requirements of your Integration 3
Step 2: Decide What Data to Synchronize 3
Step 3: Create the Synchronization Script 3
Filtering Responses 12
Filtering Campaign Results 12
Filtering Donation Results 15
Filtering User Results 18
Data Mapping
You'll need to create a plan for how to keep your data models synchronized. Data must
be pulled from 360Alumni's API rather than pushed via an event-driven integration
model. So your integration needs to periodically scan the data and provide a change log
to act upon.
Once you have decided upon your synchronization model, you need to identify which
fields you are going to keep synchronized between the two systems. Use the User
Object reference page to help with your mapping. You can also download a copy of the
following spreadsheet to use for your mapping:
Middleware
Another consideration is the middleware that provides the "bridge" between 360Alumni
and your database. Middleware provides enforcement of business logic such as
conversion of the data format or structures. Another example of middleware tasks is
adding a layer of protection so bad data or glitches can not create chaos in the
destination system. An example of middleware is Zapier, which is a middleware
"clearinghouse" - offering prepackaged middleware "scripts" for thousands of software
applications. 360Alumni has a privately available "Zap" which can be used by our clients
who run Salesforce.
One method of integrating your application with 360Alumni is via a polling and
synchronization method. This involves checking the database periodically for changes
and then updating records accordingly. A polling and sync integration works by running
a script that checks for updates and then will update a target based on changes. You
can make these integrations two-way by simply applying the business logic you create
to both checks.
The following integration example uses a CRM to show how a sync integration can
work. Awesome University has a CRM that they use to keep track of their alumni and
ensure they can keep track of their donations. They have recently become a partner
with 360Alumni and would like to ensure that their alumni database in their CRM and
360Alumni remains in sync. In order to accomplish this they will be setting up a sync
with 360Alumni using the "Users" endpoint of the API.
For Awesome University's integration they have determined they want to perform a two
way sync with 360Alumni and the contacts in their CRM system. They determined this
by finding out the business requirements by talking with stakeholders in their
organization. This involved a short series of meetings where they discussed what data
they wanted to keep in sync with 360Alumni. They decided upon a two way sync
because it would allow them to maintain their alumni directory both organically and still
be able to manage it through their CRM.
Awesome University maintains a couple of in house servers so they decided their script
will be written in node.js and run once a day at 1 AM on one of their linux environments.
Their script will simply look at records that were changed in each system and then
update or create records on each of the respective environments. This also allows
Awesome University to put in any transformations they need.
● /api/campaigns/
● GET method
● /api/campaigns/{id}
● GET method
● /api/donations/
● GET method
● /api/users/
● GET and POST methods
● /api/users/{id}
● GET and PUT methods
Before you can use the API you'll need to get your API key, which you use to
authenticate with the API. Your account manager at 360Alumni will coordinate with
our Client Integrations Team to create an API key for your organization. Once you
have the key, connecting to the 360Alumni API is easy. For each API request,
simply include your API key as the value in an HTTP header named x-api-key. See
the examples for details.
The following steps walk you through the basics to get started using the API.
1. Click an API method to display it's reference documentation. For example, click
GET /api/campaigns/.
Note, for a GET /api/campaigns/ request the page parameter indicates which set of
results to return. The default page value is 1 representing the first 100 results.
.
.
.
6. Each campaign object in the returned array is identified with an id value. Note the first
object in the array above contains the id value 17.
8. Click Sandbox and enter the following to execute the API request:
Click Raw to show the JSON object without formatting, suitable for copying and using in
code.
Some GET methods provide optional filter parameters you can include to narrow API
results based on various criteria. The following sections show how to use some filter
parameters to get data on campaigns, donations, and users. This page contains the
following topics:
Test https://demo.s.360alumni.com/api/documentation
system
Your https://<<your-system>>.360alumni.com/api/documentation
system
The following steps walk you through using a filter parameter to get data on
campaigns.
1. Click the GET /api/campaigns/ method.
Optional filter parameters include created_since and created_before. Use
these parameters to narrow the campaigns returned to within a specific time
frame.
The following steps walk you through using filter parameters to get data on donations.
Optional parameters to filter the results include campaign_id, user_id, start_date, and
end_date.
2. Click Sandbox to display the form for entering values and trying requests.
4. The Response Body contains a JSON array of Donation Objects that includes all
donations. The following image shows a few of these results. Note the following:
The following steps walk you through using filter parameters to get data on users.
1. Click the GET /api/users/ method.
2. Click Sandbox to display the form for entering values and trying requests.
3. Note there are a great number of optional parameters available to filter the results.
5. The Response Body contains a JSON array of user objects where the approved
field value is 0.
6. The next request filters for all approved users that are not enabled.
You can create new users in the system and give them the appropriate access. This is
because you have access to more than just the information provided by the 360Alumni
GUI and you can perform complex operations such as approving users when they are
created.
1. Create a New User with POST /api/users/
2. Get an Array of User Records with GET /api/users/
3. Get a Specific User's Record with GET /api/users/{id}
4. Update a User Record with PUT /api/users/{id}
Note that the user_id field uniquely identifies a user. Make a note of this value to use
for identifying the user in later examples.
Note: If the response header is "400 Bad Request" try sending the request as a JSON
through the Content Textarea
[
...
{
...
"updatedAt": "2016-04-27 19:20:25",
"user_id": 1196,
"user_timezone": null,
...
},
{
...
"updatedAt": "2016-08-09 18:28:03",
"user_id": 234063,
"user_timezone": null,
...
}
{
"about": null,
"activated_at": null,
"admin_notes": null,
"approved": 1,
...
]
3. The single User Object is returned. Copy and save the JSON object from the
Response Body to use in the next example.
A User Object
[
{
"about": "New description of this user in the about field.",
"activated_at": "2016-06-22 01:07:19",
"admin_notes": null,
"approved": 1,
"bad_email": 0,
"client_id": 5,
1. Copy the JSON user object from the response in the previous example into an
editor and change a few field values.
2. Click the PUT /api/users/{id} method. The required parameter is the user_id.
3. Click Sandbox to display the form for entering information and trying the request.
a. A JSON user object is required for the content. Copy your changed JSON
user object into the Contentfield on the form.
b. Set the content type.
c. Enter the Content-Type as application/json and click Set header.
d. Enter your API key in another HTTP request header.
e. Click New header and enter x-api-key and your API key value.
f. Enter a value for the id parameter.
g. Click Try! to execute the API request.
If the request is successful the Response Body indicates the user record was updated.
Response body