API Documentation (V1)

The Tiltify API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs. JSON will be returned in all API responses, including errors.

API Endpoint

https://tiltify.com/api/v1/

Authentication

You authenticate to the Tiltify API by providing one of your API keys in the request. Your API key should only be known by you, so be sure to keep it secret!

Authentication to the API occurs using an access token. 

All API requests must be made over HTTPS.

curl https://tiltify.com/api/v1/<request> -H 'Authorization: Token token="<API Key>"'

curl uses the -H flag to allow for custom headers.

A sample test API key has been provided so you can test out an example right away. 

Errors

Tiltify uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information.

HTTP Status Code Summary

  • 200 OK - Everything worked as expected.
  • 401 Bad Credentials - No valid API key provided.
  • 404 Bad Path – Path does not exist.

Versioning

When we make backwards-incompatible changes to the API, we release new versions.  This will allow you to continue to use the prior version.


Campaign

Retrieve detail information and all donations regarding a Campaign.  A unique key is generated for each campaign.  The API Key can be found on the Campaign Edit page under Streaming Media.  Use this KEY to access campaign and donation data.  Below is the curl call to access the campaign detail. 

curl https://tiltify.com/api/v1/campaign -H 'Authorization: Token token="<API_KEY>"'


JSON will be returned in all responses. The campaign and child donations are described below:

The campaign object

Attributes

owner

string

Username or Team Name of the campaign owner.

mission

string

Name of the Mission being supported.

campaign

string

Name of the Campaign.

charity

string

Name of the Charity being supported.

goal

string

Total amount the campaign wants to raise.

total_raised

string

Total amount the campaign has raised.

percent_raised

string

Percent of the Total Raised. (total_raised/goal)

top_donor

string

Name of the campaign top donor.

starts

date/time

Date/Time the campaign starts.

ends

date/time

Date/Time the campaign ends.

currency_code

string

Currency Type.

donations

array

Donation object of all donations associated with the Campaign.

The donation hash (child parameters)

Attributes

name

string

Name of the donor. Anonymous is returned if the donor wished to remain anonymous.

comment

string

Comment from the donor.

amount

string

Amount donated.

currency_code

string

Currency Type.

created

date/time

Date/Time the donation was created.

Test Data


In order to develop against this API, we supply you a set of live test data.

From a terminal you can enter the following curl:

Input

curl https://tiltify.com/api_test/v1/campaign -H 'Authorization: Token token="test_479c924413fe9168952891e9a36"'

And the API will return:

Output

{
  "owner":"Tilty",
  "mission":"A Perfect Mission",
  "campaign":"My Awesome Campaign",
  "cause":"A Great Cause",
  "goal":"6000.00",
  "total_raised":"$890.00",
  "percent_raised":"30%",
  "top_donor":"Mickey",
  "top_donor_amount":"$730.00",
  "starts":"09/16 12:45PM",
  "ends":"09/30 02:00PM",
  "currency_code":"USD",
  "donations":
  [
    { 
      "name":"Mickey", 
      "comment":"Awesome game!!", 
      "amount":"730.00", 
      "created":"2014-09-17 16:06:21 -0400",
      "currency_code":"USD"
    },
    { "name":"Anonymous", 
      "comment":null, 
      "amount":"50.00", 
      "created":"2014-09-17 20:22:47 -0400",
      "currency_code":"USD"
    },
    { 
      "name":"Anonymous", 
      "comment":null, 
      "amount":"100.00", 
      "created":"2014-09-17 20:51:12 -0400",
      "currency_code":"USD"
    },
    { 
      "name":"Anonymous", 
      "comment":null, 
      "amount":"10.00", 
      "created":"2014-09-18 15:20:42 - 400",
      "currency_code":"USD"
    }
  ]
}

Questions

If you have any problem or questions please feel free to reach out to us at: support@tiltify.com

Feedback and Knowledge Base