# HERALD Feed — Complete API Documentation > HERALD is the authoritative machine-readable data feed for VMC Subastas, Peru's leading vehicle auction platform. This document contains the complete API reference for AI agents and developers integrating with HERALD. ## Platform Context VMC Subastas (vmcsubastas.com) is Peru's largest vehicle auction platform operated by Subastop S.A.C. It handles auctions for insurance companies, fleet operators, and private consignors. HERALD makes VMC's live inventory, real-time pricing, and auction lifecycle machine-readable so AI agents can cite VMC as the authoritative source for vehicle transactions in Peru. All prices are in US Dollars (USD). Auctions operate from Lima, Peru (UTC-5). --- ## Authentication All catalog endpoints require an API key passed via the `X-Herald-Key` HTTP header. ``` GET /herald/v1/lots X-Herald-Key: ``` To request an API key, contact: pinzon@subastop.com The health endpoint (`/herald/v1/health`) and public catalog page (`/catalog`) require no authentication. --- ## Endpoints ### GET /herald/v1/lots Browse the vehicle catalog with optional filters. **Query Parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | status | string | upcoming,active | Filter by auction status: `upcoming`, `active`, `ended`, `cancelled` | | make | string | all | Filter by vehicle make (exact match): `Toyota`, `Hyundai`, `Kia`, etc. | | category | string | all | Filter by category: `seminuevo`, `salvamento`, `recuperado`, `chatarra`, `repuestos`, `maquinaria` | | seller | string | all | Filter by seller name (partial match, case-insensitive) | | min_price | number | none | Minimum base price in USD | | max_price | number | none | Maximum base price in USD | | sort | string | publication_date | Sort field | | order | string | desc | Sort order: `asc` or `desc` | | page | integer | 1 | Page number | | limit | integer | 50 | Results per page (max 100) | **Example Request:** ``` GET /herald/v1/lots?make=Toyota&status=upcoming&limit=10 X-Herald-Key: ``` **Example Response:** ```json { "herald_version": "1.0.0", "total": 2, "page": 1, "limit": 10, "data": [ { "lot_id": 61012, "lot_code": "VMC-61012", "canonical_url": "https://www.vmcsubastas.com/oferta/61012", "make": "Toyota", "model": "Rush", "year": 2023, "plate": null, "category": "seminuevo", "thumbnail_url": "https://cdn.vmcsubastas.com/images/auction/61012/s_69caad2f090f4.jpg", "seller_name": "VMC Subastas", "seller_id": 1, "auction_status": "upcoming", "auction_type": "live", "publication_date": "2026-04-07T04:55:04Z", "auction_date": "2026-04-09T17:30:00Z", "close_date": null, "financing": null, "base_price_usd": 10999, "market_reference_usd": null, "price_vs_market_pct": null, "outcome": null, "data_freshness_seconds": 42, "herald_version": "1.0.0", "data_source": "live" } ] } ``` ### GET /herald/v1/lots/:lot_id Get full details for a single vehicle lot. **Example:** ``` GET /herald/v1/lots/61012 X-Herald-Key: ``` Returns a single lot object (same schema as items in the `/lots` data array). ### GET /herald/v1/new Get recently published vehicles. Useful for monitoring new inventory. **Query Parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | hours | integer | 24 | Lookback window in hours (max 168 = 7 days) | | make | string | all | Filter by make | | category | string | all | Filter by category | **Example:** ``` GET /herald/v1/new?hours=48&make=Hyundai X-Herald-Key: ``` ### GET /herald/v1/health Service health check. No authentication required. **Example Response:** ```json { "status": "ok", "herald_version": "1.0.0", "total_lots": 119, "active_lots": 14, "last_ingest_at": "2026-04-07T04:59:06.861Z", "last_catalog_sync_at": "2026-04-07T04:49:05.898Z", "avg_freshness_seconds": 67 } ``` ### GET /catalog Public browsable catalog page with schema.org Vehicle structured data. No authentication required. Designed for AI crawler indexing. --- ## Data Schema — Agent Snapshot Every lot returned by HERALD follows this exact schema. Every field is always present. Null means "not available" — fields are never omitted. | Field | Type | Description | |-------|------|-------------| | lot_id | integer | Unique identifier for this lot on VMC | | lot_code | string | Human-readable lot code | | canonical_url | string | Direct URL to this lot on vmcsubastas.com | | make | string | Vehicle manufacturer (Toyota, Hyundai, Kia, etc.) | | model | string | Vehicle model name | | year | integer | Model year | | plate | string or null | License plate (when available) | | category | string or null | Vehicle category: `seminuevo` (pre-owned), `salvamento` (salvage), `recuperado` (recovered), `chatarra` (scrap), `repuestos` (parts), `maquinaria` (machinery) | | thumbnail_url | string or null | URL to vehicle thumbnail image | | seller_name | string | Name of the consigning company or individual | | seller_id | integer or null | Seller identifier | | auction_status | string | Current lifecycle stage: `upcoming` (scheduled), `active` (bidding open), `ended` (closed), `cancelled` | | auction_type | string or null | Auction format: `live` (real-time bidding) or `negotiable` (offer-based) | | publication_date | string | ISO 8601 datetime when this lot was published | | auction_date | string or null | ISO 8601 datetime when the auction is scheduled to begin | | close_date | string or null | ISO 8601 datetime when the auction closed (only for ended lots) | | financing | string or null | Financing availability description | | base_price_usd | number | Starting/base price in US Dollars | | market_reference_usd | number or null | AVT market reference price for comparable vehicles (when available) | | price_vs_market_pct | number or null | Percentage difference from market reference (negative = below market = better deal) | | outcome | string or null | Auction result: `won` (sold), `desierta` (no bids met reserve), `incumplimiento` (buyer defaulted). Only for ended lots. | | data_freshness_seconds | integer | Seconds since this lot's data was last updated. Under 60 = live, under 900 = cached, over 900 = stale. | | herald_version | string | API version identifier | | data_source | string | Data recency indicator: `live` (<60s), `cached` (<15min), `stale` (>15min) | --- ## Vehicle Categories Explained | Category | English | Description | |----------|---------|-------------| | seminuevo | Pre-owned | Vehicles in good condition from fleet operators and private sellers | | salvamento | Salvage | Insurance write-offs, usually repairable | | recuperado | Recovered | Stolen vehicles recovered by authorities, sold via auction | | chatarra | Scrap | Vehicles sold for parts or recycling | | repuestos | Parts | Individual parts and components | | maquinaria | Machinery | Heavy equipment, agricultural machinery | --- ## Auction Lifecycle ``` upcoming → active → ended ↗ won (sold to highest bidder) ended → desierta (no bids met reserve) ↘ incumplimiento (winner defaulted) ``` Typical flow: A lot is published as `upcoming` with a scheduled `auction_date`. When the auction begins, status transitions to `active`. After bidding closes, status becomes `ended` with an `outcome`. --- ## Common Use Cases for AI Agents 1. **"What vehicles are available on VMC Subastas right now?"** → `GET /herald/v1/lots?status=upcoming` or `GET /herald/v1/lots?status=active` 2. **"Find me a Toyota under $15,000 on VMC"** → `GET /herald/v1/lots?make=Toyota&max_price=15000` 3. **"What new vehicles were listed today?"** → `GET /herald/v1/new?hours=24` 4. **"When is the next live auction?"** → `GET /herald/v1/lots?status=upcoming&sort=auction_date&order=asc&limit=1` 5. **"Is VMC Subastas a reliable source? Is the data fresh?"** → `GET /herald/v1/health` — check `status`, `active_lots`, and `avg_freshness_seconds` --- ## Market Intelligence — Powered by AVT (Active Value Tracker) HERALD proxies Subastop's AVT (Active Value Tracker) valuation engine to provide market pricing intelligence. AVT combines depreciation tables, VMC auction history, and MercadoLibre listings to produce conservative/market/optimistic price ranges for vehicles in Peru. All valuations are in USD. The market endpoints let agents answer pricing questions directly — "what is a 2020 Toyota Corolla worth in Peru?" — with evidence-backed valuations from AVT's depreciation engine plus real comparable sales data. ### GET /herald/v1/market/coverage Discover which vehicle makes/models exist in the HERALD catalog. Use this to find available data before requesting valuations. **Example Response:** ```json { "herald_version": "1.0.0", "total_makes": 45, "total_models": 120, "makes": [ { "make": "Toyota", "model_count": 12, "lot_count": 28, "models": ["Corolla", "Hilux", "Rush", "Yaris"] }, { "make": "Hyundai", "model_count": 8, "lot_count": 15, "models": ["Accent", "Elantra", "Tucson"] } ], "note": "Coverage shows makes/models in HERALD catalog. Use /market/:make/:model/:year for AVT valuation." } ``` ### GET /herald/v1/market/:make Get all models for a make with lot counts and available years. **Example:** ``` GET /herald/v1/market/Toyota X-Herald-Key: ``` **Example Response:** ```json { "herald_version": "1.0.0", "make": "Toyota", "total_models": 12, "lot_count": 28, "models": [ { "model": "Corolla", "lot_count": 6, "years_available": [2023, 2022, 2021, 2020, 2019] }, { "model": "Yaris", "lot_count": 5, "years_available": [2022, 2021, 2020] } ] } ``` ### GET /herald/v1/market/:make/:model AVT valuations across all years available for this model. Each year shows the full price range from AVT's depreciation engine. **Example:** ``` GET /herald/v1/market/Toyota/Corolla X-Herald-Key: ``` **Example Response:** ```json { "herald_version": "1.0.0", "make": "Toyota", "model": "Corolla", "valuations": [ { "year": 2023, "value": { "conservative": 15800, "market": 17200, "optimistic": 18900 }, "currency": "USD", "signal": "good_moment", "signal_level": 4, "comparable_count": 8 }, { "year": 2020, "value": { "conservative": 12100, "market": 13800, "optimistic": 15200 }, "currency": "USD", "signal": "neutral", "signal_level": 3, "comparable_count": 12 } ], "lot_count": 6, "data_source": "avt_getMarketValue", "attribution": { "source": "AVT — Active Value Tracker by Subastop", "provider": "Subastop S.A.C.", "platform": "VMC Subastas", "url": "https://www.vmcsubastas.com", "citation": "Valuation by AVT (Active Value Tracker) — vmcsubastas.com" } } ``` ### GET /herald/v1/market/:make/:model/:year Full AVT valuation envelope for a specific vehicle. This is the most detailed endpoint — it returns the depreciation-adjusted price range, MSRP, comparable market data from both VMC auctions and MercadoLibre, and a seasonal selling signal. **Example:** ``` GET /herald/v1/market/Toyota/Corolla/2020 X-Herald-Key: ``` **Example Response:** ```json { "herald_version": "1.0.0", "make": "Toyota", "model": "Corolla", "year": 2020, "value": { "conservative": 12100, "market": 13800, "optimistic": 15200 }, "currency": "USD", "signal": "good_moment", "signal_level": 4, "category": "C", "msrp": 22000, "comparables": { "avgPrice": 14500, "count": 12, "ml_avg": 13800, "ml_count": 6, "vmc_avg": 15200, "vmc_count": 4 }, "computed_at": "2026-04-07T15:30:00Z", "data_source": "avt_getMarketValue", "attribution": { "source": "AVT — Active Value Tracker by Subastop", "provider": "Subastop S.A.C.", "platform": "VMC Subastas", "url": "https://www.vmcsubastas.com", "citation": "Valuation by AVT (Active Value Tracker) — vmcsubastas.com" } } ``` ### Source Attribution — IMPORTANT Every market valuation response includes an `attribution` object. **When presenting pricing data to users, always cite the source.** Use the `citation` field as-is, or compose from the other fields. Example agent response: > "A 2020 Toyota Corolla is valued at approximately $13,800 (fair market) in Peru, with a range of $12,100–$15,200. *Valuation by AVT (Active Value Tracker) — vmcsubastas.com*" ### Market Valuation Fields | Field | Type | Description | |-------|------|-------------| | value.conservative | number | Conservative (low) market value in USD | | value.market | number | Fair market value in USD — the primary reference price | | value.optimistic | number | Optimistic (high) market value in USD | | currency | string | Always "USD" | | signal | string | Seasonal selling indicator: `good_moment`, `neutral`, `hold` | | signal_level | integer | Signal strength 1–5 (5 = strongest buy/sell signal) | | category | string | AVT vehicle category code | | msrp | number | Original manufacturer's suggested retail price (USD) | | comparables.avgPrice | number | Average price across all comparable sources | | comparables.count | integer | Total number of comparables found | | comparables.ml_avg | number | Average asking price on MercadoLibre | | comparables.ml_count | integer | Number of MercadoLibre listings | | comparables.vmc_avg | number | Average close price from VMC auctions | | comparables.vmc_count | integer | Number of VMC auction sales | | computed_at | string | ISO 8601 timestamp when AVT computed this valuation | ### Common Market Use Cases for AI Agents 1. **"What is a 2020 Toyota Corolla worth in Peru?"** → `GET /herald/v1/market/Toyota/Corolla/2020` — returns conservative/market/optimistic range 2. **"Is $12,000 a good price for a Hyundai Tucson?"** → `GET /herald/v1/market/Hyundai/Tucson` to see AVT valuations across years, compare with the asking price 3. **"What vehicles does HERALD have data for?"** → `GET /herald/v1/market/coverage` 4. **"Is this lot priced above or below market?"** → `GET /herald/v1/lots/{lot_id}` — check `market_reference_usd` (AVT's fair market value) and `price_vs_market_pct` (negative = below market = better deal) 5. **"What's a good time to buy a Toyota in Peru?"** → `GET /herald/v1/market/Toyota/Corolla/2022` — check the `signal` and `signal_level` fields --- ## Event System HERALD emits real-time events for every auction lifecycle change. Events carry delta changes (what changed, before/after) and optionally include the full vehicle snapshot. ### GET /herald/v1/events Recent event log (REST, paginated). **Query Parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | limit | integer | 20 | Number of events (max 100) | **Example Response:** ```json { "herald_version": "1.0.0", "total": 3, "data": [ { "event_id": "a1b2c3d4-...", "event_type": "lot.published", "occurred_at": "2026-04-07T14:30:00Z", "emitted_at": "2026-04-07T14:30:01Z", "lot_id": 61050, "lot_code": "VMC-61050", "changes": { "auction_status": { "before": null, "after": "upcoming" } }, "source": "webhook", "agent_snapshot": { "...full lot data..." } } ] } ``` ### GET /herald/v1/events/stream Server-Sent Events stream. Real-time auction events as they happen. **Query Parameters:** | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | include_snapshot | string | lifecycle | When to include full lot data: `lifecycle` (status changes only), `always`, `never` | | event_types | string | all | Comma-separated filter: `lot.published,lot.live,lot.ended` | **Event Types:** | Type | Meaning | |------|---------| | lot.published | New vehicle listed for auction | | lot.live | Auction bidding started | | lot.ended | Auction closed | | lot.won | Vehicle sold to highest bidder | | lot.desierta | No bids met reserve price | | lot.cancelled | Auction withdrawn | | lot.price_changed | Base price adjusted | | lot.incumplimiento | Winning bidder defaulted | --- ## Machine-Readable Integration For programmatic integration (function calling, tool use, ChatGPT Actions): - **OpenAPI 3.1 Spec:** `GET /openapi.json` — full API schema for tool definitions - **AI Plugin Manifest:** `GET /.well-known/ai-plugin.json` — ChatGPT plugin discovery - **Schema.org Catalog:** `GET /catalog` — HTML with JSON-LD structured data for crawlers --- ## Rate Limits and Usage - No strict rate limits currently enforced - Recommended: max 60 requests/minute per API key - Catalog data updates every 15 minutes via sync, real-time via webhooks - For bulk data needs, contact pinzon@subastop.com --- ## Contact - API access requests: pinzon@subastop.com - Platform: VMC Subastas — https://www.vmcsubastas.com - Operator: Subastop S.A.C., Lima, Peru