**版本：202601**

# 查询订单数量

**GET** `/openapi/2026-01/orders/count`

返回符合指定查询条件的订单总数。

## 请求

**Query参数**

- `ids` string[]

  根据订单 ID 过滤。 示例：?ids=1001&ids=1002
- `status` string[]

  按订单状态过滤。

  *   opened: 待支付。
  *   cancelled: 已取消。
  *   placed: 进行中。
  *   finished: 已完成。 示例：?status=opened&status=finished
- `fulfillment_status` string[]

  按订单物流状态过滤。

  *   initialled: 初始。
  *   waiting: 待发货。
  *   partially\_shipped: 部分发货。
  *   shipped: 全部发货。
  *   partially\_finished: 部分收货。
  *   finished: 全部收货。
  *   cancelled: 已取消。
  *   returning: 退货中。
  *   partially\_returned: 部分退货。
  *   returned: 全部退货。 示例：?fulfillment\_status=waiting&fulfillment\_status=shipped
- `financial_status` string[]

  按支付状态过滤。

  *   waiting: 待支付。
  *   paying: 支付审核中。
  *   authorized: 已授权。
  *   partially\_paid: 部分支付。
  *   paid: 已支付。
  *   cancelled: 已取消。
  *   failed: 支付失败。
  *   refunding: 退款中。
  *   refund\_failed: 退款失败。
  *   refunded: 已全退。
  *   partially\_refunded: 部分退。 示例：?financial\_status=waiting&financial\_status=paid
- `recovery_status` string[]

  按召回状态过滤：

  *   `waiting`: 等待召回
  *   `sending`: 召回通知发送中
  *   `recalling`: 召回进行中
  *   `failed`: 召回失败
  *   `success`: 召回成功
- `location_id` string

  按地址 ID 过滤
- `keyword` string

  搜索关键字
- `keyword_scope_fields` string[]

  搜索关键字的适用字段范围。 示例：?keyword\_scope\_fields=order\_no&keyword\_scope\_fields=email
- `customer_id` string

  按顾客 ID 过滤
- `total_min` double

  订单金额最小值
- `total_max` double

  订单金额最大值
- `created_at_min` string

  创建时间起始值
- `created_at_max` string

  创建时间结束值
- `updated_at_min` string

  更新时间起始值
- `updated_at_max` string

  更新时间结束值
- `placed_at_min` string

  下单时间起始值
- `placed_at_max` string

  下单时间结束值
- `sales_platform` string[]

  按销售渠道过滤。 示例：?sales\_platform=value1&sales\_platform=value2
- `admin_hasfilter` boolean

  同 B 端未完成订单的 has\_filter 过滤规则：

  *   `true`: 应用过滤条件
  *   `false`: 不应用过滤条件
- `finished_at_min` string

  完成时间起始值
- `finished_at_max` string

  完成时间结束值
- `fulfilled_at_min` string

  履约完成时间起始值
- `fulfilled_at_max` string

  履约完成时间结束值
- `last_referrer_show_created_at_min` string

  按最后一次互动来源时间过滤的起始值（如 2018-11-02T12:30:10Z）
- `last_referrer_show_created_at_max` string

  按最后一次互动来源时间过滤的结束值（如 2018-11-02T12:30:10Z）
- `source_name_created_at_min` string

  按首次互动来源时间过滤的起始值（如 2018-11-02T12:30:10Z）
- `source_name_created_at_max` string

  按首次互动来源时间过滤的结束值（如 2018-11-02T12:30:10Z）
- `shipping_emails` string[]

  按收货地址邮箱过滤。 示例：?shipping\_emails=[a@example.com](mailto:a@example.com)&shipping\_emails=[b@example.com](mailto:b@example.com)
- `shipping_phones` string[]

  按收货地址手机号过滤。 示例：?shipping\_phones=13800000001&shipping\_phones=13800000002
- `browser_ips` string[]

  按下单 IP 地址过滤。 示例：?browser\_ips=1.2.3.4&browser\_ips=5.6.7.8
- `product_ids` string[]

  按商品 ID 过滤。 示例：?product\_ids=2001&product\_ids=2002
- `skus` string[]

  按 SKU 过滤。 示例：?skus=SKU0001&skus=SKU0002
- `spus` string[]

  按 SPU 过滤。 示例：?spus=SPU0001&spus=SPU0002
- `order_tags` string[]

  按订单标签过滤。 示例：?order\_tags=vip&order\_tags=new
- `customer_emails` string[]

  按顾客邮箱过滤。 示例：?customer\_emails=[c@example.com](mailto:c@example.com)&customer\_emails=[d@example.com](mailto:d@example.com)
- `fuzzy_fields` string[]

  模糊匹配的字段名列表，与 fuzzy\_keywords / fuzzy\_relation 联合使用。 可选值：

  *   `name`：顾客名称（非收货人名称）
  *   `number`：订单编号
  *   `id`：订单 ID
  *   `sku`：商品 SKU（快照数据）。精确匹配请改用 `skus`
  *   `spu`：商品 SPU（快照数据）。精确匹配请改用 `spus`
  *   `tag_list`：订单标签。精确匹配请改用 `order_tags`
  *   `shipping_email`：收货地址邮箱。精确匹配请改用 `shipping_emails`
  *   `shipping_phone`：收货地址手机号。精确匹配请改用 `shipping_phones`
  *   `browser_ip`：下单 IP。精确匹配请改用 `browser_ips`
  *   `product_tags`：商品标签（快照数据）
  *   `product_title`：商品标题（快照数据）
  *   `credit_card_number`：支付卡号后四位
  *   `source`：首次访问落地页
  *   `source_name`：首次访问来源
  *   `tracking_number`：物流单号
  *   `shipping_line_name`：物流方案名称
  *   `line_item_vendor`：商品供应商
  *   `discount_code`：优惠码
  *   `shipping_address_extra_info`：特殊物流字段信息
  *   `transaction_id`：支付交易号
  *   `customer_id`：顾客 ID
  *   `last_landing_url`：最后访问落地页
  *   `last_referrer_show`：最后访问来源
  *   `country`：国家名称（快照数据，不支持中英文任意搜索）
  *   `shop_name`：POS 店铺名称
  *   `staff_contact`：POS 员工 注：当字段同时存在精确匹配数组参数（sku/spu/tag\_list/shipping\_email/shipping\_phone/browser\_ip）时， 完整值查找请走对应数组参数；fuzzy 仅用于前缀或片段搜索。 示例：?fuzzy\_fields=name&fuzzy\_fields=number
- `fuzzy_keywords` string[]

  模糊关键字列表，任一关键字在 fuzzy\_fields 任一字段命中即视为匹配。 示例：?fuzzy\_keywords=iphone&fuzzy\_keywords=vip
- `fuzzy_relation` string

  fuzzy\_fields 字段之间的关系："and" 或 "or"，默认 "or"

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `count` int32

    符合过滤条件的订单总数

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "count": 0
  }
}
```
