ECU Models
Catalog ของ ECU ที่ Smongrot รองรับ — brand, model, protocol, map dimensions, supported PIDs, DTC definitions
List ECU models
GET /v1/ecu-models
Query parameters
| Param | Type | Default | หมายถึง |
|---|---|---|---|
brand | string | — | filter ตาม brand เช่น Honda |
protocol | kline | canbus | — | filter ตาม protocol |
verified | true | false | — | filter ตาม is_verified |
limit | int | 25 | จำนวน (max 100) |
cursor | string | — | opaque cursor สำหรับ next page |
Example
curl "https://api.smongrot.com/v1/ecu-models?brand=Honda&verified=true&limit=5" \
-H "Authorization: Bearer sk_live_..."
{
"data": [
{
"ecu_code": "K2TG-T21",
"brand": "Honda",
"model": "Wave 125i NEW",
"year_range": "2010-2013",
"protocol": "kline",
"fuel_map_size": "16x16",
"ignition_map_size": "16x16",
"supported_pids": null,
"dtc_definitions": null,
"is_verified": true
}
],
"count": 5,
"next_cursor": "eyJhZnRlciI6IktZWi1UMDMifQ=="
}
Get single ECU
GET /v1/ecu-models/:ecu_code
Example
curl "https://api.smongrot.com/v1/ecu-models/K2TG-T21" \
-H "Authorization: Bearer sk_live_..."
{
"data": {
"ecu_code": "K2TG-T21",
"brand": "Honda",
"model": "Wave 125i NEW",
"year_range": "2010-2013",
"protocol": "kline",
"fuel_map_size": "16x16",
"ignition_map_size": "16x16",
"supported_pids": null,
"dtc_definitions": null,
"is_verified": true
}
}
Response fields
| Field | Type | หมายถึง |
|---|---|---|
ecu_code | string | รหัส ECU (Honda part number) |
brand | string | ยี่ห้อรถ |
model | string | โมเดลรถ |
year_range | string | null | ช่วงปี เช่น "2010-2013" |
protocol | kline | canbus | K-Line หรือ CAN Bus |
fuel_map_size | string | ขนาด fuel map เช่น "16x16" |
ignition_map_size | string | ขนาด ignition map |
supported_pids | object | null | PIDs ที่อ่านได้ (JSON) |
dtc_definitions | object | null | DTC codes และคำอธิบาย (JSON) |
is_verified | boolean | ผ่านการทดสอบจริงบนรถแล้ว |
Pagination
Sort order = ecu_code ASC. ถ้ามี result มากกว่า limit — จะได้ next_cursor string ที่ opaque
async function listAll(brand: string) {
const all = [];
let cursor: string | null = null;
do {
const url = new URL("https://api.smongrot.com/v1/ecu-models");
url.searchParams.set("brand", brand);
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${KEY}` } });
const { data, next_cursor } = await res.json();
all.push(...data);
cursor = next_cursor;
} while (cursor);
return all;
}
Errors
404 not_found— ecu_code ไม่มีใน catalog401 unauthorized— key ผิด/หมด429 rate_limit_exceeded— เกินโควตา