cbs-4px-merchant-cli 0.0.8 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.4px.md +5 -5
  2. package/README.cainiao.md +5 -5
  3. package/README.md +5 -5
  4. package/dist/cli.js +92 -25
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/address.d.ts +7 -1
  7. package/dist/commands/address.js +29 -10
  8. package/dist/commands/address.js.map +1 -1
  9. package/dist/commands/auth.d.ts +1 -0
  10. package/dist/commands/auth.js +87 -0
  11. package/dist/commands/auth.js.map +1 -1
  12. package/dist/commands/config.d.ts +9 -2
  13. package/dist/commands/config.js +45 -12
  14. package/dist/commands/config.js.map +1 -1
  15. package/dist/commands/custody.d.ts +38 -0
  16. package/dist/commands/custody.js +176 -0
  17. package/dist/commands/custody.js.map +1 -0
  18. package/dist/commands/onboarding.d.ts +16 -7
  19. package/dist/commands/onboarding.js +73 -18
  20. package/dist/commands/onboarding.js.map +1 -1
  21. package/dist/commands/order.d.ts +23 -6
  22. package/dist/commands/order.js +60 -30
  23. package/dist/commands/order.js.map +1 -1
  24. package/dist/commands/platform.d.ts +8 -0
  25. package/dist/commands/platform.js +10 -1
  26. package/dist/commands/platform.js.map +1 -1
  27. package/dist/commands/problem.js +1 -1
  28. package/dist/commands/problem.js.map +1 -1
  29. package/dist/commands/product.d.ts +3 -0
  30. package/dist/commands/product.js +3 -0
  31. package/dist/commands/product.js.map +1 -1
  32. package/dist/services/api-client.d.ts +53 -12
  33. package/dist/services/api-client.js +235 -47
  34. package/dist/services/api-client.js.map +1 -1
  35. package/dist/types/index.d.ts +170 -12
  36. package/dist/utils/run-command.d.ts +6 -0
  37. package/dist/utils/run-command.js +13 -0
  38. package/dist/utils/run-command.js.map +1 -1
  39. package/package.json +1 -1
  40. package/skill/SKILL.md +16 -11
  41. package/skill/package.json +2 -1
  42. package/skill/reference/auth.md +20 -1
  43. package/skill/reference/custody.md +193 -0
  44. package/skill/reference/index.md +5 -2
  45. package/skill/reference/onboarding.md +79 -52
  46. package/skill/reference/order.md +84 -34
  47. package/skill/reference/platform.md +1 -1
  48. package/skill/reference/product.md +3 -0
  49. package/dist/digital-employee-skills/cbs-4px-merchant-cli-order-fulfillment.zip +0 -0
  50. package/dist/digital-employee-skills/cbs-cainiao-merchant-cli-order-fulfillment.zip +0 -0
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Command | Description |
6
6
  | --- | --- |
7
- | `fmc auth login` | 配置 API Key |
7
+ | `fmc auth login` | 手动配置 API Key |
8
+ | `fmc auth agentz` | 通过已登录的 agentz-cli 获取并配置 API Key(AgentZ / 数字员工环境) |
8
9
  | `fmc auth status` | 查看当前认证状态 |
9
10
 
10
11
  ## Command details
@@ -35,6 +36,24 @@
35
36
  fmc auth login --api-key sk-xxxxx
