Overview

API v1

The TidyClub API allows you to include the power of TidyClub directly into your app. The API provides methods to read and write from TidyClub securely, so your users can bring all their important information with them to your app. Any changes they make will be updated in realtime to all of their computers, tablets and mobile phones. You'll also have access to powerful features such as contacts, events, memberships, finances, tasks and more.

Why TidyClub?

The API is the easiest and most robust way to keep all aspects of your organization up to date across all devices and all of your committee. By using our API, not only will you make your app more powerful and easy to use, but you'll be broadening your audience to the people who are already using TidyClub. We're constantly improving the API and will be looking to add native development kits for the most popular mobile and web platforms to make integrating simple.

What next?

For questions about how TidyClub would work with your app, feel free to contact us.

Public and Private Data

In order to read or write private data using the TidyClub API, you will need to supply additional user-authentication tokens. This extra information lets TidyClub know who should be authorized to access private data during the request.

Whenever you provide additional user access tokens, both public and private data will be available.

For an API Method calls which is designed exclusively for private data access. and doesn't have an associated user access token the request will be rejected when trying to match user credentials.

Registration

Start by creation your application to obtain its TidyClub API credentials. That can be done by going to Organization Settings -> Applications. Your application will be assigned a Client ID and a Client Secret. Be sure to use an account with a secure password to own these credentials. The Client Secret should not be shared.

Schema

All TidyClub API requests start with https://api.tidyclub.com/v1/. All data is sent and received as JSON.

GET request. Access token sent as a parameter
$ curl -i https://api.tidyclub.com/v1/contacts?access_token=1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 5
Connection: keep-alive
Server: Apache/2.2.14

