<?xml version="1.0" encoding="UTF-8"?>
<entries type="array" count="3">
  <entry>
    <body>&lt;p&gt;&lt;span style=&quot;line-height: normal;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; color: #333333; line-height: 1.4em; clear: left; font-size: 1em; text-align: left;&quot;&gt;&lt;strong style=&quot;color:red&quot;&gt;The Donor Tools API is a beta product and is subject to the&amp;nbsp;&lt;a href=&quot;http://www.donortools.com/about/api_license&quot;&gt;API License Agreement&lt;/a&gt;.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Beta&lt;/h1&gt;
&lt;p&gt;The&amp;nbsp;Donor Tools API is a beta program. This means that it's available and functional, but it may not be complete. You may encounter errors or missing features.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Example App&lt;/h1&gt;
&lt;p&gt;Check out our dead-simple example app on Github:&amp;nbsp;&lt;a href=&quot;http://github.com/artofmission/Donor-Tools-Consumer/&quot;&gt;http://github.com/artofmission/Donor-Tools-Consumer/&lt;/a&gt;.&amp;nbsp;The example app might &amp;nbsp;give you some ideas about how you can interact with our API.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;REST&lt;/h1&gt;
&lt;p&gt;The Donor Tools API uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Representational_State_Transfer&quot;&gt;REST&lt;/a&gt;&amp;nbsp;exclusively.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Authentication&lt;/h1&gt;
&lt;p&gt;Donor Tools uses HTTP Basic authentication.&amp;nbsp;Every request must include the Authorization HTTP header.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;API User&lt;/h2&gt;
&lt;p&gt;You'll need to sign up for a Donor Tools account in order to use the API. If you don't already have a Donor Tools account, you can get one by going to &lt;a href=&quot;http://www.donortools.com/signup&quot;&gt;www.donortools.com/signup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Donor Tools' auditing feature logs each and every action for your account. Thus, if you provide your own username and password for the API (not recommended), all actions through the API will appear as being committed by you. We recommend creating a separate API user to provide finer grained reporting detail. This technique also helps protect your personal authentication parameters, as you can provide a different username and password.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;pre&gt;curl&#160;-u my-user@example.com:it2at9yags&#160;https://demo.donortools.com/donations.xml&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;SSL&lt;/h1&gt;
&lt;p&gt;All requests must be made over SSL (port 443).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Pagination&lt;/h1&gt;
&lt;p&gt;Most GET #index methods are paginated. The XML response will include pagination metadata.&amp;nbsp;You can specify the page you want very simply by passing the &lt;em&gt;page&lt;/em&gt; parameter in your request.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;pre&gt;&#160;&#160;&amp;lt;current_page type=&quot;integer&quot;&amp;gt;1&amp;lt;/current_page&amp;gt;
&#160;&#160;&amp;lt;per_page type=&quot;integer&quot;&amp;gt;100&amp;lt;/per_page&amp;gt;
&#160;&#160;&amp;lt;total_entries type=&quot;integer&quot;&amp;gt;1266&amp;lt;/total_entries&amp;gt;&lt;/pre&gt;
&lt;h3&gt;Rails &amp;amp; ActiveResource&lt;/h3&gt;
&lt;p&gt;Rails' built-in ActiveResource expects the results to return an array, but Donor Tools' API returns a collection that includes pagination metadata. We recommend using &lt;a href=&quot;http://github.com/artofmission/will_paginate/&quot;&gt;the artofmission branch of the will_paginate plugin&lt;/a&gt;, which will automatically parse the results into an ActiveResource collection object, complete with metadata.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Available Resources&lt;/h1&gt;
&lt;p&gt;Most resources are available via REST simply by attaching &quot;.xml&quot; to the URL. Try it with your web browser! For example, if you're viewing a donation at /donations/1, simply change the URL to /donations/1.xml to see the XML output in your browser.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Personas&lt;/h2&gt;
&lt;p&gt;Personas are the backbone of recordkeeping in Donor Tools. A persona can have many donations.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Donations&lt;/h2&gt;
&lt;p&gt;A donation belongs to a persona. Every donation must have one or more splits. A donation also may have one source. Each split must have one fund.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Sources describe where a donation is coming from. Sources are frequently used to represent fundraising campaigns or specific mailings.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Funds&lt;/h2&gt;
&lt;p&gt;Funds describe where a donation split is going to. Funds often correspond with an organization's programs.&amp;nbsp;&lt;/p&gt;</body>
    <created-at type="datetime">2009-05-18T16:11:42-07:00</created-at>
    <current-tags>api</current-tags>
    <forum-id type="integer">47417</forum-id>
    <hits type="integer">299</hits>
    <id type="integer">36961</id>
    <is-highlighted type="boolean">true</is-highlighted>
    <is-locked type="boolean">false</is-locked>
    <is-pinned type="boolean">false</is-pinned>
    <is-public type="boolean">true</is-public>
    <organization-id type="integer" nil="true"></organization-id>
    <position type="integer" nil="true"></position>
    <posts-count type="integer">0</posts-count>
    <replied-by type="integer">Ryan Heneise</replied-by>
    <submitter-id type="integer">54137</submitter-id>
    <title>API Introduction</title>
    <updated-at type="datetime">2009-06-25T19:27:10-07:00</updated-at>
    <posts type="array"/>
  </entry>
  <entry>
    <body>&lt;p&gt;&lt;strong style=&quot;color:red&quot;&gt;The Donor Tools API is a beta product and is subject to the &lt;a href=&quot;http://www.donortools.com/about/api_license&quot;&gt;API License Agreement&lt;/a&gt;.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Personas is a simple REST resource supporting GET, POST, PUT, and DELETE.&lt;/p&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;p&gt;&lt;span style=&quot;line-height: normal; &quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; background-color: #f1f7ee; color: #518f2a; font: normal normal normal 0.8em/normal 'Lucida Console', monospace; overflow-x: auto; &quot;&gt;curl -u &lt;a href=&quot;mailto:user@example.com&quot;&gt;user@example.com&lt;/a&gt;:useagoodpassword &lt;a href=&quot;http://demo.donortools.net/donations?range=all_dates&quot;&gt;http://demo.donortools.net/&lt;/a&gt;personas.xml&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Get All Personas&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;GET /personas.xml&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;Response&lt;/h4&gt;