36
37
  ```
37
38
 
39
+ ### `fmc auth agentz`
40
+
41
+ | Field | Value |
42
+ | --- | --- |
43
+ | **Name** | `auth agentz` |
44
+ | **Description** | 检测本机 `agentz-cli`,调用 `agentz-cli client token` 获取当前 AgentZ 客户端的 accessToken,再生成并保存商家 API Key |
45
+ | **Usage** | `fmc auth agentz` |
46
+
47
+ 仅在已安装并登录 `agentz-cli` 的 AgentZ / 数字员工环境中使用。accessToken 仅在当前进程中用于生成 API Key,不会写入配置、终端输出或日志;成功生成的 API Key 会保存至 `~/.bportal/config.json`,输出仅展示脱敏值。
48
+
49
+ 若本机没有 `agentz-cli`、客户端未登录或生成失败,请改用原有 `fmc auth login --api-key <key>`,或由运行环境注入 `BPORTAL_API_KEY`。不要手动复制或提供 accessToken。
50
+
51
+ #### Examples
52
+
53
+ ```bash
54
+ fmc auth agentz
55
+ ```
56
+
38
57
  ### `fmc auth status`
39
58
 
40
59
  | Field | Value |
@@ -0,0 +1,193 @@
1
+ # `fmc custody` command
2
+
3
+ > 异常托管 — 改带电 / 改产品。配合 `fmc problem list` 使用。
4
+
5
+ ## 背景
6
+
7
+ 当订单在仓库上架时出现异常(如内置电池、磁性物品、无渠道等),商家可通过以下命令将订单
8
+ 改换为支持带电的物流产品或替换为有渠道的产品,从而让异常单恢复正常走货。
9
+
10
+ ### 异常原因编码速查
11
+
12
+ | abnormalReasonName | reasonCode | 处理流程 |
13
+ | --- | --- | --- |
14
+ | 内电 | NZDC | 改带电 → `custody electric` |
15
+ | 磁性物品 | CXW | 改带电 → `custody electric` |
16
+ | 无渠道 | NC | 改产品 → `custody recommend` |
17
+
18
+ `problem list --output json` 返回的 `abnormalProblems[].abnormalReasonName` 即为上表中文列。
19
+
20
+ ---
21
+
22
+ ## Command details
23
+
24
+ ### `fmc custody electric`
25
+
26
+ | Field | Value |
27
+ | --- | --- |
28
+ | **Name** | `custody electric` |
29
+ | **Description** | 查询指定异常单可更换的带电产品列表及差价 |
30
+ | **Usage** | `fmc custody electric <orderNo> [flags]` |
31
+
32
+ 需要 API Key 认证。
33
+
34
+ #### Arguments
35
+
36
+ | Argument | Type | Required | Description |
37
+ | --- | --- | --- | --- |
38
+ | `<orderNo>` | string | yes | 物流单号 |
39
+
40
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
41
+
42
+ #### Examples
43
+
44
+ ```bash
45
+ fmc custody electric FPX12345678
46
+ ```
47
+
48
+ ```bash
49
+ fmc custody electric FPX12345678 --output json
50
+ ```
51
+
52
+ #### Output (text mode)
53
+
54
+ ```
55
+ 可改带电产品
56
+ ──────────────────────────────────────────────────
57
+
58
+ ECO-PKG-BAT 经济小包带电版
59
+ 差价(RMB) +5.00
60
+
61
+ STD-EXP-BAT 标准快递带电版
62
+ 差价(RMB) +12.00
63
+ ```
64
+
65
+ ---
66
+
67
+ ### `fmc custody recommend`
68
+
69
+ | Field | Value |
70
+ | --- | --- |
71
+ | **Name** | `custody recommend` |
72
+ | **Description** | 获取 AI 推荐的改产品方案(含推荐产品及预估差价) |
73
+ | **Usage** | `fmc custody recommend <orderNo> --reason <code> [flags]` |
74
+
75
+ 需要 API Key 认证。
76
+
77
+ #### Arguments
78
+
79
+ | Argument | Type | Required | Description |
80
+ | --- | --- | --- | --- |
81
+ | `<orderNo>` | string | yes | 物流单号 |
82
+
83
+ #### Options
84
+
85
+ | Flag | Type | Required | Description |
86
+ | --- | --- | --- | --- |
87
+ | `--reason <code>` | string | yes | 异常原因编码,如 NC(无渠道) |
88
+
89
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
90
+
91
+ #### Examples
92
+
93
+ ```bash
94
+ fmc custody recommend FPX12345678 --reason NC
95
+ ```
96
+
97
+ ```bash
98
+ fmc custody recommend FPX12345678 --reason NC --output json
99
+ ```
100
+
101
+ #### Output (text mode)
102
+
103
+ ```
104
+ AI 推荐改产品方案
105
+ ──────────────────────────────────────────────────
106
+ 方案类型 改产品
107
+ 方案说明 该订单无渠道,推荐更换为有渠道的产品
108
+ 预估差价 +3.50
109
+
110
+ 推荐产品
111
+ ECO-PKG 4PX经济小包
112
+ STD-EXP 4PX标准快递
113
+ ```
114
+
115
+ ---
116
+
117
+ ### `fmc custody change`
118
+
119
+ | Field | Value |
120
+ | --- | --- |
121
+ | **Name** | `custody change` |
122
+ | **Description** | 批量提交改带电/改产品方案(写操作,会真实改变订单的物流产品) |
123
+ | **Usage** | `fmc custody change [flags]` |
124
+
125
+ 需要 API Key 认证。**这是写操作**,默认在终端二次确认;非交互环境必须加 `-y`。
126
+
127
+ #### Options
128
+
129
+ | Flag | Type | Required | Description |
130
+ | --- | --- | --- | --- |
131
+ | `--order-nos <nos>` | string | yes | 物流单号,多个用逗号分隔 |
132
+ | `--pk-code <code>` | string | yes | 目标产品编码 |
133
+ | `--reason <code>` | string | yes | 异常原因编码:NZDC(内电)/CXW(磁性物品)/NC(无渠道) |
134
+ | `-y, --yes` | boolean | no | 跳过确认 |
135
+
136
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
137
+
138
+ #### Examples
139
+
140
+ ```bash
141
+ # 改带电:将内电异常单改为带电产品
142
+ fmc custody change --order-nos FPX12345678 --pk-code ECO-PKG-BAT --reason NZDC
143
+ ```
144
+
145
+ ```bash
146
+ # 批量改产品:将多条无渠道异常单改为有渠道产品
147
+ fmc custody change --order-nos FPX001,FPX002,FPX003 --pk-code ECO-PKG --reason NC -y
148
+ ```
149
+
150
+ ```bash
151
+ # 先 dry-run 查看将发送的请求
152
+ fmc custody change --order-nos FPX12345678 --pk-code ECO-PKG-BAT --reason NZDC --dry-run
153
+ ```
154
+
155
+ #### Output (text mode)
156
+
157
+ ```
158
+ 改带电批量执行结果
159
+ ──────────────────────────────────────────────────
160
+ 总计 3 条
161
+ 成功 2
162
+ 失败 1
163
+
164
+ 失败明细
165
+ FPX003 pkCode[ECO-PKG-BAT]不在该异常单可选的改带电产品列表中
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 典型工作流
171
+
172
+ ### A. 内电/磁性物品 → 改带电
173
+
174
+ 1. `fmc problem list --abnormal-status unresolved --output json`
175
+ → 从结果中找到 `abnormalReasonName` 为 "内电" 或 "磁性物品" 的订单
176
+ 2. `fmc custody electric <orderNo>` → 查看可改的带电产品及差价
177
+ 3. 选择合适的产品后:`fmc custody change --order-nos <no> --pk-code <code> --reason NZDC`
178
+
179
+ ### B. 无渠道 → 改产品
180
+
181
+ 1. `fmc problem list --abnormal-status unresolved --output json`
182
+ → 从结果中找到 `abnormalReasonName` 为 "无渠道" 的订单
183
+ 2. `fmc custody recommend <orderNo> --reason NC` → 查看 AI 推荐产品
184
+ 3. 选择合适的产品后:`fmc custody change --order-nos <no> --pk-code <code> --reason NC`
185
+
186
+ ### C. 批量托管处理
187
+
188
+ 1. `fmc problem list --abnormal-status unresolved --size 100 --output json`
189
+ 2. 按 `abnormalReasonName` 分类订单
190
+ 3. 内电/磁性类 → 逐单 `custody electric` 查产品 → 汇总后一次 `custody change`
191
+ 4. 无渠道类 → 逐单 `custody recommend` 查推荐 → 汇总后一次 `custody change`
192
+ 5. 首次执行前向用户确认,确认后加 `-y` 批量执行
193
+ 6. 执行完毕后向用户报告成功/失败/差价
@@ -38,6 +38,9 @@ Command **details** are in sibling `<group>.md` files in this directory.
38
38
  | `fmc problem lastmile list` | 查询尾程异常列表 | [problem.md](problem.md) |
