Skip to main content

Overview

Update an asset’s details, status, or location. Use this endpoint to track asset movements, record condition changes, or mark assets as unavailable.

Common Use Cases

  • Status Changes: Mark returned assets as available or unavailable
  • Location Tracking: Update location when assets move between warehouses
  • Condition Updates: Record condition after inspection or repair
  • Notes: Add notes about asset history or issues

Updatable Fields

FieldDescription
statusavailable, rented_out, returned, sold, or unavailable
locationPhysical location
conditionCondition notes
notesAdditional notes
acquisitionCostUpdate cost if needed

Example: Mark Asset Unavailable

{
  "status": "unavailable",
  "condition": "Screen damage - needs repair",
  "notes": "Returned from sub_abc123 with damage"
}

Example: Update Location

{
  "location": "Rotterdam Warehouse",
  "notes": "Transferred from Amsterdam for regional fulfillment"
}

Example: Return to Available

{
  "status": "available",
  "condition": "Inspected and cleaned - Grade B",
  "location": "Amsterdam Warehouse",
  "notes": "Returned from subscription, ready for re-deployment"
}

Status Management

When to Change Status

Current StatusNew StatusWhen
availablerented_outAutomatically when subscription created
rented_outavailableAfter return inspection (if no issues)
rented_outunavailableAfter return inspection (if damaged/retired)
unavailableavailableAfter repair/refurbishment
Status changes to rented_out happen automatically when you create a subscription. You typically only need to manually set available or unavailable.

Processing Returns

When assets are returned from subscriptions:
async function processReturn(serialNumber, inspectionResult) {
  const update = {
    notes: `Returned: ${new Date().toISOString()}`
  };

  if (inspectionResult.passed) {
    update.status = 'available';
    update.condition = `Grade ${inspectionResult.grade} - Ready for redeployment`;
    update.location = 'Returns Processing - Available';
  } else {
    update.status = 'unavailable';
    update.condition = inspectionResult.issues.join(', ');
    update.location = 'Returns Processing - Repair Queue';
  }

  return await updateAsset(serialNumber, update);
}

Tracking Asset History

Use notes to build a history log:
async function logAssetEvent(serialNumber, event) {
  const asset = await getAsset(serialNumber);

  const newNote = `[${new Date().toISOString()}] ${event}`;
  const notes = asset.notes
    ? `${asset.notes}\n${newNote}`
    : newNote;

  await updateAsset(serialNumber, { notes });
}

// Usage
await logAssetEvent('SN123', 'Returned from customer - minor scratches');
await logAssetEvent('SN123', 'Cleaned and inspected - Grade B');
await logAssetEvent('SN123', 'Reassigned to sub_xyz789');

Error Handling

Error CodeCauseSolution
NOT_FOUNDSerial number doesn’t existVerify serial number
INVALID_STATUSInvalid status valueUse available, rented_out, returned, sold, or unavailable
ASSET_IN_USECannot change status while in subscriptionEnd subscription first