&lt;pre&gt;&amp;lt;donations type=&quot;collection&quot;&amp;gt;
  &amp;lt;current_page type=&quot;integer&quot;&amp;gt;1&amp;lt;/current_page&amp;gt;
  &amp;lt;per_page type=&quot;integer&quot;&amp;gt;100&amp;lt;/per_page&amp;gt;
  &amp;lt;total_entries type=&quot;integer&quot;&amp;gt;1266&amp;lt;/total_entries&amp;gt;
  &amp;lt;donation&amp;gt;
  ...
  &amp;lt;/donation&amp;gt;
&amp;lt;/donations&amp;gt;&lt;/pre&gt;
&lt;h3&gt;Sorting&lt;/h3&gt;
&lt;p&gt;You can sort personas by passing the &quot;order&quot; parameter - for example - &quot;personas.xml?order=name&quot;. You can also pass a &quot;direction&quot; parameter, either &quot;ASC&quot; or &quot;DESC&quot;. Possible values for the &quot;order&quot; parameter are name, address, donations, most_recent_donation, email_address, company, and added.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;POST: Create a Persona&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;POST /personas.xml&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;persona&amp;gt;
  &amp;lt;name&amp;gt;Person From Webservice&amp;lt;/name&amp;gt;
  &amp;lt;organization-id type=&quot;integer&quot;&amp;gt;10001&amp;lt;/organization-id&amp;gt;
&amp;lt;/persona&amp;gt;
&lt;/pre&gt;
&lt;div&gt;&lt;span style=&quot;font-family: 'Lucida Console', monospace; color: #518f2a; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: 10px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</body>
    <created-at type="datetime">2009-05-20T14:38:53-07:00</created-at>
    <current-tags nil="true"></current-tags>
    <forum-id type="integer">47417</forum-id>
    <hits type="integer">262</hits>
    <id type="integer">37359</id>
    <is-highlighted type="boolean">false</is-highlighted>
    <is-locked type="boolean">false</is-locked>
    <is-pinned type="boolean">false</is-pinned>
    <is-public type="boolean">true</is-public>
    <organization-id type="integer" nil="true"></organization-id>
    <position type="integer" nil="true"></position>
    <posts-count type="integer">0</posts-count>
    <replied-by type="integer">Ryan Heneise</replied-by>
    <submitter-id type="integer">54137</submitter-id>
    <title>Personas API</title>
    <updated-at type="datetime">2009-07-14T09:25:08-07:00</updated-at>
    <posts type="array"/>
  </entry>
  <entry>
    <body>&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; color: #333333; line-height: 1.4em; clear: left; font-size: 1em; text-align: left;&quot;&gt;&lt;strong style=&quot;color:red&quot;&gt;The Donor Tools API is a beta product and is subject to the&amp;nbsp;&lt;a href=&quot;http://www.donortools.com/about/api_license&quot;&gt;API License Agreement&lt;/a&gt;.&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Donations is a simple REST resource supporting GET, POST, PUT, and DELETE.&lt;/p&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Amounts are always expressed in cents. So &quot;$100.00&quot; would be stored as an integer 10000.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Every donation must have at least one split.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;GET a List of Donations&lt;/h1&gt;
