开发文档
Autochek二手车交易平台接口参考:6 个操作
Autochek二手车交易平台接口参考文档:逐一说明 6 个操作各自的输入、默认值、取值范围与返回字段含义。
另见: Autochek API:二手车搜索、详情与参考列表概览与价格 · Autochek二手车交易平台接口指南:搜索流程
本页内容
Autochek二手车交易平台接口参考:autochek-body-types 与 autochek-makes
autochek-body-types 保存 Autochek 收录的 21 种车身类型,autochek-makes 保存该平台完整的品牌列表,两者每一行都返回相同的 id 与 name 组合。autochek-makes 的结果不会随市场变化:无论查询尼日利亚还是肯尼亚,都会得到完全相同的 257 行,因此这个操作完全没有提供国家输入。
某一行的 id 正是 autochek-search 上用来核对 body.body_type_id 或 body.make_id 的数值,而 name 只是 Autochek 自己用于展示的名称,两个筛选都不接受用它代替 id。autochek-body-types 的规模也比 autochek-makes 小得多:21 行对 257 行,按车身类型默认的 limit 100,一页便已足够,而品牌列表在相同默认值下则需要分成好几页。
本节涉及的字段(4)
autochek-body-types, autochek-makes, body.limit, body.page
autochek-locations:州/省与城市参考列表
autochek-locations 依据 body.kind 返回两种不同的行结构之一:
state:每行是一个id与name,代表一个州/省city:每行同样带有id与name,并额外附带一个嵌套的state对象,重复给出该城市所属州/省的id与name
body.state_id 只有在 body.kind 为 city 时才会生效,把返回的城市缩小到某一州/省之下,而不是 Autochek 已知的全部城市。与 autochek-makes 一样,这份列表在 Autochek 运营的每个市场之间共用,而不是按某一个市场划定,因此之后搜索所需的州/省与城市拼写,都来自同一份列表,与搜索针对哪个国家无关。
本节涉及的字段(3)
autochek-locations, body.kind, body.state_id
autochek-models:车型列表,以及搜索为何无法按它筛选
autochek-models 返回 Autochek 已知的每一个车型,每行自己的 id 都与 name 以及它所属的 make 对象配对;发送 body.make_id 可以把列表缩小到某一品牌自己的车型,而不是全部车型。这个操作返回的 id 在 autochek-search 上没有对应的用法:一个确实存在于当前库存中的车型 id,作为搜索筛选发送时仍会得到零条结果,所以 autochek-models 的作用是查看某个品牌已知的车型,而不是为搜索提供筛选值。借助这里返回的 make 对象还能反过来确认:在把某个品牌自己的 id 发送给 autochek-search 之前,先核实某个车型 id 到底属于哪个品牌。
本节涉及的字段(2)
autochek-models, body.make_id
autochek-search:列表类操作的行数据中没有的字段
autochek-search 在顶层返回 country 与 currency,确认这次调用实际匹配到五个市场中的哪一个,以及随后每行价格所使用的币种,而不必让调用方仅凭 body.country 自行推断。filters_applied 原样回显这次调用实际用来缩小结果的筛选项,当其中某一项没有匹配到任何结果时,它可能比发送的筛选项更短。在每一行内部,summary 给出一段简短描述,image 只给出一张照片,而更完整的 images 列表则包含不止这一张。
seller_id 只是标识出是谁发布了这一行,并不说出名字,而 autochek-listing-detail 自己的 seller_name 会为同一条列表把这个名字写出来。body.state 与 body.city 只有在发送的拼写与 autochek-locations 返回的拼写完全一致时才会匹配到对应行,二者之间不会做近似匹配。
本节涉及的字段(5)
autochek-search, body.country, body.query, body.state, body.city
搜索结果行上的变速箱、燃油与车况字段分别确认了什么
每一行自己的 transmission、fuel 与 condition 字段都回显 Autochek 为该列表记录的标签,与这次调用实际筛选的取值无关,因此即便某次调用没有传 body.transmission,每一行仍会带有自己的 transmission 取值,而不是留空。把 body.transmission 设为 manual 时也会返回 Autochek 自己标记为 simulated-manual 的行,而这类行返回时仍保留自己确切的 transmission 取值,不会被改写成 manual。body.fuel 与 body.condition 的行为方式相同:匹配到的行上 fuel 与 condition 字段保留 Autochek 自己记录的取值,而不是调用方发送的筛选值,因此即便该行确实匹配了这次筛选,二者在拼写上仍可能不同。
本节涉及的字段(4)
autochek-search, body.transmission, body.fuel, body.condition
autochek-listing-detail:搜索行没有的字段
autochek-listing-detail 回答若干 autochek-search 的行完全没有的字段。trim 与 wheel_drive 分别描述车辆的配置等级与驱动方式。vin 返回该列表的车辆识别码,但其中一部分会被遮盖,而不是完整代码。
exterior_color 与 interior_color 分别给出车身与内饰的颜色,owner_type 与 seller_name 标明车主类型与发布该列表的一方,seller_since 则说明这一方在 Autochek 上销售车辆已有多久。features 列出 Autochek 为该列表记录的配置标签,images 中的每一项都带有自己的 url 与 label,而不像搜索行那样只有单独一个 image 字段。
damage_count 给出 Autochek 为该车辆记录的具体损伤条数,这与 accidented、inspected 这两个是否类字段分开保留。created_at 与 updated_at 标记该列表历史上另外两个 autochek-search 行不会返回的时间点,而 listed_at 则是两个操作都会返回的第三个时间点。
本节涉及的字段(2)
autochek-listing-detail, body.listing_id
{
"body": {
"listing_id": "r6HW7G352"
}
}{
"body": {
"kind": "city",
"state_id": 25,
"limit": 50
}
}操作
公共网关操作统一使用 POST /api/v1/{project}/{action}。
使用 JSON 对象,按文档将参数放入 path、query、headers 和 body,省略未使用的位置。input.headers 是供操作使用的 JSON 数据,不是浏览器请求头。请勿在此填写凭证。按文档保留 body 的数组、标量或 null;省略与 null 含义不同。
车身类型
POST /api/v1/autochek/autochek-body-types
列出 Autochek 收录的车身类型,并给出搜索车身类型筛选所需的数字 id。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.limit | integer | 可选 | 100 | — | 1–500 |
body.page | integer | 可选 | 1 | — | 1–10 |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-body-types' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"page":1}}'响应字段
pagelimitcountsource_totallast_pagehas_moreresults[]idname
车辆详情
POST /api/v1/autochek/autochek-listing-detail
返回某条 Autochek 列表的完整记录,包括价格、融资条款、车况信号、配置与照片。
输入字段
| 字段 | 类型 | 是否必填 | 允许的值 | 范围限制 |
|---|---|---|---|---|
body.listing_id | string | 必填 | — | — |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-listing-detail' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"listing_id":"r6HW7G352"}}'响应字段
listing_idcountryurltitlemakemodelmake_idmodel_idtrimwheel_driveyearpriceprice_beforecurrencymonthly_installmentloan_valuefinancing_termsmileagemileage_unittransmissionfuelengine_displacement_ccengine_typeconditionvinexterior_colorinterior_colorowner_typeseller_nameseller_sincecitystategrade_scoreinspectedaccidentedwarrantydamage_countfeatures[]images[]urllabel
created_atupdated_atlisted_at
地区列表
POST /api/v1/autochek/autochek-locations
列出 Autochek 自己的州/省与城市筛选条件所需的确切名称,每个城市都带有所属州/省。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.kind | string | 可选 | "state" | "state""city" | — |
body.limit | integer | 可选 | 100 | — | 1–500 |
body.page | integer | 可选 | 1 | — | 1–500 |
body.state_id | integer | 可选 | — | — | 1–9007199254740991 |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-locations' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"kind":"state"}}'响应字段
pagelimitcountsource_totallast_pagehas_moreresults[]idnamestateidname
品牌列表
POST /api/v1/autochek/autochek-makes
列出 Autochek 收录的车辆品牌,并给出搜索品牌筛选所需的数字 id。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.limit | integer | 可选 | 100 | — | 1–500 |
body.page | integer | 可选 | 1 | — | 1–100 |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-makes' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"limit":100}}'响应字段
pagelimitcountsource_totallast_pagehas_moreresults[]idname
车型列表
POST /api/v1/autochek/autochek-models
列出某一品牌下 Autochek 已知的车型,每个车型都带有所属品牌自己的 id。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.limit | integer | 可选 | 100 | — | 1–500 |
body.make_id | integer | 可选 | — | — | 1–9007199254740991 |
body.page | integer | 可选 | 1 | — | 1–500 |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-models' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"make_id":106}}'响应字段
pagelimitcountsource_totallast_pagehas_moreresults[]idnamemakeidname
搜索
POST /api/v1/autochek/autochek-search
在 Autochek 的某一市场内搜索在售列表,支持按品牌、车身类型、变速箱、燃油、车况、地区、质保、拍卖与精选状态筛选。
输入字段
| 字段 | 类型 | 是否必填 | 默认值 | 允许的值 | 范围限制 |
|---|---|---|---|---|---|
body.country | string | 必填 | — | "ng""ke""gh""ug""ci" | — |
body.auction_only | boolean | 可选 | — | — | — |
body.body_type_id | integer | 可选 | — | — | 1–9007199254740991 |
body.city | string | 可选 | — | — | — |
body.condition | string | 可选 | — | "foreign""local""new" | — |
body.featured_only | boolean | 可选 | — | — | — |
body.fuel | string | 可选 | — | "petrol""diesel""hybrid-petrol" | — |
body.limit | integer | 可选 | 24 | — | 1–100 |
body.make_id | integer | 可选 | — | — | 1–9007199254740991 |
body.page | integer | 可选 | 1 | — | 1–1000 |
body.query | string | 可选 | — | — | — |
body.state | string | 可选 | — | — | — |
body.transmission | string | 可选 | — | "automatic""manual""cvt""simulated-manual""duplex" | — |
body.warranty_only | boolean | 可选 | — | — | — |
请求示例
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/autochek/autochek-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"country":"ng","limit":10}}'响应字段
countrycurrencypagelimitcountsource_totallast_pagehas_morefilters_appliedresults[]listing_idurltitlemakemodelyearpriceprice_beforecurrencymonthly_installmentfinancing_availableloan_valuemileagemileage_unittransmissionfuelengine_displacement_ccengine_typebody_type_idconditioninspectedaccidentedwarrantyauctionfeaturedsoldgrade_scorelisting_scorecitystateseller_idlisted_atsummaryimageimages
调用方式
- 使用
POST /api/v1/autochek/<action>,并携带x-api-key、Content-Type: application/json和必需的Idempotency-Key。 - 调用成功时返回
ok: true:data是操作的结果,meta.requestId标识已记录的请求,meta.chargedCreditUnits是实际扣费金额。否则ok为false,error.code说明原因;请读取ok和error.code,不要只依赖 HTTP 状态码。每个网关响应都带有供支持使用的请求 ID:meta.requestId;没有meta的响应(如受理前被拒绝)则为顶层requestId。 - 只有调用成功才按标价扣费。失败不扣费;结果无法确认时,最多 900 秒后释放,不扣费。
- 请求完成后,以同一个 Idempotency-Key 重复发送相同请求,24 小时内返回已保存的响应,不会再次扣费。
网关调用参考: