Skip to main content
GET
List cost lines

Authorizations

X-Session-Token
string
header
required

Session token for authentication.

Query Parameters

include
enum<string>[]

A comma separated list of related resources to include.

Available options:
organisation,
cost_sheet,
cost_item,
cost_item_version
filter
string
default:""

Filters the response data based on the value provided.

Available filters:

  • id_in: Filter by cost line ID(s)
  • cost_sheet: Filter by the cost sheet the line belongs to
  • cost_item: Filter by the rate code the line was priced from
  • cost_item_version: Filter by the register version the line was snapshotted from
  • quantity: Filter by quantity, in thousandths
  • work_date: Filter by the day the work was carried out
  • created_at: Filter on when the line was created
  • line_type: Filter by whether the line is an estimated line or an actual one
  • cost_kit_application: Filter by the application that produced the line, for the group of lines one use of a kit wrote

Filter by cost_sheet for the lines that make up one sheet's cost.

Filter by cost_kit_application for the group of lines a single application of a kit wrote — that is what lets a client show them together, and remove them together. Applying the same kit twice produces two groups with different ids.

Filter by line_type to separate estimates from actuals — a listing of a sheet's costs that omits this filter returns both, and summing them without noticing conflates what was planned with what was spent. The two describe the same work twice, so the total means nothing.

For more information on using named filters, see the docs

sort
enum<string>[]

A comma separated list of fields to sort by. Sorting by work_date gives a sheet's lines in the order the work was carried out.

Available options:
work_date,
-work_date,
quantity,
-quantity,
created_at,
-created_at
limit
integer<int64>
default:100

Limit the number of resources returned by the API

Required range: x >= 1
offset
integer<int64>
default:0

Offset the resources returned by the API

Required range: x >= 0

Response

List of cost lines.

JSON API response object

data
A list of cost lines · object[]
required
meta
object
required
jsonapi
object
required
included
object[]

Related resources that can be included when a cost line is returned.

cost-items and cost-item-versions are both optional on a line, so asking for either simply yields nothing for the lines that have none — an ad-hoc line has no rate code, and a line priced on the job has no register version behind its rate. Neither is an error, and a request for both across a mixed collection comes back with whatever exists.

An organisation