Asset Costs
Typed asset cost entries feeding Total Cost of Ownership, gated by cost visibility.
Asset Costs API
Asset costs are typed cost entries recorded against a barcoded asset — parts, labour, external services, consumables, and shipping. Stored in integer minor units with a currency snapshot, they roll up into the asset's Total Cost of Ownership (TCO) alongside its purchase price. Costs feed the maintenance and retirement surfaces.
Asset costs are gated by cost visibility for read and mutate-existing paths: listing and viewing require costs.view plus asset-costs.view, and update/delete require costs.view plus the matching asset-costs.* permission. The amount field is stripped from any response served to a user without costs.view.
Endpoints
| Method | URL | Description |
|---|---|---|
| GET | /api/v1/assets/{asset}/asset_costs |
List an asset's costs |
| POST | /api/v1/assets/{asset}/asset_costs |
Record a cost |
| PUT | /api/v1/asset_costs/{asset_cost} |
Update a cost |
| DELETE | /api/v1/asset_costs/{asset_cost} |
Delete a cost |
Authentication
Requires asset-costs:read (GET) or asset-costs:write (POST/PUT/DELETE). AssetCostPolicy is asymmetric for create: create requires only asset-costs.create (plus warehouse scoping) — not costs.view — so warehouse users can record costs while amounts stay hidden. View / list require both costs.view and asset-costs.view. Update / delete require costs.view and the matching asset-costs.update / asset-costs.delete permission, plus warehouse scoping.
Record a cost
POST /api/v1/assets/{asset}/asset_costs
| Field | Type | Required | Description |
|---|---|---|---|
cost_type_id |
int | Yes | list entry from the Asset Cost Type list |
amount |
decimal | Yes | Cost as a decimal string (stored in minor units) |
currency_code |
string | No | ISO 4217 code; defaults to base currency |
description |
string | No | Free-text note |
incurred_at |
date | No | When the cost was incurred |
Response shape
AssetCostData emits amount as a decimal string (stripped when the caller lacks costs.view). TCO rollups are available on the asset detail (purchase + accumulated total, per-type breakdown, catalogue item averages). Collection key: asset_costs; singular: asset_cost.
Maintenance-sourced costs
Costs landed by receiving a maintenance purchase order carry the PO as their polymorphic source and flow into TCO automatically — see Purchase Order Documents and Purchase Orders.
Webhooks
asset_cost.created, asset_cost.updated, asset_cost.deleted — see Webhooks.