Effort Classes API

List effort classes

List all effort classes for an account:

GET /effort_classes

Response

Status: 200 OK
[
  {
    "id": 2,
    "sourceID": null,
    "name": "Standard",
    "position": 1,
    "cost_multiplier": "1.0",
    "created_at": "2016-12-23T05:09:03-06:00",
    "updated_at": "2016-12-23T05:09:03-06:00"
  },
  {
    "id": 3,
    "sourceID": null,
    "name": "Overtime",
    "position": 2,
    "cost_multiplier": "1.65",
    "created_at": "2016-12-23T05:09:03-06:00",
    "updated_at": "2016-12-23T05:09:03-06:00"
  }
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of timesheet settings.

Predefined Filters

The following predefined filters are available:

Collection Fields

By default the following fields will appear in collections of effort classes:

id sourceID name position cost_multiplier created_at updated_at

Obtain a different set of fields using the ?fields= parameter.

Filtering

Filtering is available for the following fields:

id source sourceID disabled name created_at updated_at

The filters on source, sourceID, and name are not case sensitive.

Sorting

By default a collection of effort classes is sorted ascending by position.

The following fields are accepted by the ?sort= parameter:

id sourceID name position created_at updated_at

Get a single effort class

GET /effort_classes/:id

Response

Status: 200 OK
{
  "created_at": "2016-12-23T05:09:03-06:00",
  "disabled": false,
  "id": 3,
  "name": "Overtime",
  "position": 2,
  "cost_multiplier": "1.65",
  "source": null,
  "sourceID": null,
  "updated_at": "2016-12-23T05:09:03-06:00"
}

The response contains these fields.

Create an effort class

POST /effort_classes

When creating a new effort class these fields are available.

Response

Status: 201 Created
{
  "name": "...",
  "...": "..."
}

The response contains all fields of the created effort class and is similar to the response in Get a single effort class

Update an effort class

PATCH /effort_classes/:id

When updating an effort class these fields are available.

Response

Status: 200 OK
{
  "name": "...",
  "...": "..."
}

The response contains all fields of the updated effort class and is similar to the response in Get a single effort class

Fields

cost_multiplier
Optional decimal, default: 1 — The amount with which to multiply the cost of time entries with this effort class.
created_at
Readonly datetime — The date and time at which the effort class was created.
disabled
Optional boolean, default: false — The Disabled box is checked when the effort class may no longer be related to any more timesheet settings.
id
Readonly integer — The unique ID of the effort class.
name
Required string (max 80) — The Name field is used to enter the name of the effort class.
position
Optional integer — The Position field dictates the position that the effort class takes when it is displayed in a sorted list.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
updated_at
Readonly datetime — The date and time of the last update of the effort class. If the effort class has no updates it contains the created_at value.