39
39
  | `fmc problem arrear list` | 查询欠费件列表 | [problem.md](problem.md) |
40
40
  | `fmc problem intercepted list` | 查询拦截件列表 | [problem.md](problem.md) |
41
+ | `fmc custody electric` | 查询可改带电产品列表 | [custody.md](custody.md) |
42
+ | `fmc custody recommend` | 获取 AI 推荐改产品方案 | [custody.md](custody.md) |
43
+ | `fmc custody change` | 批量提交改带电/改产品(写) | [custody.md](custody.md) |
41
44
  | `fmc service repair list` | 查询售后工单列表 | [service.md](service.md) |
42
45
  | `fmc service check list` | 查询查件列表 | [service.md](service.md) |
43
46
  | `fmc service complaint list` | 查询投诉列表 | [service.md](service.md) |
@@ -80,7 +83,6 @@ Command **details** are in sibling `<group>.md` files in this directory.
80
83
  | `fmc onboarding auth code` | 提交验证码完成实名认证(写) | [onboarding.md](onboarding.md) |
81
84
  | `fmc onboarding auth organ` | 发起企业实名认证(写) | [onboarding.md](onboarding.md) |
82
85
  | `fmc onboarding auth gat` | 提交港澳台/海外实名资料(写) | [onboarding.md](onboarding.md) |
83
- | `fmc onboarding auth remit` | 校验对公打款金额(写) | [onboarding.md](onboarding.md) |
84
86
  | `fmc onboarding brand list` | 查询可开通品牌 | [onboarding.md](onboarding.md) |
85
87
  | `fmc onboarding brand open` | 开通品牌并申请合同(写) | [onboarding.md](onboarding.md) |
86
88
  | `fmc onboarding contract list` | 查询合同列表 | [onboarding.md](onboarding.md) |
@@ -101,13 +103,14 @@ Command **details** are in sibling `<group>.md` files in this directory.
101
103
  | `order` | `get`, `list`, `address-book`, `country`, `create`, `edit`, `forecast`, `cancel`, `intercept` | [order.md](order.md) |
102
104
  | `product` | `recommend`, `list`, `detail`, `eta`, `search` | [product.md](product.md) |
103
105
  | `problem` | `list`, `suggest`, `notify list`, `notify type`, `lastmile list`, `arrear list`, `intercepted list` | [problem.md](problem.md) |
106
+ | `custody` | `electric`, `recommend`, `change` | [custody.md](custody.md) |
104
107
  | `service` | `repair list`, `check list`, `complaint list`, `detail`, `record`, `claim list`, `claim detail`, `claim reason` | [service.md](service.md) |
105
108
  | `finance` | `balance`, `bill list`, `daily-fee list`, `unbilled list`, `recharge list`, `fee detail`, `frozen list` | [finance.md](finance.md) |
106
109
  | `pickup` | `material list`, `material detail`, `material quota`, `address list` | [pickup.md](pickup.md) |
107
110
  | `notice` | `list`, `detail`, `message list`, `message detail`, `message unread` | [notice.md](notice.md) |
108
111
  | `customs` | `cargo list`, `commodity list`, `commodity detail`, `hscode search`, `registration info` | [customs.md](customs.md) |
109
112
  | `platform` | `account list`, `sync`, `sync-record list`, `order list`, `order detail`, `order push` | [platform.md](platform.md) |
110
- | `onboarding` | `progress`, `customer-type`, `auth schedule`, `auth indiv`, `auth code`, `auth organ`, `auth gat`, `auth remit`, `brand list`, `brand open`, `contract list`, `contract url` | [onboarding.md](onboarding.md) |
113
+ | `onboarding` | `progress`, `customer-type`, `auth schedule`, `auth indiv`, `auth code`, `auth organ`, `auth gat`, `brand list`, `brand open`, `contract list`, `contract url` | [onboarding.md](onboarding.md) |
111
114
  | `update` | (no subcommand) | [update.md](update.md) |
112
115
  | `skill` | `install`, `status`, `uninstall` | [update.md](update.md) |
113
116
 
@@ -17,7 +17,7 @@
17
17
  | 客户类型 | 经济主体 | 认证命令 |
18
18
  | --- | --- | --- |
19
19
  | 中国大陆(0) | 个人 | `auth indiv` → `auth code` |
20
- | 中国大陆(0) | 企业 | `auth indiv --agent` → `auth code --agent` → `auth organ`(必要时 `auth remit`) |
20
+ | 中国大陆(0) | 企业 | `auth indiv --agent` → `auth code --agent`(返回经办人账号 ID)→ `auth organ`(成功即认证完成,服务端自动跳过对公打款) |
21
21
  | 港澳台(1)/ 海外(2) | 个人 / 企业 | `auth gat`(提交资料后走人工审核) |
22
22
 
23
23
  认证通过后:`brand list` → `brand open` → `contract list` → `contract url`。
@@ -149,6 +149,8 @@ fmc onboarding auth schedule
149
149
  需要 API Key 认证。**写操作**,默认二次确认。仅中国大陆客户。
