---
title: "Calculate an asset's termination fees"
method: POST
path: "/ops/asset/{id}/calculate-termination-fees"
tags: ["ops", "ops-assets"]
---

# Calculate an asset's termination fees

`POST /ops/asset/{id}/calculate-termination-fees`

## Request

- Base URL: `https://api.topi-staging.eu`
- URL: `https://api.topi-staging.eu/ops/asset/{id}/calculate-termination-fees`
- Auth: OAuth 2
  - Authorization code: `/oauth2/authorize`
  - Token URL: `/oauth2/token` scopes: `ops-order:edit`

Calculate termination fees for asset

## Path parameters

- `id` string, regexp, required: topi asset ID

## Request body

- CalculateTerminationFeesOpsRequestBody
  - `actual_tenure_override` integer: Actual tenure override
  - `fetch_realtime_trade_in_price` boolean, required: Whether to fetch the realtime trade in price from partner
  - `trade_in_price_override` integer: Trade-in price override (in cents)

## Response `200`

OK response.

- TerminationFeesOps: The results of calculated termination fees including the calculation details
  - `asset_details` AssetDetail: An asset detail with info from the txlog and end customer
    - `id` string, regexp, required: asset ID
    - `offer_id` string, regexp: reference to the originating offer
    - `serial_number` string: This is an id that identifies this asset as unique
    - `status` 'created' | 'shipped' | 'return_completed' | 'purchased' | 'return_in_progress' | 'upgrade_in_progress' | 'purchase_in_progress' | 'upgrade_in_progress_in_term' | 'return_in_progress_in_term' | 'ops_canceled' | 'ending_soon' | 'overdue', required
    - `subtitle` string: The asset title from txlog
    - `title` string, required: The pretty name of the asset
    - `txlog_status` string: The status from txlog
  - `buy_out_fee_net` MoneyValue, required
    - `amount` integer, required: money amount, expressed in the minor unit for the currency
    - `currency` string, required: Currency code, see ISO 4127 (https://www.iso.org/iso-4217-currency-codes.html) (supported: EUR, GBP, USD)
  - `calculation_details` TerminationFeesOpsCalculationDetails, required
    - `buy_out_profit_loading_percent` number, double, required: Buy out Profit loading percent
    - `collected_rent_actual_tenure` integer: Collected rent actual tenure
    - `contract_start_date` string, date-time
    - `difference_to_expected_revenue` integer: Difference to expected revenue
    - `expected_revenue_total` integer: Expected revenue total
    - `gross_profit_in_percent` number, double: Gross profit in percent
    - `purchase_price_net` MoneyValue
      - `amount` integer, required: money amount, expressed in the minor unit for the currency
      - `currency` string, required: Currency code, see ISO 4127 (https://www.iso.org/iso-4217-currency-codes.html) (supported: EUR, GBP, USD)
    - `rv_in_percent` number, double: RV in %
    - `target_margin_in_percent` number, double: Target margin in %
    - `tenure_actual` integer, required: Actual tenure in months
    - `tenure_on_contract` integer, required: Contract tenure in months
    - `tenure_remaining` integer, required: Remaining tenure in months
    - `total_revenue` integer: Total revenue
    - `trade_in_price` integer: Trade in price
  - `return_fee_net` MoneyValue, required
    - `amount` integer, required: money amount, expressed in the minor unit for the currency
    - `currency` string, required: Currency code, see ISO 4127 (https://www.iso.org/iso-4217-currency-codes.html) (supported: EUR, GBP, USD)

## Other responses

- `400`: BadRequest: Bad Request response.
- `401`: Unauthorized: Unauthorized response.
- `403`: InvalidScopes: Forbidden response.
- `404`: NotFound: Not Found response.

## Changes

- **2026-10-27** `ac6979514123`: 1 info
  - api operation id `Asset.calculateTerminationFeesOps` removed and replaced with `Asset#calculateTerminationFeesOps`
- **2026-10-26** `7ff7ee94b30e`: 2 info
  - api operation id `Asset#calculateTerminationFeesOps` removed and replaced with `Asset.calculateTerminationFeesOps`
  - api tag `ops-assets` added

[Operation history](https://skmtc.dev/topi/apis/topi-public-api/changes/ops/asset/:id/calculate-termination-fees/post.md)

---

[API](https://skmtc.dev/topi/apis/topi-public-api.md) - [All operations](https://skmtc.dev/topi/apis/topi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/topi/apis/topi-public-api/revisions/09f585e29aa8?raw)