[
  {
    "id": 1,
    "first_name": "First",
    "last_name": "Last",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
]
POST request. Access token sent in a header
$ cat contact.json

{
  "first_name": "First",
  "last_name": "Last"
}
$ curl -i -X POST -H "Authorization: Bearer 1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa" -H "Content-Type: application/json" -d @contact.json https://api.tidyclub.com/v1/contacts

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 5
Connection: keep-alive
Server: Apache/2.2.14

{
  "id": 1,
  "first_name": "First",
  "last_name": "Last",
  ...
  "created_at": "2012-12-16T21:01:22Z"
}

Blank fields are included as null instead of being omitted.

All timestamps are returned in ISO 8601 format:

YYYY-MM-DDTHH:MM:SSZ

Authentication

Applications connect with TidyClub via OAuth 2.0. Read more

access token sent in a header
$ curl -H "Authorization: Bearer TOKEN" https://api.tidyclub.com/v1/contacts
access token sent as a parameter
$ curl https://api.tidyclub.com/v1/contacts?access_token=TOKEN

Pagination

Requests that return collections of resources can be paginated. Set the limit or per_page parameter. Use the offset or page parameter to browse through the pages.

Pagination information will be returned in the response header.

X-Pagination-Per-Page: 25
X-Pagination-Current-Page: 2
X-Pagination-Total-Pages: 10
X-Pagination-Total-Entries: 247

Response Codes

200 OK Success

201 Created Success

400 Bad Request Unable to parse parameters

401 Unauthorized Access token was missing or incorrect.

403 Forbidden Accessing restricted area without appropriate user privileges

404 Not Found The URI requested is invalid or the resource requested, such as a contact, does not exists.

406 Not Acceptable Returned when an invalid format is specified in the request.

422 Unprocessable Entity Sending invalid fields will result in an unprocessable entity response.

500 Internal Server Error Something is broken. Please contact us so the TidyClub team can investigate.

Authentication

Applications connect with TidyClub via OAuth 2.0. This is the way used by most major API providers. All OAuth2 requests must use the SSL and require authentication. Authenticated requests require an access_token. These tokens are unique to a user and should be stored securely. Access tokens may expire at any time in the future.

Authorization Code Flow

Authorization code is probably the most used flow. It basically consists in a exchange of a authorization token for an access token.

1. Redirect users to request TidyClub access

GET https://accounts.tidyclub.com/oauth/authorize

Parameters

client_id
Required - The client ID you received from TidyClub when you registered.
redirect_uri
Required - URL in your application where users will be sent after authorization.
response_type
Required - code
https://accounts.tidyclub.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code

2. TidyClub redirects back to your site

If the user accepts the request, TidyClub redirects back to REDIRECT_URI as a GET with a temporary code in a code parameter.

http://REDIRECT_URI?code=RETURNED_CODE

To request the access token, you should use the returned code and exchange it for a access token by doing POST request to the /oauth/token endpoint.

POST https://accounts.tidyclub.com/oauth/token

Parameters

client_id
Required - The client ID you received from TidyClub when you registered.
client_secret
Required - The client secret you received from TidyClub when you registered.
redirect_uri
Required - Application Redirect URL
code
Required - The code you received as a response to previous step.
grant_type
Required - authorization_code
$ curl -i -X POST -d "client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=RETURNED_CODE&grant_type=authorization_code&redirect_uri=REDIRECT_URI" https://accounts.tidyclub.com/oauth/token

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-store
Pragma: no-cache
Content-Length: 296
Connection: keep-alive
Server: Apache/2.2.14

{
  "access_token": "de6780bc506a0446309bd9362820ba8aed28aa506c71eedbe1c5c4f9dd350e54",
  "token_type": "bearer", 
  "expires_in": 7200,
  "refresh_token": null
}

3. Use the access token to access the API

GET https://api.tidyclub.com/v1/{resources}?access_token=TOKEN

Implicit Grant

1. Redirect users to request TidyClub access

GET https://accounts.tidyclub.com/oauth/authorize

Parameters

client_id
Required - The client ID you received from TidyClub when you registered.
redirect_uri
Required - URL in your application where users will be sent after authorization.
response_type
Required - token
https://accounts.tidyclub.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=token

2. TidyClub redirects back to your site

If the user accepts the request, TidyClub redirects back to REDIRECT_URI as a GET. Then access_token will be added to the hash fragment portion of the return URL.

http://{REDIRECT_URI}#access_token=6c91d4ca80b2ffff904fd4ccf1b0c32ee38fb04e96fee4b6ce41d45ee17fdf38&token_type=bearer&expires_in=7200

3. Use the access token to access the API

GET https://api.tidyclub.com/v1/{resources}?access_token=TOKEN

Resource Owner Password Credentials

In this flow, a token is requested in exchange for the resource owner credentials (username and password).

POST https://accounts.tidyclub.com/oauth/token

Parameters

domain_prefix
Required - Organization domain prefix.
client_id
Required - The client ID you received from TidyClub when you registered.
client_secret
Required - The client secret you received from TidyClub when you registered.
username
Required - TidyClub user's email
password
Required - TidyClub user's password
grant_type
Required - password
$ curl -i -X POST -d "domain_prefix=default&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&username=USERNAME&password=PASSWORD&grant_type=password" https://accounts.tidyclub.com/oauth/token

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-store
Pragma: no-cache
Content-Length: 296
Connection: keep-alive
Server: Apache/2.2.14

{
  "access_token": "de6780bc506a0446309bd9362820ba8aed28aa506c71eedbe1c5c4f9dd350e54",
  "token_type": "bearer", 
  "expires_in": 7200,
  "refresh_token": null
}

Use the access token to access the API
access token sent in a header
$ curl -H "Authorization: Bearer TOKEN" https://api.tidyclub.com/v1/contacts
access token sent as a parameter
$ curl https://api.tidyclub.com/v1/contacts?access_token=TOKEN

Organization

Authentication token is required.

Get organization details
GET /organization

Response

Status: 200 OK
{
  "name": "Default Club",
  "domain_prefix": "default",
  "location": null,
  "address": "Street 1",
  "city": "Perth",
  "state": "Western Australia",
  "postcode": "4242",
  "country": "Australia",
  "phone": "0123456789",
  "website": "http://website.com",
  "twitter": "default_club",
  "facebook": "default_club",
  "currency": "AUD",
  "time_zone": "Australia/Perth",
  "public_contacts": [],
  "logo_url": "https://static.tidyclub.com/assets/clubs/logos/medpng/club_logo_2.png"
}

Contacts

TidyClub contains a simple contract relationship management (CRM) system, it allows for simple managing a clubs interactions with current and future members, supporters, sponsors and other stakeholders. This method returns a list of contacts. If authentication tokens are not provided, only publicly available contact information will be returned.

Authentication token is required.

List contacts
GET /contacts
GET /groups/:group_id/contacts

Parameters

limit
Optional numerical
offset
Optional numerical
search_terms
Optional string
registered
Optional boolean true false

Response

Status: 200 OK
  [{
    "id": 1,
    "first_name": "First",
    "last_name": "Last",
    ...
    "created_at": "2012-12-16T21:01:22Z",
    "custom_fields": [
      {
        "id":"5b8ff85455e9",
        "title":"Custom checkbox field",
        "type":"boolean",
        "value":true
      },
      {
        "id":"280ada4c1dea",
        "title":"Custom dropdown field",
        "type":"dropdown",
        "value": {
          "id":"2fbd15a7ff31","title":"Option 3"
        }
      },
      {
        "id":"91288961b8d7",
        "title":"Custom date field",
        "type":"date",
        "value":"2012-01-01"
      }
    ]
  }]
Get a single contact
GET /contacts/me
GET /contacts/:id

Response

Status: 200 OK
  {
    "id": 1,
    "first_name": "First",
    "last_name": "Last",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Create a contact
POST /contacts

Parameters

first_name
Required string
last_name
Optional string
email_address
Optional string
phone_number
Optional string
address1
Optional string
city
Optional string
state
Optional string
country
Optional string
postcode
Optional string
gender
Optional string - Either female or male or undisclosed
birthday
Optional date
facebook
Optional string - Facebook account name
twitter
Optional string - Twitter account name
details
Optional text - A brief description of contact
custom_fields
Optional object – A struct of custom field IDs as keys and values.
{ custom_field_id: value, custom_dropdown_field_id: custom_dropdown_field_choice_id }

  {
    "5b8ff85455e9": true,
    "91288961b8d7": "2012-01-01",
    "280ada4c1dea": "2fbd15a7ff31" // Dropdown field id as a key, dropdown field choice id as a value. Use blank value to empty the field
  }

Response

Status: 201 Created
  {
    "id": 1,
    "first_name": "First",
    "last_name": "Last",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Update a contact
PUT /contacts/:id

Parameters

See Create a contact section. All parameters are optional.

Response

Status: 200 OK
  {
    "id": 2,
    "first_name": "First",
    "last_name": "Last",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Delete a contact
DELETE /contacts/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Custom Fields

Authentication token is required.

List custom fields
GET /custom_fields

Response

Status: 200 OK
[
  {
    "id":"76fc0695956c",
    "title":"Custom single-line text field",
    "type":"string",
    "created_at":"2015-03-26T16:12:00+08:00"
  },
  {
    "id":"331e2e7ef369",
    "title":"Custom text type field",
    "type":"text",
    "created_at":"2015-03-26T16:12:00+08:00"
  },
  {
    "id":"5b8ff85455e9",
    "title":"Custom checkbox field",
    "type":"boolean",
    "created_at":"2015-03-26T16:12:00+08:00"
  },
  {
    "id":"280ada4c1dea",
    "title":"Custom dropdown field",
    "type":"dropdown",
    "created_at":"2015-03-26T16:12:00+08:00",
    "choices": [
      {
        "id":"2ec44e02f756",
        "title":"Option 1",
        "created_at":"2015-03-26T16:12:00+08:00"
      },
      {
        "id":"5259f806909c",
        "title":"Option 2",
        "created_at":"2015-03-26T16:33:21+08:00"
      }
    ]
  },
  {
    "id":"91288961b8d7",
    "title":"Custom date field",
    "type":"date",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
]
Get a single custom field
GET /custom_fields/:id

Response

Status: 200 OK
  {
    "id":"5b8ff85455e9",
    "title":"Custom checkbox field",
    "type":"boolean",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Create a custom field
POST /custom_fields

Parameters

title
Required string
type
Required string string text dropdown boolean date

Response

Status: 201 Created
  {
    "id":"91288961b8d7",
    "title":"Custom date field",
    "type":"date",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Update a custom field
PUT /custom_fields/:id

Parameters

See Create a custom field section. All parameters are optional.

Response

Status: 200 OK
  {
    "id":"76fc0695956c",
    "title":"Custom single-line text field",
    "type":"string",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Delete a custom field
DELETE /custom_fields/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }



Custom Dropdown Field Choices

List custom dropdown field choices
GET /custom_fields/:custom_field_id/choices

Response

Status: 200 OK
  [
    {
      "id":"2ec44e02f756",
      "title":"Option 1",
      "created_at":"2015-03-26T16:12:00+08:00"
    },
    {
      "id":"5259f806909c",
      "title":"Option 2",
      "created_at":"2015-03-26T16:33:21+08:00"
    }
  ]
Get a single custom dropdown field choice
GET /custom_fields/:custom_field_id/choice/:id

Response

Status: 200 OK
  {
    "id":"2ec44e02f756",
    "title":"Option 1",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Create a custom dropdown field choice
POST /custom_fields/:custom_field_id/choices

Parameters

title
Required string

Response

Status: 201 Created
  {
    "id":"2ec44e02f756",
    "title":"Option 1",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Update a custom dropdown field choice
PUT /custom_fields/:custom_field_id/choices/:id

Parameters

See Create a custom dropdown field choice section. All parameters are optional.

Response

Status: 200 OK
  {
    "id":"2ec44e02f756",
    "title":"Option 1",
    "created_at":"2015-03-26T16:12:00+08:00"
  }
Delete a custom dropdown field choice
DELETE /custom_fields/:custom_field_id/choices/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Groups

TidyClubs CRM allows for grouping of contacts. This is to makes communication, invoicing, and sending invitations to a custom collection of contacts easy. This method returns Group ID information.

Authentication token is required.

List groups
GET /groups
GET /contacts/:contact_id/groups

Parameters

limit
Optional numerical
offset
Optional numerical
search_terms
Optional string

Response

Status: 200 OK
  [
    {
      "id": 1,
      "label": "Group",
      "description": "Some text",
      ...
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
Get a single group
GET /groups/:id

Response

Status: 200 OK
  {
    "id": 1,
    "label": "Group",
    "description": "Some text",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Create a group
POST /groups

Parameters

label
Required string
description
Optional string

Response

Status: 201 Created
  {
    "id": 1,
    "label": "Group",
    "description": "Some text",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Update a group
PUT /groups/:id

Parameters

See Create a group section. All parameters are optional.

Response

Status: 200 OK
  {
    "id": 1,
    "label": "Group",
    "description": "Some text",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Delete a group
DELETE /groups/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }
Add Contact to Group
PUT /groups/:group_id/contacts/:contact_id

Response

Status: 204 No Content
Delete Contact from Group
DELETE /groups/:group_id/contacts/:contact_id

Response

Status: 204 No Content

Membership Levels

Authentication token is required.

List membership levels
GET /membership_levels

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
[
  {
    "id": 1,
    "name": "Individual (rolling 3 months)",
    "description": "",
    "duration": 3,
    "unit_period": "month",
    "fixed": false,
    "start_at": null,
    "enabled": false,
    "active_since": null,
    "amount": "2.0",
    "bundle": false,
    "deleted": false,
    "created_at": "2015-07-15T18:11:00+08:00"
  }
]
Get a single membership level
GET /membership_levels/:id

Response

Status: 200 OK
  {
    "id": 2,
    "name": "Family (rolling 1 year)",
    "description": "",
    "duration": 1,
    "unit_period": "year",
    "fixed": false,
    "start_at": null,
    "enabled": true,
    "active_since": "2015-07-14",
    "amount": "0.0",
    "bundle": true,
    "bundle_amounts": [{
        "amount": "0.0",
        "subsequent": false,
        "type": "adult"
      },
      {
        "amount": "5.0",
        "subsequent": false,
        "type": "adult"
      },
      {
        "amount": "20.0",
        "subsequent": false,
        "type": "child"
      },
      {
        "amount": "10.0",
        "subsequent": true,
        "type": "child"
    }],
    "deleted": false,
    "created_at": "2015-07-15T18:53:01+08:00"
  }

Memberships

Authentication token is required.

List memberships
GET /memberships
GET /contacts/:contact_id/memberships
GET /membership_levels/:membership_level_id/memberships

Parameters

limit
Optional numerical
offset
Optional numerical
active
Optional boolean true false

Response

Status: 200 OK
  [
    {
      "id": 1,
      "start_date": "2012-12-16T21:01:22Z",
      "end_date": "2013-12-16T21:01:22Z",
      "contact_id": 1,
      "membership_level_id": 1,
      "state": "activated",
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
Get a single membership
GET /memberships/:id

Response

Status: 200 OK
  {
    "id": 1,
    "start_date": "2012-12-16T21:01:22Z",
    "end_date": "2013-12-16T21:01:22Z",
    "contact_id": 1,
    "membership_level_id": 1,
    "state": "expired",
    "created_at": "2012-12-16T21:01:22Z"
  }

Emails

You can create and send emails from TidyClub. This allows the organization to keep a record of the communication that has been sent and by who. This method allows the drafting of a new email and displaying of a sent email.

Authentication token is required.

List emails
GET /emails

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
  [
    {
      "id": "76fc0695956c",
      "subject": "Subject",
      "body": "Body text",
      ...
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
Get a single email
GET /emails/:id

Response

Status: 200 OK
  {
    "id": "76fc0695956c",
    "subject": "Subject",
    "body": "Body text",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Create an email
POST /emails

Parameters

subject
Required string
body
Required string
contacts
Required array An array of contact ids [1, 2, 3]

Response

Status: 201 Created

Meetings

TidyClub keeps a track of all of your meetings, including who attended, who was an apology, what topics were discussed.

Authentication token is required.

List meetings
GET /meetings

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
  [
    {
      "id":1,
      "name":"Meeting",
      "body":"Body text",
      "date":"2013-01-31T00:00:00Z",
      "location":"Perth",
      "topics":[
        {
          "owner_id":7,
          "title":"Topic 1",
          "date":"2013-01-31",
          "category":"TODO",
          "task": {
            "id":1,
            "title":"Task",
            "description":null,
            "due_date":"2013-01-30T22:00:00Z",
            "created_at":"2013-01-04T02:16:17Z"
          }
        },
        {
          "owner_id":7,
          "title":"Topic 2",
          "date":"2013-01-31",
          "category":"DECISION",
          "task":null
        }
      ],
      "attendees":[7],
      "apologies":[7],
      "minute_takers":[7]
      "public":false,
      "created_at":"2013-01-03T13:53:57Z",
    }
  ]

Events

Running an event gets even better with TidyClub as we sync all event information across our CRM, communication archive and also keep a track of payments from your attendees. Through the TidyClub API you can view, create, update or delete an event so you can sync it in even more places.

These methods returns the identified event resource along with location, start time and end time objects.

Authentication token is required.

List events
GET /events

Parameters

limit
Optional numerical
offset
Optional numerical
start_at
Optional timestamp in ISO 8601 format
end_at
Optional timestamp in ISO 8601 format
public
Optional boolean true false

Response

Status: 200 OK
  [
    {
      "id": 1,
      "name": "Event",
      "location": "Perth",
      ...
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
Get a single event
GET /events/:id

Response

Status: 200 OK
  {
    "id": 1,
    "name": "Event",
    "location": "Perth",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Create an event
POST /events

Parameters

name
Required string
location
Optional string
start_at
Required datetime
end_at
Optional datetime
body
Optional text - A brief description of event
archived
Optional boolean - Archiving your event means that it will no longer show on the public facing events page
hidden
Optional boolean - Hidden events aren't shown on the public facing events page and Admin Dashboard. You are still able to by tickets from hidden event using the API. When buying a ticket from hidden event email with certificates and receipts will not be sent.

Response

Status: 201 Created
  {
    "id": 1,
    "name": "Event",
    "location": "Perth",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Update an event
PUT /events/:id

Parameters

See Create an event section. All parameters are optional.

Response

Status: 200 OK
  {
    "id": 1,
    "name": "Event",
    "location": "Perth",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Delete an event
DELETE /events/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Tickets

Event Tickets are purchased by an organization supporter who plans on attending an event. This method creates new ticket types for an event, returning the ID of the newly created ticket type. When a ticket is purchased a new attendee record is made.

Authentication token is not required.

List tickets
GET /events/:event_id/tickets

Response

Status: 200 OK
  [
    {
      "id": "c17a437d2a71",
      "name": "For Members",
      "amount": "10.0",
      ...
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
List tickets sold
GET /events/:event_id/tickets/sold

Response

Status: 200 OK
  [
    {
      "contact_id": 1,
      "ticket_id": "c17a437d2a71",
      "created_at": "2012-12-16T21:01:22Z",
      "code": "a07da838e43da438634e5c09"
    }
  ]
Get a single ticket
GET /events/:event_id/tickets

Response

Status: 200 OK
  {
    "id": "c17a437d2a71",
    "name": "For Members",
    "amount": "10.0",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Create a ticket
POST /events/:event_id/tickets

Parameters

name
Required string
amount
Optional decimal - The default is 0.0 , so leaving this out or setting it to zero would mean free ticket type.
initial_quantity
Optional numerical - The default is null which means unlimited tickets count. Must be greater than or equal to 1.
maximum_purchase
Optional numerical - The default is 5 . Must be greater than or equal to 1.
sales_end
Optional datetime

Response

Status: 201 Created
  {
    "id": "c17a437d2a71",
    "name": "For Members",
    "amount": "10.0",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Update a ticket
PUT /events/:event_id/tickets/:id

Parameters

See Create a ticket section. All parameters are optional.

Response

Status: 200 OK
  {
    "id": "c17a437d2a71",
    "name": "For Members",
    "amount": "10.0",
    ...
    "created_at": "2012-12-16T21:01:22Z"
  }
Delete a ticket
DELETE /events/:event_id/tickets/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Categories

Authentication token is required.

TidyClub allows for categories for payments. For example when a payment is made for a bag of apples this payment can be placed in the Category 'Food'. This allows the User to better track total expenditure of certain types over the course of a year. This method returns the name of the Category and Current Balance of the entire Category.

List categories
GET /categories

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
  [
    {
      "id":1,
      "name":"Administration",
      "description":"Category description text here",
      "balance":{"AUD":-20.0,"USD":42.0},
      "created_at":"2013-01-03T13:53:57Z",
    }
  ]

Tasks

TidyClub has a powerful Tasks function that makes sure everyone in the organization is doing their bit, and those on the committee can keep track of what is outstanding. TidyClub allows viewing, posting, updating and deleting of a Task.

Returns Title, Description, Due Date and which Contact the Task has been assigned to.

Authentication token is required.

List tasks
GET /tasks
GET /contacts/:contact_id/tasks

Parameters

limit
Optional numerical
offset
Optional numerical
completed
Optional boolean true false

Response

Status: 200 OK
  [
    {
      "id": 1,
      "title": "Task title",
      "description": "Task description text",
      "contact_id": 1,
      "category_id": 1,
      "due_date": "2013-12-16"
      "created_at": "2012-12-16T21:01:22Z"
    }
  ]
Get a single task
GET /tasks/:id

Response

Status: 200 OK
  {
    "id": 1,
    "title": "Task title",
    "description": "Task description text",
    "contact_id": 1,
    "category_id": 1,
    "due_date": "2013-12-16"
    "created_at": "2012-12-16T21:01:22Z"
  }
Create a task
POST /tasks

Parameters

title
Required string
description
Optional string
due_date
Required date
contact_id
Required integer id of contact the task will be assigned to
category_id
Required integer

Response

Status: 201 Created
  {
    "id": 1,
    "title": "Task title",
    "description": "Task description text",
    "contact_id": 1,
    "category_id": 1,
    "due_date": "2013-12-16"
    "created_at": "2012-12-16T21:01:22Z"
  }
Update a task
PUT /tasks/:id

Parameters

See Create a task section.

Response

Status: 200 OK
  {
    "id": 1,
    "title": "Task title",
    "description": "Task description text",
    "contact_id": 1,
    "category_id": 1,
    "due_date": "2013-12-16"
    "created_at": "2012-12-16T21:01:22Z"
  }
Delete a task
DELETE /tasks/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Invoices

TidyClub allows a Authenticated User to send an Invoice to a Contact for future payment. Invoice details include Invoice Name, Description, Invoice Amount, Date the Invoice is due, Category, and which Contact the Invoice is being sent to.

Authentication token is required.

List invoices
GET /invoices

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
[
  {
    "id": "4eeb3ac8ede1",
    "ref_no": "42",
    "contact_id": 227,
    "type": "invoice",
    "name": "Invoice Ref.No 42",
    "description": null,
    "due_date": "2014-08-01",
    "category_id":9,
    "amount": 409.14,
    "amount_paid": 0.0,
    "amount_due": 409.14,
    "paid": false,
    "payments": []
  },
  {
    "id": "91892af259e9",
    "ref_no": "43",
    "contact_id": 206,
    "type": "invoice",
    "name": "Invoice Ref.No 43",
    "description": null,
    "due_date": "2014-07-19",
    "category_id":9,
    "amount": 721.65,
    "amount_paid": 700.0,
    "amount_due": 21.65,
    "paid": false,
    "payments": [
      {
        "id":"5b1cc25e95d6",
        "amount":340.0,
        "type":"other",
        "paid_at":"2015-07-05T14:35:00Z"
      },
      {
        "id":"7a0d54702ce9",
        "amount":360.0,
        "type":"cash",
        "paid_at":"2015-07-06T14:35:00Z"
      }
    ]
  },
  {
    "id": "001c1ca97c04",
    "ref_no": "44",
    "contact_id": 207,
    "type": "invoice",
    "name": "Invoice Ref.No 44",
    "description": null,
    "due_date": "2014-08-19",
    "category_id":9,
    "amount": 359.17,
    "amount_paid": 359.17,
    "amount_due": 0.0,
    "paid": true,
    "payments": [
      {
        "id":"5de94837d348",
        "amount":359.17,
        "type":"cheque",
        "paid_at":"2015-07-05T14:35:00Z"
      }
    ]
  }
]
Get a single invoice
GET /invoices/:id

Response

Status: 200 OK
  {
    "id": "001c1ca97c04",
    "ref_no": "44",
    "contact_id": 207,
    "type": "invoice",
    "name": "Invoice Ref.No 44",
    "description": null,
    "due_date": "2014-08-19",
    "category_id":9,
    "amount": 359.17,
    "amount_paid": 359.17,
    "amount_due": 0.0,
    "paid": true,
    "payments": [
      {
        "id":"5de94837d348",
        "amount":359.17,
        "type":"cheque",
        "paid_at":"2015-07-05T14:35:00Z"
      }
    ]
  }
Create an invoice
POST /invoices

Parameters

name
Required string
description
Optional string
amount
Required decimal
currency
Optional string
due_date
Required datetime
category_id
Required integer
contact_id
Required integer

Response

Status: 201 Created
Add Payment
POST /invoices/:id/payments

Parameters

amount
Optional decimal
payment_type
Optional string cash card cheque bank other
date
Optional datetime

Response

Status: 201 Created
Delete an invoice
DELETE /invoices/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Deposits

TidyClub allows a Authenticated User to record a Deposit next to a Contact for payment. Deposit details include Deposit Name, Description, Deposit Amount, Date the Deposit was paid, Category, and which Contact the Deposit was made by.

Authentication token is required.

List deposits
GET /deposits

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
[
  {
    "id":"0fe0bc5db4dd",
    "ref_no":"736",
    "contact_id":10789,
    "type":"deposit",
    "name":"Deposit of $10",
    "description":null,
    "category_id":9,
    "currency":"AUD",
    "amount":10.0,
    "payments":[
      {
        "id":"909612847079",
        "amount":10.0,
        "type":"cheque",
        "paid_at":"2015-05-20T18:44:13Z"
      }
    ]
  }
]
Get a single deposit
GET /deposits/:id

Response

Status: 200 OK
  {
    "id":"0fe0bc5db4dd",
    "ref_no":"736",
    "contact_id":10789,
    "type":"deposit",
    "name":"Deposit of $10",
    "description":null,
    "category_id":9,
    "currency":"AUD",
    "amount":10.0,
    "payments":[
      {
        "id":"909612847079",
        "amount":10.0,
        "type":"cheque",
        "paid_at":"2015-05-20T18:44:13Z"
      }
    ]
  }
Create a deposit
POST /deposits

Parameters

name
Required string
description
Optional string
amount
Required decimal
currency
Optional string
paid_date
Optional datetime
payment_type
Optional string cash card cheque bank other
category_id
Required integer
contact_id
Required integer

Response

Status: 201 Created

Expenses

TidyClub allows a Authenticated User to record an Expense next to a Contact for payment that has been from the organization. Expense details include Expense Name, Description, Expense Amount, Date the Expense is due, Category, and which Contact the Expense came from.

Authentication token is required.

List expenses
GET /expenses

Parameters

limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
[
  {
    "id": "4eeb3ac8ede1",
    "ref_no": "42",
    "contact_id": 227,
    "type": "expense",
    "name": "Expense Ref.No 42",
    "description": null,
    "due_date": "2014-08-01",
    "category_id":9,
    "amount": 409.14,
    "amount_paid": 0.0,
    "amount_due": 409.14,
    "paid": false,
    "payments": []
  },
  {
    "id": "91892af259e9",
    "ref_no": "43",
    "contact_id": 206,
    "type": "expense",
    "name": "Expense Ref.No 43",
    "description": null,
    "due_date": "2014-07-19",
    "category_id":9,
    "amount": 721.65,
    "amount_paid": 700.0,
    "amount_due": 21.65,
    "paid": false,
    "payments": [
      {
        "id":"5b1cc25e95d6",
        "amount":340.0,
        "type":"other",
        "paid_at":"2015-07-05T14:35:00Z"
      },
      {
        "id":"7a0d54702ce9",
        "amount":360.0,
        "type":"cash",
        "paid_at":"2015-07-06T14:35:00Z"
      }
    ]
  },
  {
    "id": "001c1ca97c04",
    "ref_no": "44",
    "contact_id": 207,
    "type": "expense",
    "name": "Expense Ref.No 44",
    "description": null,
    "due_date": "2014-08-19",
    "category_id":9,
    "amount": 359.17,
    "amount_paid": 359.17,
    "amount_due": 0.0,
    "paid": true,
    "payments": [
      {
        "id":"5de94837d348",
        "amount":359.17,
        "type":"cheque",
        "paid_at":"2015-07-05T14:35:00Z"
      }
    ]
  }
]
Get a single expense
GET /expenses/:id

Response

Status: 200 OK
{
  "id": "001c1ca97c04",
  "ref_no": "44",
  "contact_id": 207,
  "type": "expense",
  "name": "Expense Ref.No 44",
  "description": null,
  "due_date": "2014-08-19",
  "category_id":9,
  "amount": 359.17,
  "amount_paid": 359.17,
  "amount_due": 0.0,
  "paid": true,
  "payments": [
    {
      "id":"5de94837d348",
      "amount":359.17,
      "type":"cheque",
      "paid_at":"2015-07-05T14:35:00Z"
    }
  ]
}
Create an expense
POST /expenses

Parameters

name
Required string
description
Optional string
amount
Required decimal
currency
Optional string
due_date
Required datetime
category_id
Required integer
contact_id
Required integer

Response

Status: 201 Created
Add Payment
POST /expenses/:id/payments

Parameters

amount
Optional decimal
payment_type
Optional string cash card cheque bank other
date
Optional datetime

Response

Status: 201 Created
Delete an expense
DELETE /expenses/:id

Response

Status: 200 OK
  {
    "message": "Successful"
  }

Transactions

List transactions
GET /transactions

Parameters

start_date
Optional datetime
end_date
Optional datetime
limit
Optional numerical
offset
Optional numerical

Response

Status: 200 OK
[
  {
    "id": "bd2398135231",
    "category_id": 9,
    "category_name": "Event",
    "currency": "AUD",
    "paid_at": "2015-07-21T05:47:00Z",
    "contact_id": 1,
    "contact_name": "Cathrine Funk",
    "payment_type": "other",
    "surcharge": false,
    "amount": 10.0,
    "total": 10.0,
    "fee": 0.0
  },
  {
    "id": "159ef582313c",
    "category_id": 10,
    "category_name": "Food",
    "currency": "AUD",
    "paid_at": "2015-07-20T18:44:13Z",
    "contact_id": 1,
    "contact_name": "Cathrine Funk",
    "payment_type": "stripe",
    "surcharge": false,
    "amount": 108.05,
    "total": 110.0,
    "fee": 1.95
  },
  {
    "id": "7d104d1cc1c3",
    "category_id": 9,
    "category_name": "Event",
    "currency": "USD",
    "paid_at": "2015-07-20T18:44:13Z",
    "contact_id": 1,
    "contact_name": "Cathrine Funk",
    "payment_type": "paypaladaptive",
    "surcharge": true,
    "amount": 260.0,
    "total": 264.2,
    "fee": 4.2
  }
]
Get a single transaction
GET /transactions/:id

Response

Status: 200 OK
{
  "id": "159ef582313c",
  "category_id": 10,
  "category_name": "Food",
  "currency": "AUD",
  "paid_at": "2015-07-20T18:44:13Z",
  "contact_id": 1,
  "contact_name": "Cathrine Funk",
  "payment_type": "stripe",
  "surcharge": false,
  "amount": 108.05,
  "total": 110.0,
  "fee": 1.95
}

Users

Authentication token is required.

Create new user
POST /users
  {
    "first_name": "First Name",
    "last_name": "Last Name",
    "email": "email@email.com",
    "password": "secret"
  }

Parameters

first_name
Required string
last_name
Required string
email
Required string
password
Required string

Response

Status: 201 Created
  {
    "contact_id":1,
    "created_at":"2012-12-16T21:01:22Z"
  }