150
150
 
151
151
  命令返回的 `flowId` 是下一步 `auth code` 的入参,**必须记下来**。
152
+ 例外:带 `--agent` 且该经办人**已经实名过**时,返回的是经办人账号 ID(不再下发验证码),
153
+ 可直接作为 `auth organ --agent-account-id` 使用。
152
154
 
153
155
  #### Options
154
156
 
@@ -205,6 +207,9 @@ fmc onboarding auth indiv --name 张三 --cert-number 440301199001011234 \
205
207
 
206
208
  需要 API Key 认证。**写操作**,默认二次确认。
207
209
 
210
+ 返回的是**账户 ID**;经办人认证(`--agent`)时这个值就是 `auth organ` 要的
211
+ `--agent-account-id`,**必须记下来**。
212
+
208
213
  #### Options
209
214
 
210
215
  | Flag | Type | Required | Description |
@@ -231,8 +236,11 @@ fmc onboarding auth code --flow-id FLOW20260831001 --auth-code 123456 --agent -y
231
236
 
232
237
  ```
233
238
  ✔ 验证码校验通过
239
+ 返回 c5bd9d9a1b544d1bae50727555bda804
234
240
  ```
235
241
 
242
+ 经办人认证时,上面的“返回”就是经办人账号 ID,直接作为 `auth organ --agent-account-id` 使用。
243
+
236
244
  ---
237
245
 
238
246
  ### `fmc onboarding auth organ`
@@ -241,40 +249,86 @@ fmc onboarding auth code --flow-id FLOW20260831001 --auth-code 123456 --agent -y
241
249
  | --- | --- |
242
250
  | **Name** | `onboarding auth organ` |
243
251
  | **Description** | 发起企业实名认证 |
244
- | **Usage** | `fmc onboarding auth organ --name <name> --cert-number <no> [flags]` |
252
+ | **Usage** | `fmc onboarding auth organ --name <name> --cert-number <no> --agent-account-id <id> --legal-name <name> --state <state> --city <city> --county <county> --address <address> [flags]` |
245
253
 
246
254
  需要 API Key 认证。**写操作**,默认二次确认。
247
255
 
248
256
  前置条件:经办人已通过 `auth indiv --agent` + `auth code --agent` 完成个人实名。
249
- 若返回后 `auth schedule` 显示"待对公打款验证",用 `auth remit` 收尾。
257
+ **`--agent-account-id` 取自 `auth code --agent` 的返回值**(经办人已实名时,`auth indiv --agent`
258
+ 也直接返回该账号 ID),不要编造。
259
+
260
+ 企业名称、证件、法人、注册地址是**一次性提交**的:服务端对这些字段逐个做非空校验,
261
+ 缺一个就返回 `PARAM_REQUIRED`,认证不会落一半,所以要先把资料收齐再执行。
262
+
263
+ 返回值是**企业实名的 flowId**。对公打款环节已下线:服务端在认证成功后会
264
+ **自动跳过对公打款验证**,`auth schedule` 直接变成 `已完成 (2)` 就可以 `brand open`,
265
+ **无需再做任何打款操作**。极少数存量流程可能停在 `待对公打款验证 (4)`,属异常,转人工。
266
+
267
+ **这个 flowId 是唯一来源**:`auth schedule` 不返回 flowId,CLI 也没有反查命令,
268
+ 所以要在当次会话里记下;没记下又遇到状态 `4` 只能转人工。
250
269
 
251
270
  #### Options
252
271
 
253
272
  | Flag | Type | Required | Description |
254
273
  | --- | --- | --- | --- |
255
274
  | `--name <name>` | string | yes | 企业名称 |
