**版本：202601**

# 查询可用物流线路

**POST** `/openapi/2026-01/shipping-lines/available-lines`

获取指定订单和地址可用的物流方案列表。

## 请求

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `order_id` string (required)

  订单 ID
- `country_code` string (required)

  国家代码（如 CN）
- `province_code` string

  省份代码。传 `ALL` 可匹配所有省份（大多数国家的默认行为）。

  **英国 (GB) 特殊处理：** 由于英格兰 (GB-ENG)、苏格兰 (GB-SCT)、威尔士 (GB-WLS)、北爱尔兰 (GB-NIR) 各地区运费差异较大，留空将无法匹配任何运费方案。必须：

  *   传入具体省份编码（如 `GB-ENG`），或
  *   传入 `ALL`，或
  *   传入 `zip`（邮编），系统会根据邮编前缀自动推导省份编码
- `zip` string

  邮政编码。对于英国 (GB) 地址，当未提供 `province_code` 时，系统会根据邮编前缀自动推导省份编码

```json
{
  "order_id": "string",
  "country_code": "string",
  "province_code": "string",
  "zip": "string"
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `shipping_lines` object[]

    运费行列表

    *   Array \[

    - `delivery_method` int32

      配送方式类型：`1` 表示快递配送，`2` 表示本地配送
    - `desc` string

      配送线路描述
    - `id` string

      配送 ID
    - `location_id` string

      位置 ID
    - `name` string

      名称
    - `plan_code` string

      套餐代码
    - `shipping_price` string

      运费金额
    - `support_cod` int32

      是否支持货到付款（COD）
    *   \]
  - `invalid_products` string[]

    无效商品列表
  - `message` string

    第三方计费失败原因
  - `state` string

    业务状态码：`success`（成功）、`empty_plan`（国家或省份无匹配方案）、`empty_shipping_plan`（未命中配送方案条件）、`invalid_product`（商品已被移除）

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "shipping_lines": [
      {
        "delivery_method": 0,
        "desc": "string",
        "id": "string",
        "location_id": "string",
        "name": "string",
        "plan_code": "string",
        "shipping_price": "string",
        "support_cod": 0
      }
    ],
    "invalid_products": [
      "string"
    ],
    "message": "string",
    "state": "string"
  }
}
```
