List cost lines
List the cost lines visible to the caller.
This resource carries monetary values and is permissioned separately from the cost sheets themselves, so a caller who can see that a job has been costed may still not be able to see what it cost.
Filter by cost_sheet for the lines that make up one sheet’s cost.
Authorizations
Session token for authentication.
Query Parameters
A comma separated list of related resources to include.
organisation, cost_sheet, cost_item, cost_item_version 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 tocost_item: Filter by the rate code the line was priced fromcost_item_version: Filter by the register version the line was snapshotted fromquantity: Filter by quantity, in thousandthswork_date: Filter by the day the work was carried outcreated_at: Filter on when the line was createdline_type: Filter by whether the line is anestimatedline or anactualonecost_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
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.
work_date, -work_date, quantity, -quantity, created_at, -created_at Limit the number of resources returned by the API
x >= 1Offset the resources returned by the API
x >= 0Response
List of cost lines.
JSON API response 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
- Option 1
- Option 2
- Option 3
- Option 4