Current User

Freckle is now Noko! Learn how to migrate your apps here

Get the Current User

GET /current_user/

Response

Status: 200 OK
{
  "id": 5538,
  "email": "john.test@test.com",
  "first_name": "John",
  "last_name": "Test",
  "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
  "url": "https://api.nokotime.com/v2/users/5538",
  "state": "active",
  "role": "leader",
  "entries": 0,
  "entries_url": "https://api.nokotime.com/v2/users/5538/entries",
  "expenses": 0,
  "expenses_url": "https://api.nokotime.com/v2/users/5538/expenses",
  "time_format": "fraction",
  "week_start": "Sunday",
  "utc_offset": -28800,
  "send_personal_weekly_report_email": true,
  "send_team_weekly_report_email": true,
  "created_at": "2010-06-09T20:44:57Z",
  "updated_at": "2010-06-09T20:44:57Z"
}

Get the Current User’s Entries

GET /current_user/entries

Parameters

You can use the parameters specified in the Entry API’s List Action to further limit the results

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/current_user/entries?page=2>; rel="next",
 <https://api.nokotime.com/v2/current_user/entries?page=5>; rel="last"
{
  "id": 1,
  "date": "2012-01-09",
  "user": {
    "id": 5538,
    "email": "john.test@test.com",
    "first_name": "John",
    "last_name": "Test",
    "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
    "url": "https://api.nokotime.com/v2/users/5538"
  },
  "billable": true,
  "minutes": 60,
  "description": "noko",
  "project": {
    "id": 37396,
    "name": "Gear GmbH",
    "billing_increment": 10,
    "enabled": true,
    "billable": true,
    "color": "#ff9898",
    "url": "https://api.nokotime.com/v2/projects/37396"
  },
  "tags": [
    {
      "id": 249397,
      "name": "noko",
      "billable": true,
      "formatted_name": "#noko",
      "url": "https://api.nokotime.com/v2/tags/249397"
    }
  ],
  "source_url": "http://someapp.com/special/url/",
  "invoiced_at": "2012-01-10T08:33:29Z",
  "invoice": {
    "id": 12345678,
    "reference": "AA001",
    "invoice_date": "2013-07-09",
    "state": "unpaid",
    "total_amount": 189.33,
    "url": "https://api.nokotime.com/v2/invoices/12345678"
  },
  "import": {
    "id": 8910,
    "url": "https://api.nokotime.com/v2/imports/8910"
  },
  "approved_at": "2012-01-10T08:33:29Z",
  "approved_by": {
    "id": 5538,
    "email": "john.test@test.com",
    "first_name": "John",
    "last_name": "Test",
    "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
    "url": "https://api.nokotime.com/v2/users/5538"
  },
  "url": "https://api.nokotime.com/v2/entries/1711626",
  "invoiced_outside_of_noko_url": "https://api.nokotime.com/v2/entries/1711626/marked_as_invoiced",
  "approved_url": "https://api.nokotime.com/v2/entries/1711626/approved",
  "unapproved_url": "https://api.nokotime.com/v2/entries/1711626/unapproved",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z"
}

Get the Current User’s Expenses

GET /current_user/expenses

Parameters

You can use the parameters specified in the Expense API’s List Action to further limit the results

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/current_user/expenses?page=2>; rel="next",
 <https://api.nokotime.com/v2/current_user/expenses?page=5>; rel="last"
{
  "id": 2233,
  "price": 14.55,
  "description": "new software",
  "taxable": true,
  "date": "2010-06-09",
  "project": {
    "id": 37396,
    "name": "Gear GmbH",
    "billing_increment": 10,
    "enabled": true,
    "billable": true,
    "color": "#ff9898",
    "url": "https://api.nokotime.com/v2/projects/37396"
  },
  "invoice": {
    "id": 12345678,
    "reference": "AA001",
    "invoice_date": "2013-07-09",
    "state": "unpaid",
    "total_amount": 189.33,
    "url": "https://api.nokotime.com/v2/invoices/12345678"
  },
  "user": {
    "id": 5538,
    "email": "john.test@test.com",
    "first_name": "John",
    "last_name": "Test",
    "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
    "url": "https://api.nokotime.com/v2/users/5538"
  },
  "url": "https://api.nokotime.com/v2/expense/2233",
  "created_at": "2010-06-09T20:44:57Z",
  "updated_at": "2010-06-09T20:44:57Z"
}

Edit the Current User

PUT /current_user

Inputs

first name
Optional string: the first name of the user
last name
Optional string: the last name of the user
time_format
Optional string: How time should be formatted. Accepted values are:
  • fraction
  • hours_minutes
week_start
Optional string: when the week starts for the current user. Accepted Values are:
  • sunday
  • monday
send_personal_weekly_report
Optional boolean: indicates whether a personal weekly report email should be sent.
send_team_weekly_report
Optional boolean: indicates whether a team weekly report should be sent. If the current user is not an admin, this field will be ignored.

Response

Status: 200 OK
{
  "id": 5538,
  "email": "john.test@test.com",
  "first_name": "John",
  "last_name": "Test",
  "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
  "url": "https://api.nokotime.com/v2/users/5538",
  "state": "active",
  "role": "leader",
  "entries": 0,
  "entries_url": "https://api.nokotime.com/v2/users/5538/entries",
  "expenses": 0,
  "expenses_url": "https://api.nokotime.com/v2/users/5538/expenses",
  "time_format": "fraction",
  "week_start": "Sunday",
  "utc_offset": -28800,
  "send_personal_weekly_report_email": true,
  "send_team_weekly_report_email": true,
  "created_at": "2010-06-09T20:44:57Z",
  "updated_at": "2010-06-09T20:44:57Z"
}