Skip to main content

Overview

The Assets API allows you to manage customer equipment records. Assets track equipment installed at customer sites, including service history, warranty information, and maintenance requirements.

Endpoints

List Assets

Retrieve a list of assets.
GET /api/v1/assets
Query Parameters:
ParameterTypeDescription
pageintegerPage number
per_pageintegerResults per page
customer_idstringFilter by customer
product_idstringFilter by product type
statusstringFilter by status
serial_numberstringSearch by serial number
location_idstringFilter by location
Example Request:
curl -X GET "https://api.fentu.io/v1/assets?customer_id=cust-001" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example Response:
{
  "data": [
    {
      "id": "asset-001",
      "name": "Rooftop HVAC Unit #1",
      "serial_number": "HVAC-2023-001234",
      "product": {
        "id": "prod-001",
        "name": "Commercial HVAC 10-Ton"
      },
      "customer": {
        "id": "cust-001",
        "name": "Acme Corporation"
      },
      "location": "Building A - Roof",
      "status": "active",
      "warranty_expiry": "2026-06-15",
      "last_service": "2024-01-15T10:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 3,
    "total_count": 52
  }
}

Get Asset

Retrieve a single asset with full details.
GET /api/v1/assets/{id}
Example Response:
{
  "data": {
    "id": "asset-001",
    "name": "Rooftop HVAC Unit #1",
    "asset_tag": "A-10001",
    "serial_number": "HVAC-2023-001234",
    "model_number": "RHVAC-10T-2023",
    "product": {
      "id": "prod-001",
      "name": "Commercial HVAC 10-Ton",
      "manufacturer": "CoolAir Inc"
    },
    "customer": {
      "id": "cust-001",
      "name": "Acme Corporation"
    },
    "object": {
      "id": "obj-001",
      "name": "Building A",
      "address": "123 Main Street"
    },
    "location": "Roof - Northwest Corner",
    "status": "active",
    "install_date": "2023-06-15",
    "warranty_start": "2023-06-15",
    "warranty_expiry": "2026-06-15",
    "warranty_type": "standard",
    "service_contract": {
      "id": "contract-001",
      "name": "Annual Maintenance"
    },
    "specifications": {
      "capacity": "10 tons",
      "voltage": "480V",
      "refrigerant": "R-410A"
    },
    "service_history": [
      {
        "work_order_id": "wo-123",
        "date": "2024-01-15T10:00:00Z",
        "type": "maintenance",
        "description": "Quarterly maintenance"
      }
    ],
    "custom_fields": {
      "floor": "Roof",
      "zone": "A1"
    },
    "notes": "Access via northwest stairwell",
    "created_at": "2023-06-15T14:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}

Create Asset

Create a new asset record.
POST /api/v1/assets
Request Body:
{
  "name": "New HVAC Unit",
  "customer_id": "cust-001",
  "object_id": "obj-001",
  "product_id": "prod-001",
  "serial_number": "HVAC-2024-005678",
  "model_number": "RHVAC-5T-2024",
  "location": "Building B - Roof",
  "install_date": "2024-01-27",
  "warranty_start": "2024-01-27",
  "warranty_expiry": "2027-01-27",
  "specifications": {
    "capacity": "5 tons",
    "voltage": "208V"
  },
  "notes": "Installed during expansion project"
}

Update Asset

Update an existing asset.
PUT /api/v1/assets/{id}
Request Body:
{
  "location": "Building B - Roof (relocated)",
  "notes": "Moved during renovation",
  "warranty_expiry": "2028-01-27"
}

Delete Asset

Delete an asset (moves to trash).
DELETE /api/v1/assets/{id}

Asset Service History

Get Service History

GET /api/v1/assets/{id}/service-history
Returns all work orders and service records for the asset. Example Response:
{
  "data": [
    {
      "work_order_id": "wo-123",
      "work_order_number": "WO-2024-001",
      "date": "2024-01-15T10:00:00Z",
      "type": "maintenance",
      "status": "completed",
      "technician": "Jane Doe",
      "description": "Quarterly maintenance",
      "parts_used": [
        {
          "part": "Air Filter",
          "quantity": 2
        }
      ],
      "notes": "All readings normal"
    }
  ]
}

Asset Parts

List Asset Parts

GET /api/v1/assets/{id}/parts
Returns parts associated with the asset.

Add Part to Asset

POST /api/v1/assets/{id}/parts
Request Body:
{
  "part_id": "part-001",
  "serial_number": "COMP-12345",
  "install_date": "2024-01-27",
  "warranty_expiry": "2025-01-27"
}

Asset Statuses

StatusDescription
activeIn operation
inactiveNot currently in use
under_repairBeing serviced
retiredNo longer in service
pending_installNot yet installed

Warranty Information

Check Warranty Status

GET /api/v1/assets/{id}/warranty
Example Response:
{
  "data": {
    "asset_id": "asset-001",
    "warranty_type": "standard",
    "warranty_start": "2023-06-15",
    "warranty_expiry": "2026-06-15",
    "is_active": true,
    "days_remaining": 870,
    "coverage": {
      "parts": true,
      "labor": true,
      "extended_hours": false
    }
  }
}

Error Responses

CodeDescription
400Bad request
401Unauthorized
403Forbidden
404Asset not found
409Duplicate serial number
422Validation error

Customers API

Customer endpoints

Work Orders API

Work order endpoints

Assets

Asset user guide

Products

Product management