Time Allocations API

List time allocations

List all time allocations for an account:

GET /time_allocations

Response

Status: 200 OK
[
  {
    "id": 4,
    "sourceID": null,
    "name": "Transparency of Performance (TOP)",
    "group": "Project",
    "created_at": "2016-03-22T21:03:35-05:00",
    "updated_at": "2016-03-22T21:03:35-05:00",
    "localized_group": "Project",
    "localized_name": "Transparency of Performance (TOP)"
  },
  {
    "id": 12,
    "sourceID": null,
    "name": "Warehouse Ordering (WHO)",
    "group": "Project",
    "created_at": "2016-03-22T21:03:36-05:00",
    "updated_at": "2016-03-22T21:03:36-05:00",
    "disabled": true,
    "localized_group": "Project",
    "localized_name": "Warehouse Ordering (WHO)"
  },
  "..."
]

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

Predefined Filters

The following predefined filters are available:

Collection Fields

By default the following fields will appear in collections of time allocations:

id sourceID name localized_name group localized_group 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 name created_at updated_at disabled

Sorting

By default a collection of time allocations is sorted ascending by name.

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

id sourceID name created_at updated_at

Get a single time allocation

GET /time_allocations/:id

Response

Status: 200 OK
{
  "created_at": "2016-03-22T21:03:35-05:00",
  "disabled": false,
  "customer_category": "selected",
  "effort_class": null,
  "group": "Project",
  "description_category": "required",
  "id": 4,
  "name": "Transparency of Performance (TOP)",
  "service_category": "selected",
  "source": null,
  "sourceID": null,
  "updated_at": "2016-03-22T21:03:35-05:00",
  "localized_group": "Project",
  "localized_name": "Transparency of Performance (TOP)"
}

The response contains these fields.

Create a time allocation

POST /time_allocations

When creating a new time allocation these fields are available.

Response

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

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

Update a time allocation

PATCH /time_allocations/:id

When updating a time allocation these fields are available.

Response

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

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

Fields

created_at
Readonly datetime — The date and time at which the time allocation was created.
customer_category
Required enum, default: none — The Customer field is used to specify if a Person who spent on the time allocation needs to select a Customer Organization, and if this is the case, whether this person may only select from the customer organizations linked to the time allocation or is allowed to select any customer organization. Valid values are:
  • none: None
  • selected: One of the Following
  • any: Any
description_category
Required enum, default: none — The Description field is used to specify whether the Description field should be available, and if so, whether it should be required, in the time entries to which the time allocation is related. Valid values are:
  • hidden: Hidden
  • optional: Optional
  • required: Required
disabled
Optional boolean, default: false — The Disabled box is checked when the time allocation may no longer be related to any more organizations.
effort_class
Optional reference to Effort Class — The effort class that is selected by default, when someone registers time on this time allocation.
group
Optional string (max 255) — The Group field is used to include the time allocation in a group.
id
Readonly integer — The unique ID of the time allocation.
localized_group
Readonly string (max 255) — Translated Group in the current language, defaults to group in case no translation is provided.
localized_name
Readonly string (max 255) — Translated Name in the current language, defaults to name in case no translation is provided.
name
Required string (max 160) — The Name field is used to enter the name of the time allocation.
service_category
Required enum, default: none — The Service field is used to specify if a Person who spent on the time allocation needs to select a Service, and if this is the case, whether this person may only select from the services linked to the time allocation or is allowed to select any service. Valid values are:
  • none: None
  • selected: One of the Following
  • any: Any
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 time allocation. If the time allocation has no updates it contains the created_at value.