API Reference12 min read

Inventory API Endpoints

Complete reference for the Inventory API — list vehicles, search, filter, get details, view history, and access statistics.

APIinventoryvehiclessearchVINendpoints

Inventory API Endpoints

The Inventory API is the core of Carfluence. It provides access to your normalized vehicle data with search, filtering, pagination, and analytics.

List Vehicles

bash
GET /api/v1/inventory

Query Parameters:

ParameterTypeDefaultDescription
limitnumber50Records per page (max 200)
offsetnumber0Pagination offset
statusstringactiveFilter: active, sold, all
integration_iduuidFilter by data source
searchstringSearch by VIN, make, model, or stock number

Response:

json
{
  "vehicles": [
    {
      "vin": "1HGCM82633A004352",
      "stock_number": "A1234",
      "year": 2024,
      "make": "Honda",
      "model": "Accord",
      "trim": "EX-L",
      "price": "32999.00",
      "internet_price": "31499.00",
      "mileage": 15234,
      "exterior_color": "Crystal Black Pearl",
      "interior_color": "Black",
      "body_style": "Sedan",
      "condition": "used",
      "status": "active",
      "days_on_lot": 23,
      "source_integration_id": "uuid",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-20T14:22:00Z"
    }
  ],
  "pagination": {
    "total": 342,
    "limit": 50,
    "offset": 0
  }
}

Get Vehicle by VIN

bash
GET /api/v1/inventory/:vin

Returns the full vehicle record including all mapped fields.

Vehicle History

bash
GET /api/v1/inventory/:vin/history

Returns the change log for a specific vehicle — price changes, status transitions, and field updates:

json
{
  "history": [
    {
      "change_type": "price_change",
      "changed_fields": {
        "price": { "old": "34999.00", "new": "32999.00" }
      },
      "source": "vauto-feed",
      "created_at": "2025-01-18T08:00:00Z"
    },
    {
      "change_type": "status_change",
      "changed_fields": {
        "status": { "old": "active", "new": "sold" }
      },
      "source": "vauto-feed",
      "created_at": "2025-01-25T16:30:00Z"
    }
  ]
}

Inventory Statistics

Summary Stats:

bash
GET /api/v1/inventory/stats/summary
json
{
  "stats": {
    "total_count": "342",
    "active_count": "298",
    "sold_count": "44",
    "new_count": "120",
    "used_count": "178",
    "avg_price": "34250.00",
    "avg_mileage": "28450",
    "avg_days_on_lot": "32.5"
  }
}

Lifecycle Stats:

bash
GET /api/v1/inventory/stats/lifecycle
json
{
  "stats": {
    "avg_days_on_lot": "32.5",
    "total_sold": "44",
    "relisted_count": "3",
    "at_risk_count": "12"
  }
}

Both stats endpoints accept an optional integration_id query parameter to filter by data source.

Last updated: December 22, 2025