地区油价查询
请求
GET /v1/oil响应
等待请求发送请求后显示 JSON 响应。
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
requestedRegionCode | string / null | 请求传入的六位地区编码。全国查询为 null。 |
nextAdjustmentAt | string · 日期时间 / null | 下次预计或已确认的调价时间。时间未知时为 null。 |
adjustmentStatus | string | confirmed 为已确认,estimated 为预估,unknown 为未知。 |
prices | object[] | 全国查询返回可用省级记录。按地区查询返回一条报价,允许回退到所属省份。 |
prices[].regionCode | string | 报价实际所属的六位地区编码。 |
prices[].regionName | string | 报价实际所属的地区名称。 |
prices[].scope | string | 实际报价范围,province 为省级,city 为城市级。 |
prices[].areaName | string | 报价地区或价区名称。 |
prices[].updatedAt | string · 日期或日期时间 / null | 报价记录的更新时间。时间未知时为 null。 |
prices[].unit | string | 聚合接口标注的单位,固定为 CNY/L。 |
prices[].price | object | 按油品组织的价格。非空值统一为保留两位小数的元/升字符串。 |
prices[].price.92 | string | 92 号汽油价格。 |
prices[].price.95 | string | 95 号汽油价格。 |
prices[].price.98 | string / null | 普通 98 号汽油报价。当前口径下暂无报价时为 null。 |
prices[].price.0 | string / null | 0 号柴油价格。数据缺失时为 null。 |
prices[].effectiveAt | string · 日期时间 / null | 价格生效时间。当前适配器无法逐条核实,返回 null。 |
prices[].fetchedAt | string · 日期时间 | 该数据最近一次成功采集的时间。 |
prices[].stale | boolean | 超过 36 小时未成功采集,或已确认调价后仍未验证为本轮价格时为 true。 |
状态码
| 状态码 | 说明 |
|---|---|
200 | 查询成功。成功响应结构见上表。 |
304 | 客户端发送的 If-None-Match 命中缓存。响应无正文。 |
400 | INVALID_REGION_CODE,地区编码格式错误或缺少必填编码。 |
404 | UNKNOWN_REGION,该地区尚未收录。 |
429 | 请求超出频率限制。响应含 statusCode(number)、error 和 message(string)。 |
503 | PRICE_UNAVAILABLE,暂无可用快照。 |
400、404 和 503 业务错误响应包含 error(错误码)和 message(说明),均为字符串。