API documentation


Authentication


  1. Generate an access token here.
  2. In every API method add it as an access_token query parameter.

Clients


GET /api/clients.json


Returns the list of clients and their projects.


Query string parameters:

  • active: true or false to filter clients by active status

Samples response:

[{
  "id": 4,
  "name": "Client ACME",
  "active": true,
  "projects": [
    {
      "id": 5
      "name": "Project ACME",
      "active": true
    }
  ]
}]

Entries


GET /api/entries.json


Returns a list of work entries.


Query string parameters:

  • client: one or more client ids to filter by, separated by comma
  • project: one or more project ids to filter by, separated by comma
  • worker: one or more worker ids to filter by, separated by comma
  • billable_status: one or more billable statuses to filter by, separated by comma. Valid values: no_status, billable, billed, non_billable.
  • record: one or more records (keywords) to filter by, separated by comma. Results that start with any of the given words will be included (think: SQL LIKE 'record%').
  • since: a date to only return entries from that point in time
  • until: a date to only return entries until that point in time

Samples response:

[{
  "id": 405092,
  "worker_id": 212,
  "record": "task1: subtask",
  "worked_at": "2014-12-01",
  "hours": 7.64,
  "client_id": 4,
  "project_id": 450,
  "billable_status": "billed"
}]

Entries / sum


GET /api/entries/sum.json


Returns the total amount of hours of the filtered entries.


Query string parameters:

  • client: one or more client ids to filter by, separated by comma
  • project: one or more project ids to filter by, separated by comma
  • worker: one or more worker ids to filter by, separated by comma
  • billable_status: one or more billable statuses to filter by, separated by comma. Valid values: no_status, billable, billed, non_billable.
  • record: one or more records (keywords) to filter by, separated by comma. Results that start with any of the given words will be included (think: SQL LIKE 'record%').
  • since: a date to only return entries from that point in time
  • until: a date to only return entries until that point in time

Samples response:

254.78

Entries / mark as billed


POST /api/entries/mark_as_billed.json


Marks a set of entries as billed.


Query string parameters:

  • client: (required) one or more client ids to filter by, separated by comma
  • since: (required) a date to only return entries from that point in time
  • until: (required) a date to only return entries until that point in time
  • project: one or more project ids to filter by, separated by comma
  • worker: one or more worker ids to filter by, separated by comma
  • billable_status: one or more billable statuses to filter by, separated by comma. Valid values: no_status, billable, billed, non_billable.
  • record: one or more records (keywords) to filter by, separated by comma. Results that start with any of the given words will be included (think: SQL LIKE 'record%').

Holidays


GET /api/holidays.json


Returns the list of holidays.


Query string parameters:

  • kind: one or more kinds to filter by, separated by comma. Valid values: holiday, vacations, days_off.
  • worker: one or more worker ids to filter by, separated by comma
  • since: a date to only return holidays from that point in time
  • until: a date to only return holidays until that point in time

Samples response:

[{
  "id": 21,
  "worker_id": 8,
  "kind": "days_off",
  "from": "2014-01-02",
  "to": "2014-01-03",
  "description": "Sick"
}]

Keywords


GET /api/keywords.csv

GET /api/keywords.json


Returns the list of keywords.


Samples response:

Keyword,Budget,Start,End,Actual,Expected end,Billable
task1,65,2014-08-01,,68,2015-02-03,No
task2,750,2012-09-01,2012-10-01,688,2015-05-03,Yes
[
  {
    "keyword": "task1",
    "budget": 65,
    "start": "2014-08-01",
    "end": null,
    "actual": 68,
    "expected_end": "2015-02-03",
    "billable": false,
  },
  {
    "keyword": "task2",
    "budget": 750,
    "start": "2012-09-01",
    "end": "2012-10-01",
    "actual": 688,
    "expected_end": "2015-05-03",
    "billable": true,
  },
]

Workers


GET /api/workers.json


Returns the list of workers.


Query string parameters:

  • active: true or false to filter by active status
  • admin: true or false to filter by admin status
  • suspended: true or false to filter by suspended status

Samples response:

[{
  "id": 123,
  "email": "john@doe.com",
  "name": "John Doe",
  "hours_per_day": 8,
  "active": true,
  "admin": true,
  "suspended": false
}]