256
- | `--cert-number <no>` | string | yes | 统一社会信用代码 |
257
- | `--cert-type <type>` | string | no | 证件类型 |
258
- | `--agent-account-id <id>` | string | no | 经办人账号 ID |
275
+ | `--cert-number <no>` | string | yes | 企业证件号(营业执照即统一社会信用代码) |
276
+ | `--agent-account-id <id>` | string | yes | 经办人账号 ID,来自 `auth code --agent` 的返回值 |
277
+ | `--legal-name <name>` | string | yes | 法定代表人姓名 |
278
+ | `--state <name>` | string | yes | 注册地省/州 |
279
+ | `--city <name>` | string | yes | 注册地市 |
280
+ | `--county <name>` | string | yes | 注册地区/县 |
281
+ | `--address <address>` | string | yes | 注册地详细地址(营业执照上的地址) |
282
+ | `--legal-cert-number <no>` | string | 条件必填 | 法人证件号(身份证号)。`--auth-type 0`(默认)时必填 |
283
+ | `--legal-cert-type <type>` | string | no | 法人证件类型:`0` 身份证(默认 `0`) |
284
+ | `--auth-type <type>` | string | no | 认证方式:`0` 企业四要素、`1` 组织机构三要素(默认 `0`) |
285
+ | `--cert-type <type>` | string | no | 企业证件类型:`0` 营业执照、`1` 组织机构代码证、`2` 工商注册号 …(默认 `0`) |
286
+ | `--country <name>` | string | no | 国家/地区名称(默认 `中国大陆`) |
287
+ | `--country-code <code>` | string | no | 国家数字编码(默认 `485`) |
288
+ | `--alpha2-code <code>` | string | no | 国家二字码(默认 `CN`) |
259
289
  | `-y, --yes` | boolean | no | 跳过交互确认(非交互环境必传) |
260
290
 
291
+ 三要素认证(`--auth-type 1`)只对少数白名单客户开放,普通企业客户用默认的四要素。
292
+ `--cert-number`、`--legal-cert-number` 在 `--verbose` / `--dry-run` 的打印中已遮蔽为 `****`,
293
+ 但**真实值仍会随请求发送**。
294
+
261
295
  支持全局选项: `--output`, `--verbose`, `--dry-run`
262
296
 
263
297
  #### Examples
264
298
 
265
299
  ```bash
266
- fmc onboarding auth organ --name 深圳市某某科技有限公司 \
267
- --cert-number 91440300MA5XXXXXXX
300
+ # 四要素认证(默认):企业 + 法人 + 注册地址一次提交
301
+ fmc onboarding auth organ \
302
+ --name 深圳市某某科技有限公司 \
303
+ --cert-number 91440300MA5XXXXXXX \
304
+ --agent-account-id c5bd9d9a1b544d1bae50727555bda804 \
305
+ --legal-name 张三 \
306
+ --legal-cert-number 440301199001011234 \
307
+ --state 广东省 --city 深圳市 --county 南山区 \
308
+ --address "科技园某某大厦 1001"
309
+ ```
310
+
311
+ ```bash
312
+ # 三要素认证(白名单客户):无需法人证件号
313
+ fmc onboarding auth organ \
314
+ --name 某某社会团体 --cert-number 91440300MA5XXXXXXX --auth-type 1 \
315
+ --cert-type 7 --agent-account-id c5bd9d9a1b544d1bae50727555bda804 \
316
+ --legal-name 张三 \
317
+ --state 广东省 --city 深圳市 --county 南山区 --address "科技园某某大厦 1001" -y
268
318
  ```
269
319
 
270
320
  #### Output (text mode)
271
321
 
272
322
  ```
273
323
  ✔ 已发起企业实名认证
324
+ flowId FLOW20260831001
274
325
 
275
- 待对公打款验证时,用 auth remit --flow-id <flowId> --amount <分> 完成
326
+ 用 auth schedule 查看认证结果(已完成即可开通品牌,无需对公打款)
276
327
  ```
277
328
 
329
+ 对公打款环节已下线:`auth organ` 成功后服务端自动跳过打款,`auth schedule` 得到
330
+ `已完成 (2)` 就可以直接 `brand open`。
331
+
278
332
  ---
279
333
 
280
334
  ### `fmc onboarding auth gat`
@@ -344,44 +398,6 @@ fmc onboarding auth gat --customer-profile 2 --entity 2 \
344
398
 
345
399
  ---
346
400
 
