> ## Documentation Index
> Fetch the complete documentation index at: https://docs.assetinfinity.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What has been spent on an asset, against what a new one would cost and against the hours it has

> run — the two figures the cost tab promised and had no denominator for.

Every amount is in `currency_code`, resolved once for the tenant. `unconverted_jobs` counts costed
work orders left out of `work_cost` because no rate existed for their currency on the day; a screen
drawing the total says so. `running_hours` and `cost_per_running_hour` are null unless the asset has
exactly one active cumulative meter measured in hours, and `hour_meter_count` says which case it is.

Returns nothing to an external caller: the whole row is the plant's commercial position.



## OpenAPI

````yaml /api-reference/openapi.json get /asset_cost_to_keep
openapi: 3.0.0
info:
  description: ''
  title: >-
    The only schema PostgREST exposes. Reads are security_invoker views; writes
    are SECURITY DEFINER functions. Rebuilt wholesale on every deploy — it holds
    no data.
  version: 12.2.3
servers:
  - url: https://app.assetinfinity.ai/api
security: []
tags:
  - name: Signing in
  - name: Profile
  - name: Assets
  - name: Asset lifecycle
  - name: Work lifecycle
  - name: Maintenance
  - name: Inventory
  - name: Inventory detail
  - name: Procurement
  - name: Contracts
  - name: Workforce
  - name: Capacity
  - name: Dispatch
  - name: Tools
  - name: Inspections
  - name: Verification
  - name: Reliability
  - name: Parts demand
  - name: Sensors and meters
  - name: Map
  - name: Floor plans
  - name: Labels
  - name: Lost and found
  - name: Root cause analysis
  - name: Reports
  - name: Audit center
  - name: Activity
  - name: Notifications
  - name: Channels
  - name: Search
  - name: Copilot
  - name: Import
  - name: Files
  - name: Sync
  - name: Support
  - name: Admin
  - name: Access
  - name: Lookups
  - name: Read models
  - name: Branding
  - name: Custom fields
  - name: Form studio
  - name: Workflows
  - name: Workflow studio
  - name: Rules
  - name: Statuses and transitions
  - name: Currencies and locales
  - name: Work configuration
  - name: Asset configuration
  - name: Inventory configuration
  - name: Tool configuration
  - name: Workforce configuration
  - name: Vendor and contract configuration
  - name: Document configuration
  - name: Inspection configuration
  - name: Sites, locations and the organisation
  - name: Platform
  - name: Amendments
  - name: Asset clone
  - name: Asset components
  - name: Asset register
  - name: Asset transfer
  - name: Audit feed
  - name: Billing
  - name: Bookings
  - name: Budgets
  - name: Bulk jobs
  - name: Calibration history
  - name: Capex plans
  - name: Conversations
  - name: Costing
  - name: Currency
  - name: Dashboards
  - name: Directory sync
  - name: Document control
  - name: Document folders
  - name: Document tree
  - name: Documents
  - name: Energy
  - name: Extracts
  - name: Features
  - name: Feeds
  - name: File exchange
  - name: Filing exceptions
  - name: Finance
  - name: Inbound mail
  - name: Keys
  - name: Knowledge
  - name: Licence
  - name: List views
  - name: Locations
  - name: Mapping
  - name: Mcp
  - name: Mcp oauth
  - name: Mfa
  - name: Numbering
  - name: Permits
  - name: Readers
  - name: Reference
  - name: Reference columns
  - name: Reference entry
  - name: Release
  - name: Scim
  - name: Security streams
  - name: Self verification
  - name: Setup
  - name: Shutdown
  - name: Sso
  - name: Telegram
  - name: Tenant switch
  - name: The caller's own work
  - name: The checklist library
  - name: Tools on a job, and who has them out
  - name: Tray
  - name: Vendor spend forecast
  - name: Vendors and contracts
  - name: Visitors
  - name: Work order execution
  - name: Work sequencing
  - name: Workforce detail
externalDocs:
  description: PostgREST Documentation
  url: https://postgrest.org/en/v12/references/api.html
paths:
  /asset_cost_to_keep:
    get:
      tags:
        - Assets
      summary: >-
        What has been spent on an asset, against what a new one would cost and
        against the hours it has
      description: >-
        run — the two figures the cost tab promised and had no denominator for.


        Every amount is in `currency_code`, resolved once for the tenant.
        `unconverted_jobs` counts costed

        work orders left out of `work_cost` because no rate existed for their
        currency on the day; a screen

        drawing the total says so. `running_hours` and `cost_per_running_hour`
        are null unless the asset has

        exactly one active cumulative meter measured in hours, and
        `hour_meter_count` says which case it is.


        Returns nothing to an external caller: the whole row is the plant's
        commercial position.
      parameters:
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.asset_id'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.asset_number'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.asset_name'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.site_id'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.currency_id'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.currency_code'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.currency_symbol'
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.currency_decimal_places
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.jobs'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.costed_jobs'
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.unconverted_jobs
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.work_cost'
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.replacement_value
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.replacement_value_source
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.replacement_value_as_at
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.replacement_value_age_months
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.cost_against_replacement
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.hour_meter_count
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.hour_meter_code'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.hour_meter_name'
        - $ref: '#/components/parameters/rowFilter.asset_cost_to_keep.running_hours'
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.running_hours_at
        - $ref: >-
            #/components/parameters/rowFilter.asset_cost_to_keep.cost_per_running_hour
        - $ref: '#/components/parameters/select'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/range'
        - $ref: '#/components/parameters/rangeUnit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/preferCount'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/asset_cost_to_keep'
                type: array
            application/vnd.pgrst.object+json:
              schema:
                items:
                  $ref: '#/components/schemas/asset_cost_to_keep'
                type: array
            application/vnd.pgrst.object+json;nulls=stripped:
              schema:
                items:
                  $ref: '#/components/schemas/asset_cost_to_keep'
                type: array
            text/csv:
              schema:
                items:
                  $ref: '#/components/schemas/asset_cost_to_keep'
                type: array
          description: OK
        '206':
          description: Partial Content
