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.

idInteger A unique id assigned to the period.
budget_typeString 
allowance_typeString 
date_createdunix timestamp 
date_commencedunix timestamp 
date_expiresunix timestamp 
date_closedunix timestamp 
rate_typeString 
rate_idUnsigned int 
service_item_idUnsigned int 
duration_typeString 
rolloverString 
standingStringStanding status
contractStringAPI url for the contract
contract_idUnsigned int 
contract_budgetUnsigned 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_allocationsArray, 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 rateObject

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

NEW priceDecimal 

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

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