Skip to main content
GET
List cost roll-ups

Authorizations

X-Session-Token
string
header
required

Session token for authentication.

Query Parameters

filter
string
default:""

Filters the response data based on the value provided.

Available filters:

  • organisation: Filter by the ID of the organisation the node belongs to
  • cost_centre: Filter by the ID of the node to roll up
  • cost_centre_type: Filter by the type of the node to roll up (scheme-contracts, schemes, work-orders, operations)
  • depth: Optional. How much of the subtree to return: self (the default, and the same as omitting the term) returns one element, the roll-up for the filtered node; all returns one element per node in the subtree beneath and including it, so a client can see which scheme, work order or operation is holding the money rather than only the total beneath it. Matching is exact lowercase; any other value is rejected with CH.004.211.

A roll-up is derived from a cost centre, so organisation, cost_centre and cost_centre_type must be given together — they identify the node whose subtree is summed. Supplying some but not all of them is rejected with CH.004.211 rather than answered, because a partly-filtered roll-up would return a total for the wrong scope. Supplying none of them returns an empty collection, as any unfiltered collection read does.

Wrap them in and(), as in and(eq(organisation,c000c344-8847-47da-a091-32e75902d3b1),eq(cost_centre,7f3a2c18-64bd-4f0e-9a52-c8d1b73e0f45),eq(cost_centre_type,work-orders),eq(depth,all)); filters after a bare top-level comma are dropped.

For more information on using named filters, see the docs

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 roll-ups.

JSON API response object

data
A list of cost roll-ups · object[]
required
meta
object
required
jsonapi
object
required