Inbox Entries

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

Not implemented yet!

This is just a sneak peek into how this resource might work. Attempting to call any actions will return a 404 error.

Inbox Entries are pending entries that are placed on the authenticated user’s dashboard, so that they can be manually reviewed before they are logged. You can learn more about Entries vs. Inbox Entries here

List Inbox Entries

Get all inbox entries for the authenticated user, sorted by the most recent inbox entry date.

GET /v2/inbox_entries

Parameters

Each parameter passed will filter the results, and parameters are chained (meaning that if you search by description and project_name, it will only return inbox entries with the given project name and description).

description
Optional string
Only inbox entries containing this text in their description are returned.
Example: description=meeting
project_name
Optional string
Only inbox entries containing this text in their project name are returned.
Example: name=Gear
from
Optional string of a date in ISO 8061 format YYYY-MM-DD
Only inbox entries from or after this date will be returned.
Example: from=2013-09-27
to
Optional string of a date in ISO 8061 format YYYY-MM-DD
Only inbox entries on or before this date will be returned.
Example: to=2013-09-27
logged
Optional boolean
true: only show logged inbox entries
false: only shows unlogged inbox entries
updated_from
Optional string of a timestamp in ISO 8061 format YYYY-MM-DDTHH:MM:SSZ
Only inbox entries updated from or after this timestamp will be returned.
Example: updated_from=2012-01-09T08:33:29Z
updated_to
Optional string of a timestamp in ISO 8061 format YYYY-MM-DDTHH:MM:SSZ
Only inbox entries updated on or before this timestamp will be returned.
Example: updated_to=2012-01-09T08:33:29Z

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/inbox_entries?page=2>; rel="next",
 <https://api.nokotime.com/v2/inbox_entries?page=5>; rel="last"
[
  {
    "id": 1711626,
    "date": "2012-01-09",
    "minutes": 60,
    "description": "#meeting",
    "project_name": "Gear GmbH",
    "logged": true,
    "entry_url": "https://api.nokotime.com/v2/entries/2",
    "url": "https://api.nokotime.com/v2/inbox_entries/1711626",
    "log_url": "https://api.nokotime.com/v2/inbox_entries/1711626/log",
    "created_at": "2012-01-09T08:33:29Z",
    "updated_at": "2012-01-09T08:33:29Z"
  }
]

Get a single Inbox Entry

GET /v2/inbox_entries/:id
Status: 200 OK
{
  "id": 1711626,
  "date": "2012-01-09",
  "minutes": 60,
  "description": "#meeting",
  "project_name": "Gear GmbH",
  "logged": true,
  "entry_url": "https://api.nokotime.com/v2/entries/2",
  "url": "https://api.nokotime.com/v2/inbox_entries/1711626",
  "log_url": "https://api.nokotime.com/v2/inbox_entries/1711626/log",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z"
}

Create an Inbox Entry

POST /v2/inbox_entries

Input

date
Required string of a date in ISO 8061 format YYYY-MM-DD
The date of the inbox entry.
description
Required string
The description of the inbox entry.
minutes
Optional integer
The number of minutes logged in this inbox entry.
project_name
Optional string
The project name this inbox entry is prefilled with.
{
  "date": "2012-01-09",
  "description": "#meeting",
  "minutes": 60,
  "project_name": "Gear GmbH"
}

Reponse

Status: 201 Created
Location: https://api.nokotime.com/v2/inbox_entries/1
{
  "id": 1711626,
  "date": "2012-01-09",
  "minutes": 60,
  "description": "#meeting",
  "project_name": "Gear GmbH",
  "logged": true,
  "entry_url": "https://api.nokotime.com/v2/entries/2",
  "url": "https://api.nokotime.com/v2/inbox_entries/1711626",
  "log_url": "https://api.nokotime.com/v2/inbox_entries/1711626/log",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z"
}

Edit an Inbox Entry

PUT /v2/inbox_entries/:id

Input

date
Required string of a date in ISO 8061 format YYYY-MM-DD
The date of the inbox entry.
description
Required string
The description of the inbox entry.
minutes
Optional integer
The number of minutes logged in this inbox entry.
project_name
Optional string
The project name this inbox entry is prefilled with.
{
  "date": "2012-01-09",
  "description": "#meeting",
  "minutes": 60,
  "project_name": "Gear GmbH"
}

Response

Status: 200 OK
{
  "id": 1711626,
  "date": "2012-01-09",
  "minutes": 60,
  "description": "#meeting",
  "project_name": "Gear GmbH",
  "logged": true,
  "entry_url": "https://api.nokotime.com/v2/entries/2",
  "url": "https://api.nokotime.com/v2/inbox_entries/1711626",
  "log_url": "https://api.nokotime.com/v2/inbox_entries/1711626/log",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z"
}

Custom Error Codes

The following Custom Error codes can be returned for this action:

Log an Inbox Entry

POST /v2/inbox_entries/:id/log

Parameters

Use the parameters specified in the Entry API’s Create Action to log the entry.

Response

Status: 201 Created
Location: https://api.nokotime.com/v2/entries/1
{
  "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"
}

Custom Error Codes

The following Custom Error codes can be returned for this action:

Delete an Inbox Entry

DELETE /v2/inbox_entries/:id

Response

Status: 204 No Content

A note about inbox entry deletion

An inbox entry cannot be deleted if it has been logged.

Custom Error Codes

The following Custom Error codes can be returned for this action: