Send agent shipping telemetry
POST one event per shipping-stage transition from your agent gateway (ACP / UCP / MCP server, Messenger webhook, or GTM server container).
Request
curl -X POST https://dealerinsights-production.up.railway.app/collect/shipping/ \
-H "Content-Type: application/json" \
-H "X-Dealer-Code: NORCAL-01" \
-H "X-Api-Key: $SHIPPULSE_API_KEY" \
-d @event.json{
"is_live_agent": true,
"session_id": "sess_8f2a91c0",
"order_or_quote_id": "Q-7731",
"agent_platform": "openai_user",
"protocol_source": "ACP",
"shipping_stage": "quote_requested",
"item_category": "parts_accessory",
"item_identifier": "04465-02220",
"item_description": "Front brake pad set",
"destination_zip": "94103",
"destination_state": "CA",
"distance_miles": 48,
"fulfillment_type": "parcel_standard",
"carrier_name": "UPS",
"quoted_shipping_cost": 12.50,
"is_free_shipping": false,
"promised_eta_start": "2026-11-24T00:00:00Z",
"promised_eta_end": "2026-11-26T23:59:00Z",
"quote_latency_ms": 142,
"buyer_identifier": "jane@example.com",
"raw_metadata": { "checkout_session": "cs_123" }
}Responses
201— stored:{"status":"created","event_id":"…","data_quality_flag":"exact_window"}202— filtered, nothing stored:{"status":"ignored","reason":"non_agent_traffic" | "non_shipping_event"}400— validation error, with per-field messages infields401— missing or invalid X-Dealer-Code / X-Api-Key
Shipping fields
- is_live_agent
- Must be JSON true. Anything else → 202 ignored (non_agent_traffic).
- shipping_stage
- quote_requested · method_selected · checkout_handoff · label_dispatched · wismo_checked · delivered · quote_failed. Anything else → 202 ignored (non_shipping_event).
- agent_platform
- meta_muse · openai_user · google_gemini · perplexity · anthropic_claude · custom_agent
- item_category
- parts_accessory · vehicle_delivery (vehicle deliveries require a 17-char VIN as item_identifier)
- fulfillment_type
- parcel_standard · parcel_expedited · freight_ltl · dealer_flatbed · carrier_transport · store_pickup
- data_quality_flag
- Optional, default exact_window. Auto-set to latency_timeout when quote_latency_ms > 200.
- buyer_identifier
- Email or phone. Normalized + SHA-256 hashed server-side; the raw value is never stored.
- event_timestamp
- Optional ISO-8601 time the event happened (defaults to receipt time).
Send agent vehicle-shopping telemetry
POST one event each time an AI agent (or a buyer-agent service) moves a vehicle opportunity forward: an inquiry, a quote request, your quote, a negotiation step, a lead, an appointment, a deposit, a purchase or a lost deal. Same headers and responses as shipping; ignored events say non_shopping_event.
curl -X POST https://dealerinsights-production.up.railway.app/collect/shopping/ \
-H "Content-Type: application/json" \
-H "X-Dealer-Code: NORCAL-01" \
-H "X-Api-Key: $SHIPPULSE_API_KEY" \
-d @event.json{
"is_live_agent": true,
"session_id": "thread_51f0",
"opportunity_id": "OPP-2291",
"agent_operator": "caredge",
"agent_platform": "custom_agent",
"channel": "email",
"shopping_stage": "quote_provided",
"vehicle_condition": "new",
"vin": "4T3RWRFV1TU012345",
"stock_number": "N24817",
"vehicle_year": 2026,
"vehicle_make": "Toyota",
"vehicle_model": "RAV4",
"vehicle_trim": "Hybrid XLE",
"msrp": 36800,
"listed_price": 36800,
"quoted_price": 39150,
"dealer_response_seconds": 840,
"buyer_identifier": "jane@example.com",
"buyer_zip": "94103"
}Shopping fields
- shopping_stage
- vehicle_inquiry · quote_requested · quote_provided · negotiation · trade_in_appraisal · financing_quote · lead_submitted · appointment_booked · deposit_placed · purchase_completed · deal_lost. Anything else → 202 ignored (non_shopping_event).
- opportunity_id
- Required. One ID per agent shopping one vehicle (the lead, email thread or deal). Funnel counts are unique opportunity IDs.
- agent_operator
- Required. The company that sent the agent, e.g. caredge, or consumer for a shopper using their own ChatGPT / Gemini. Normalized to a lowercase slug.
- channel
- web · chat · email · sms · voice · api · marketplace
- vehicle_condition
- new · used · cpo
- quoted_price / agent_offer
- Dealer's quote (e.g. the Total Price) and the agent's offer or counteroffer.
- dealer_response_seconds
- How long the store took to reply to the agent. Drives the response-time KPI.
- vin
- Optional, 17 characters if given. Also: stock_number, vehicle_year / make / model / trim, msrp, listed_price, trade_in_value.
Send website / CDN logs (verified agents)
POST batches of up to 1,000 requests from your web server or CDN logs. AI Shopper Insights keeps only AI-agent requests, works out the page and vehicle, and tags each visit with a trust level:
- Verified (signed): a Web Bot Auth signature (RFC 9421) checked against the agent's published keys
- Verified by CDN: your CDN confirmed the bot
- Claimed: the user agent says it's an AI agent, with no proof
- Suspect: the signature failed, or a valid signature belongs to a different company than the agent claims
Client IP addresses are never needed or stored.
curl -X POST https://dealerinsights-production.up.railway.app/collect/visits/ \
-H "Content-Type: application/json" \
-H "X-Dealer-Code: NORCAL-01" \
-H "X-Api-Key: $SHIPPULSE_API_KEY" \
-d @visits.json{
"visits": [
{
"id": "cf-8a1f0c2e",
"timestamp": "2026-11-20T18:04:11Z",
"method": "GET",
"url": "https://www.example-toyota.com/inventory/new-2026-toyota-rav4-xle-JTMRWRFV5SD123456/",
"status": 200,
"user_agent": "Mozilla/5.0 … ChatGPT-User/1.0; +https://openai.com/bot",
"headers": {
"signature-agent": "\"https://chatgpt.com\"",
"signature-input": "sig1=(\"@authority\" \"signature-agent\");created=1763661851;keyid=\"…\";alg=\"ed25519\";tag=\"web-bot-auth\"",
"signature": "sig1=:…:"
},
"cdn_verified_bot": false
}
]
}Response 200: {"received":1,"stored":1,"duplicates":0,"skipped_non_agent":0,"verification":{"signed_verified":1,…},"errors":[]}. Bad records are listed in errors and don't stop the rest of the batch.
Visit fields
- url
- Full request URL (or send path + host instead)
- timestamp
- ISO 8601 or epoch seconds; defaults to now. Signatures are checked against this time
- status
- HTTP status your site returned (401/403/429/503 count as blocked)
- user_agent
- The request's User-Agent; ordinary browsers are skipped
- headers
- signature, signature-input and signature-agent, exactly as received (needed for signed verification)
- cdn_verified_bot
- true if your CDN marked it a verified bot (e.g. Cloudflare Bot Management)
- id
- Optional unique id per request, so retries aren't counted twice
Sites on Cloudflare: forwarding Worker
Add this Worker on a route covering the dealer's site. It passes every request through untouched and, for AI-agent requests only, sends one record in the background (it never slows the page down).
// Cloudflare Worker: forwards AI-agent requests to AI Shopper Insights. Your site is unchanged.
// Settings → Variables: SHIPPULSE_DEALER_CODE, and secret SHIPPULSE_API_KEY.
const AI_AGENT = /ChatGPT|GPTBot|OAI-SearchBot|Perplexity|Claude|anthropic|Gemini|Google-Agent|Meta-External|Amazonbot|MistralAI|DuckAssist|CCBot|Bytespider/i;
const ASSET = /\.(js|css|png|jpe?g|gif|webp|svg|ico|woff2?|map)$/i;
export default {
async fetch(request, env, ctx) {
const response = await fetch(request);
const ua = request.headers.get("user-agent") || "";
const url = new URL(request.url);
if ((AI_AGENT.test(ua) || request.headers.has("signature-agent")) && !ASSET.test(url.pathname)) {
const headers = {};
for (const h of ["signature", "signature-input", "signature-agent"]) {
if (request.headers.has(h)) headers[h] = request.headers.get(h);
}
const visit = {
id: request.headers.get("cf-ray") || crypto.randomUUID(),
timestamp: new Date().toISOString(),
method: request.method,
url: request.url,
status: response.status,
user_agent: ua,
headers,
cdn_verified_bot: Boolean(request.cf?.botManagement?.verifiedBot),
};
ctx.waitUntil(
fetch("https://dealerinsights-production.up.railway.app/collect/visits/", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Dealer-Code": env.SHIPPULSE_DEALER_CODE,
"X-Api-Key": env.SHIPPULSE_API_KEY,
},
body: JSON.stringify({ visits: [visit] }),
}).catch(() => {}),
);
}
return response;
},
};Inventory feed (vAuto, HomeNet, Dealer.com …)
Send the dealer's whole inventory as a CSV (or TSV, pipe-delimited, or JSON). It's the same daily export inventory systems already send to marketplaces, so the dealer usually just asks their vAuto or HomeNet rep to add AI Shopper Insights as a feed recipient. Common column names are recognised automatically (VIN, Stock, Type/New-Used, Year, Make, Model, Trim/Series, Miles, SellingPrice/Internet Price, MSRP, VDP URL, ImageList). Vehicles missing from a full file are marked sold, unless the file looks partial.
curl -X POST https://dealerinsights-production.up.railway.app/collect/inventory/ \
-H "X-Dealer-Code: NORCAL-01" \
-H "X-Api-Key: $SHIPPULSE_API_KEY" \
-F "file=@vauto_export.csv"
# Only part of the inventory (don't mark missing vehicles as sold):
curl -X POST "https://dealerinsights-production.up.railway.app/collect/inventory/?full_snapshot=false" ...Response: rows, imported, skipped (bad VIN), added, removed (sold), price_changes, the column mapping used, and any warnings.
SFTP drop box (how vAuto / HomeNet deliver it)
Inventory providers usually push the feed over SFTP on a schedule. Each dealer gets its own login; files are imported the moment the upload finishes (CSV, TSV, pipe, JSON, or a .zip with one file inside), using the dealer's price column, lowest-price rule and fees. Temporary names (.tmp, .part) are imported when renamed. A file that can't be read (e.g. no VIN column) fails the upload, so the provider sees the error.
python manage.py create_feed_login --dealer NORCAL-01 # username + password (shown once)
python manage.py create_feed_login --dealer NORCAL-01 --rotate
python manage.py create_feed_login --dealer NORCAL-01 --show # host, port, host-key fingerprints, last file
# Give the provider: SFTP host and port (Railway TCP proxy), username, password, folder "/" or "/inbox",
# a full-inventory file at least daily.Dealer MCP server for AI agents
Once the dealer approves it, each dealer gets a read-only MCP server (Streamable HTTP) backed by their feed, plus an llms.txt they can publish. Tools: search_inventory, get_vehicle, get_total_price (the dealer's “Total Price”, the doc fee and the price including it; taxes and government fees excluded), talk_to_dealer (payments, financing, trade-ins and add-ons go to a person) and get_dealer_info. Prices are withheld if the feed is older than 48 hours, or until the dealer confirms its fees. What the server tells agents is kept 2 years as the dealer's record, then deleted.
MCP endpoint: https://dealerinsights-production.up.railway.app/mcp/NORCAL-01/
llms.txt: https://dealerinsights-production.up.railway.app/feeds/NORCAL-01/llms.txt
# Fees and approval (Railway console):
python manage.py set_dealer_pricing --dealer NORCAL-01 \
--fee "Doc fee=85" --fee "Electronic filing fee=37" --enable-mcp