&lt;h4&gt;GET /donations.xml&lt;/h4&gt;
&lt;p&gt;Returns a list of recent donations.&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Example Usage&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;line-height: normal; &quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre style=&quot;margin-top: 8px; margin-right: 8px; margin-bottom: 10px; margin-left: 8px; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; color: #518f2a; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; background-color: #f1f7ee; font: normal normal normal 0.8em/normal 'Lucida Console', monospace; overflow-x: scroll; &quot;&gt;curl -u user@example.com:useagoodpassword http://demo.donortools.net/donations?range=all_dates&lt;/pre&gt;
&lt;h4&gt;Response&lt;/h4&gt;
&lt;pre&gt;&amp;lt;donations type=&quot;collection&quot;&amp;gt;
  &amp;lt;current_page type=&quot;integer&quot;&amp;gt;1&amp;lt;/current_page&amp;gt;
  &amp;lt;per_page type=&quot;integer&quot;&amp;gt;100&amp;lt;/per_page&amp;gt;
  &amp;lt;total_entries type=&quot;integer&quot;&amp;gt;1266&amp;lt;/total_entries&amp;gt;
  &amp;lt;donation&amp;gt;
    &amp;lt;splits type=&quot;array&quot;&amp;gt;
      &amp;lt;split type=&quot;DonationSplit&quot;&amp;gt;
        &amp;lt;cents type=&quot;integer&quot;&amp;gt;12500&amp;lt;/cents&amp;gt;
        ...
      &amp;lt;/split&amp;gt;
    &amp;lt;/splits&amp;gt;
  &amp;lt;/donation&amp;gt;
  ...
&amp;lt;/donations&amp;gt;
&lt;/pre&gt;
&lt;h4&gt;Parameters&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;(no parameters)&lt;/strong&gt;: Requesting /donations.xml with no parameters automatically returns donations from the current month in all funds from all sources.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;range&lt;/strong&gt;: (today|week|month|quarter|year|all_dates). Query donations in the specified range. Combine with timeframe for this or last range. You can also specify a custom date range by sending &lt;strong&gt;range[from]&lt;/strong&gt; and &lt;strong&gt;range[to]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong style=&quot;padding: 0px; margin: 0px;&quot;&gt;timeframe&lt;/strong&gt;: (this|last). Combine with range to query specific timeframes. For example this month or last month.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;fund_id&lt;/strong&gt;: Query donations in the specified fund.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;source_id&lt;/strong&gt;: Query donations from the specified source.&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;PUT: Update a Donation&lt;/h1&gt;
&lt;p&gt;&lt;span style=&quot;line-height: normal;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;h4 style=&quot;margin-top: 12px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; color: #555555; padding: 0px;&quot;&gt;PUT /donations/123.xml&lt;/h4&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;donation&amp;gt;
  &amp;lt;id type=&quot;integer&quot;&amp;gt;110172&amp;lt;/id&amp;gt;
  &amp;lt;organization-id type=&quot;integer&quot;&amp;gt;10001&amp;lt;/organization-id&amp;gt;
  &amp;lt;persona-id type=&quot;integer&quot;&amp;gt;121635&amp;lt;/persona-id&amp;gt;
  &amp;lt;source-id type=&quot;integer&quot;&amp;gt;304&amp;lt;/source-id&amp;gt;
  &amp;lt;received-date type=&quot;date&quot;&amp;gt;2009-06-11&amp;lt;/received-date&amp;gt;
  &amp;lt;donation-type-id type=&quot;integer&quot;&amp;gt;1&amp;lt;/donation-type-id&amp;gt;
  &amp;lt;memo&amp;gt;A memo about this donation&amp;lt;/memo&amp;gt;
  &amp;lt;check-number&amp;gt;1234&amp;lt;/check-number&amp;gt;
  &amp;lt;check-date&amp;gt;2009-04-24&amp;lt;/check-date&amp;gt;
  &amp;lt;cents type=&quot;integer&quot;&amp;gt;20000&amp;lt;/cents&amp;gt;
  &amp;lt;splits type=&quot;array&quot;&amp;gt;
    &amp;lt;split&amp;gt;
      &amp;lt;id type=&quot;integer&quot;&amp;gt;104573&amp;lt;/id&amp;gt;
      &amp;lt;donation-id type=&quot;integer&quot;&amp;gt;110172&amp;lt;/donation-id&amp;gt;
      &amp;lt;fund-id type=&quot;integer&quot;&amp;gt;10043&amp;lt;/fund-id&amp;gt;
      &amp;lt;cents type=&quot;integer&quot;&amp;gt;10000&amp;lt;/cents&amp;gt;
      &amp;lt;memo&amp;gt;A note about this split&amp;lt;/memo&amp;gt;
      &amp;lt;type&amp;gt;DonationSplit&amp;lt;/type&amp;gt;
    &amp;lt;/split&amp;gt;
    &amp;lt;split&amp;gt;
      &amp;lt;id type=&quot;integer&quot;&amp;gt;104574&amp;lt;/id&amp;gt;
      &amp;lt;donation-id type=&quot;integer&quot;&amp;gt;110172&amp;lt;/donation-id&amp;gt;
      &amp;lt;fund-id type=&quot;integer&quot;&amp;gt;10003&amp;lt;/fund-id&amp;gt;
      &amp;lt;cents type=&quot;integer&quot;&amp;gt;10000&amp;lt;/cents&amp;gt;
      &amp;lt;memo nil=&quot;true&quot;&amp;gt;&amp;lt;/memo&amp;gt;
      &amp;lt;type&amp;gt;DonationSplit&amp;lt;/type&amp;gt;
    &amp;lt;/split&amp;gt;
  &amp;lt;/splits&amp;gt;