347
- ### `fmc onboarding auth remit`
348
-
349
- | Field | Value |
350
- | --- | --- |
351
- | **Name** | `onboarding auth remit` |
352
- | **Description** | 校验企业对公打款金额 |
353
- | **Usage** | `fmc onboarding auth remit --flow-id <id> --amount <cents> [flags]` |
354
-
355
- 需要 API Key 认证。**写操作**,默认二次确认。
356
-
357
- 金额单位是**分**,不是元——传 `1` 表示 1 分。校验有重试次数限制,填错会消耗次数,
358
- 所以确认后再提交。
359
-
360
- #### Options
361
-
362
- | Flag | Type | Required | Description |
363
- | --- | --- | --- | --- |
364
- | `--flow-id <id>` | string | yes | 认证流程 ID |
365
- | `--amount <cents>` | string | yes | 打款金额,单位:分 |
366
- | `-y, --yes` | boolean | no | 跳过交互确认(非交互环境必传) |
367
-
368
- 支持全局选项: `--output`, `--verbose`, `--dry-run`
369
-
370
- #### Examples
371
-
372
- ```bash
373
- # 收到 0.37 元打款 → 传 37
374
- fmc onboarding auth remit --flow-id FLOW20260831001 --amount 37
375
- ```
376
-
377
- #### Output (text mode)
378
-
379
- ```
380
- ✔ 打款金额校验通过
381
- ```
382
-
383
- ---
384
-
385
401
  ### `fmc onboarding brand list`
386
402
 
387
403
  | Field | Value |
@@ -437,7 +453,7 @@ fmc onboarding brand list --customer-type 1 --output json
437
453
  需要 API Key 认证。**写操作**,默认二次确认。
438
454
 
439
455
  前置条件:中国大陆客户且已完成实名认证。开通后合同即进入申请流程,
440
- 用 `contract list` / `contract url` 继续。
456
+ 用 `contract list` 拿到合同编号与状态码,再 `contract url <合同编号> --status <状态码>` 继续。
441
457
 
442
458
  #### Options
443
459
 
@@ -474,7 +490,7 @@ fmc onboarding brand open --service-code DSS \
474
490
  ```
475
491
  ✔ 品牌开通与合同申请已提交
476
492
 
477
- 用 contract list 查看合同,contract url <合同编号> 获取签署链接
493
+ 用 contract list 查看合同,contract url <合同编号> --status <状态码> 获取签署链接
478
494
  ```
479
495
 
480
496
  ---
@@ -536,7 +552,7 @@ fmc onboarding contract list --page 2 --output json
536
552
  | --- | --- |
537
553
  | **Name** | `onboarding contract url` |
538
554
  | **Description** | 获取合同签署链接或下载链接 |
539
- | **Usage** | `fmc onboarding contract url <contractCode> [flags]` |
555
+ | **Usage** | `fmc onboarding contract url <contractCode> --status <status> [flags]` |
540
556
 
541
557
  需要 API Key 认证。
542
558
 
@@ -548,17 +564,24 @@ fmc onboarding contract list --page 2 --output json
548
564
  | Flag | Type | Required | Description |
549
565
  | --- | --- | --- | --- |
550
566
  | `<contractCode>` | string | yes | 合同编号(从 `contract list` 获取) |
567
+ | `--status <status>` | string | yes | 合同状态码(从 `contract list` 的状态原样传入) |
551
568
 
552
569
  支持全局选项: `--output`, `--verbose`, `--dry-run`
553
570
 
571
+ `--status` 必填,且**只能取自 `contract list`**:先 `contract list` 拿到该合同的
572
+ `合同编号` + `状态`,再原样传进来。禁止凭猜测或为了拿签署链接而伪造状态码
573
+ (服务端会重新查合同详情,最终以**实际状态**决定返回签署链接还是下载链接)。
574
+
554
575
  #### Examples
555
576
 
556
577
  ```bash
557
- fmc onboarding contract url CT20260801001
578
+ # 先查列表拿到编号与状态,再取链接
579
+ fmc onboarding contract list
580
+ fmc onboarding contract url CT20260801001 --status 4
558
581
  ```
559
582
 
560
583
  ```bash
561
- fmc onboarding contract url CT20260801001 --output json
584
+ fmc onboarding contract url CT20260801001 --status 4 --output json
562
585
  ```
563
586
 
564
587
  #### Output (text mode)
@@ -567,7 +590,11 @@ fmc onboarding contract url CT20260801001 --output json
567
590
  合同链接
568
591
  ──────────────────────────────────────────────────
569
592
  合同编号 CT20260801001
593
+ 合同状态 签署中 (4)
570
594
  链接 https://esign.example.com/sign/abc123
571
595
 
572
596
  签署中的合同返回签署链接,其余状态返回下载链接;请勿频繁调用
573
597
  ```
598
+
599
+ 漏传 `--status` 会被 CLI 直接拒绝(commander 报 `required option ... not specified`),
600
+ 不会发出请求。