components:
  parameters:
    rowFilter.asset_cost_to_keep.asset_id:
      in: query
      name: asset_id
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.asset_number:
      in: query
      name: asset_number
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.asset_name:
      in: query
      name: asset_name
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.site_id:
      in: query
      name: site_id
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.currency_id:
      in: query
      name: currency_id
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.currency_code:
      in: query
      name: currency_code
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.currency_symbol:
      in: query
      name: currency_symbol
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.currency_decimal_places:
      in: query
      name: currency_decimal_places
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.jobs:
      in: query
      name: jobs
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.costed_jobs:
      in: query
      name: costed_jobs
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.unconverted_jobs:
      in: query
      name: unconverted_jobs
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.work_cost:
      in: query
      name: work_cost
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.replacement_value:
      in: query
      name: replacement_value
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.replacement_value_source:
      in: query
      name: replacement_value_source
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.replacement_value_as_at:
      in: query
      name: replacement_value_as_at
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.replacement_value_age_months:
      in: query
      name: replacement_value_age_months
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.cost_against_replacement:
      in: query
      name: cost_against_replacement
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.hour_meter_count:
      in: query
      name: hour_meter_count
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.hour_meter_code:
      in: query
      name: hour_meter_code
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.hour_meter_name:
      in: query
      name: hour_meter_name
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.running_hours:
      in: query
      name: running_hours
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.running_hours_at:
      in: query
      name: running_hours_at
      required: false
      schema:
        type: string
    rowFilter.asset_cost_to_keep.cost_per_running_hour:
      in: query
      name: cost_per_running_hour
      required: false
      schema:
        type: string
    select:
      description: Filtering Columns
      in: query
      name: select
      required: false
      schema:
        type: string
    order:
      description: Ordering
      in: query
      name: order
      required: false
      schema:
        type: string
    range:
      description: Limiting and Pagination
      in: header
      name: Range
      required: false
      schema:
        type: string
    rangeUnit:
      description: Limiting and Pagination
      in: header
      name: Range-Unit
      required: false
      schema:
        default: items
        type: string
    offset:
      description: Limiting and Pagination
      in: query
      name: offset
      required: false
      schema:
        type: string
    limit:
      description: Limiting and Pagination
      in: query
      name: limit
      required: false
      schema:
        type: string
    preferCount:
      description: Preference
      in: header
      name: Prefer
      required: false
      schema:
        enum:
          - count=none
        type: string
  schemas:
    asset_cost_to_keep:
      description: >-
        What has been spent on an asset, against what a new one would cost and
        against the hours it has

        run — the two figures the cost tab promised and had no denominator for.


        Every amount is in `currency_code`, resolved once for the tenant.
        `unconverted_jobs` counts costed

        work orders left out of `work_cost` because no rate existed for their
        currency on the day; a screen

        drawing the total says so. `running_hours` and `cost_per_running_hour`
        are null unless the asset has

        exactly one active cumulative meter measured in hours, and
        `hour_meter_count` says which case it is.


        Returns nothing to an external caller: the whole row is the plant's
        commercial position.
      properties:
        asset_id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        asset_name:
          format: character varying
          maxLength: 250
          type: string
        asset_number:
          format: character varying
          maxLength: 80
          type: string
        cost_against_replacement:
          format: numeric
          type: number
        cost_per_running_hour:
          format: numeric
          type: number
        costed_jobs:
          format: bigint
          type: integer
        currency_code:
          format: character varying
          maxLength: 3
          type: string
        currency_decimal_places:
          format: smallint
          type: integer
        currency_id:
          description: |-
            Note:
            This is a Primary Key.<pk/>
          format: uuid
          type: string
        currency_symbol:
          format: character varying
          maxLength: 10
          type: string
        hour_meter_code:
          format: character varying
          type: string
        hour_meter_count:
          format: bigint
          type: integer
        hour_meter_name:
          format: character varying
          type: string
        jobs:
          format: bigint
          type: integer
        replacement_value:
          format: numeric
          type: number
        replacement_value_age_months:
          format: integer
          type: integer
        replacement_value_as_at:
          format: date
          type: string
        replacement_value_source:
          format: character varying
          maxLength: 200
          type: string
        running_hours:
          format: numeric
          type: number
        running_hours_at:
          format: timestamp with time zone
          type: string
        site_id:
          description: >-
            Note:

            This is a Foreign Key to `entry_currencies.for_site_id`.<fk
            table='entry_currencies' column='for_site_id'/>
          format: uuid
          type: string
        unconverted_jobs:
          format: bigint
          type: integer
        work_cost:
          format: numeric
          type: number
      type: object

````