&amp;lt;/donation&amp;gt;
&lt;/pre&gt;
&lt;div&gt;&lt;span style=&quot;color: #555555; font-size: 19px; font-weight: bold; &quot;&gt;POST: Create a Donation&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;POST /donations.xml&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;line-height: normal;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
&amp;lt;donation&amp;gt;
  &amp;lt;donation-type-id type=&quot;integer&quot;&amp;gt;1&amp;lt;/donation-type-id&amp;gt;
  &amp;lt;persona-id type=&quot;integer&quot;&amp;gt;121635&amp;lt;/persona-id&amp;gt;
  &amp;lt;new-split-attributes type=&quot;array&quot;&amp;gt;
    &amp;lt;new-split-attribute&amp;gt;
      &amp;lt;cents type=&quot;integer&quot;&amp;gt;1000&amp;lt;/cents&amp;gt;
      &amp;lt;fund-id type=&quot;integer&quot;&amp;gt;10043&amp;lt;/fund-id&amp;gt;
    &amp;lt;/new-split-attribute&amp;gt;
  &amp;lt;/new-split-attributes&amp;gt;
  &amp;lt;organization-id type=&quot;integer&quot;&amp;gt;10001&amp;lt;/organization-id&amp;gt;
&amp;lt;/donation&amp;gt;

&lt;/pre&gt;
&lt;div&gt;&lt;span style=&quot;color: #555555; font-size: 19px; font-weight: bold; &quot;&gt;DELETE: Delete a Donation&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;DELETE /donations/123.xml&lt;/h4&gt;</body>
    <created-at type="datetime">2009-05-18T17:27:10-07:00</created-at>
    <current-tags>api</current-tags>
    <forum-id type="integer">47417</forum-id>
    <hits type="integer">285</hits>
    <id type="integer">36980</id>
    <is-highlighted type="boolean">false</is-highlighted>
    <is-locked type="boolean">false</is-locked>
    <is-pinned type="boolean">false</is-pinned>
    <is-public type="boolean">true</is-public>
    <organization-id type="integer" nil="true"></organization-id>
    <position type="integer" nil="true"></position>
    <posts-count type="integer">0</posts-count>
    <replied-by type="integer">Ryan Heneise</replied-by>
    <submitter-id type="integer">54137</submitter-id>
    <title>Donations API</title>
    <updated-at type="datetime">2009-06-17T15:15:39-07:00</updated-at>
    <posts type="array"/>
  </entry>
</entries>
