Get contract period
The following macros are not currently supported in the header:
  • style

Get contract period

under development

Returns a contract period identified by its id.

GET /contracts/periods/:period_id

Handling the response

Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields parameter. Underlined values are always returned.

id

Integer

 A unique id assigned to the period.

budget_type

String

 

allowance_type

String

 

date_created

unix timestamp

 

date_commenced

unix timestamp

 

date_expires

unix timestamp

 

date_closed

unix timestamp

 

rate_type

String

 

rate_id

Unsigned int

 

service_item_id

Unsigned int

 

duration_type

String

 

rollover

String

 

standing

String

Standing status

contract

String

API url for the contract

contract_id

Unsigned int

 

contract_budget

Unsigned int or object

 

NEW budget_used

Object.

If the type is time, the value is time in seconds

If the type is currency, the value is decimal.

 

NEW budget

Object.

If the type is time, the value is time in seconds

If the type is currency, the value is decimal.

 

NEW allowance

Object.

billable: time in seconds.
charged: currency.

 

NEW total

 Decimal

 

NEW unapproved_budget_used

 Unsigned int

 

NEW on_budget

 Boolean, whether the it's on budget.

1 or 0

NEW overflow

 Decimal

 

NEW usage

 Decimal

 

NEW time_allocations

Array, time allocations for a period

Each element is the details of the time allocation.

It has three types, time allocated directly against the

period, time allocated to the task against period and

time allocated to other objects against period.

The item contains:

against title,

against_id,

against_type,

period_id,

nonbillable (time in seconds),

billable (time in seconds),

charged (currency).

NEW rate

Object

value: Decimal
using_allocated_rate: Bool, 1 or 0
title: String
excess: Bool, 1 or 0

NEW price

Decimal

 

For example, to get contract period #10 with against type included in the response:

GET /contracts/periods/10.xml?_fields=standing