Fleet Valuation

Build a complete fleet valuation workflow with batch requests.

The batch endpoint is designed for fleet-scale valuations. This guide walks through building a complete valuation workflow.

Basic fleet valuation

If you have a list of device SKUs with quantities:

curl -X POST https://api.trusttrade.com/v1/devices/batch \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "devices": [
      { "id": "MBA-M2-256-8GB", "qty": 50 },
      { "id": "IPAD-10-64-WIFI", "qty": 200 },
      { "id": "MBP-M3PRO-14-512-18GB", "qty": 15 },
      { "id": "IPAD-AIR-5-256-WIFI", "qty": 100 }
    ]
  }'

Reading the summary

The response summary gives you fleet-level insights:

{
  "summary": {
    "itemsReceived": 4,
    "uniqueDevicesResolved": 4,
    "totalUnits": 365,
    "totalCurrentValue": 127500,
    "projectedValue": {
      "months": 12,
      "total": 108375,
      "percentChange": -15.0
    },
    "refreshBreakdown": {
      "hold": 2,
      "considerRefreshing": 1,
      "refreshNow": 1
    },
    "confidence": "high"
  }
}

Key metrics:

  • totalCurrentValue — total fleet value at good condition
  • projectedValue — where value will be in 12 months
  • refreshBreakdown — how many device models should be traded in now vs. held

Using refresh signals

The refreshBreakdown tells you which devices need attention:

SignalAction
holdDevice retains strong value — keep using it
considerRefreshingApproaching optimal trade-in window — start planning
refreshNowPast optimal trade-in — value declining faster than average

Check individual device results to see which specific models have which signals.

Handling large fleets

The batch endpoint supports up to 10,000 devices per request. For larger fleets:

  1. Split into chunks of 10,000
  2. The server deduplicates automatically — if you send the same SKU multiple times, quantities are summed
  3. Credit cost is based on unique device models, not total items

Credit efficiency

Batch pricing is designed to be credit-efficient:

Unique devicesCredits
1–101
11–202
10010
50050

A fleet of 500 iPads that are all the same model costs just 1 credit (1 unique device).

Python example

import requests

API_KEY = "your_api_key"

devices = [
    {"id": "MBA-M2-256-8GB", "qty": 50},
    {"id": "IPAD-10-64-WIFI", "qty": 200},
    {"id": "MBP-M3PRO-14-512-18GB", "qty": 15},
]

response = requests.post(
    "https://api.trusttrade.com/v1/devices/batch",
    headers={"X-API-Key": API_KEY},
    json={"devices": devices},
)

data = response.json()
summary = data["summary"]

print(f"Total fleet value: ${summary['totalCurrentValue']:,}")
print(f"12-month projection: ${summary['projectedValue']['total']:,}")
print(f"Change: {summary['projectedValue']['percentChange']}%")

# Find devices to refresh
for device in data["results"]:
    if device.get("depreciation", {}).get("refreshSignal") == "refreshNow":
        print(f"  Refresh now: {device['displayName']} ({device['quantity']} units)")