Unified Entry:python3 {baseDir}/cli.py <command> [options]
Command Quick Reference
| Command | Description | Example |
|---|---|---|
account |
Query account status | cli.py account |
contract-list |
Query purchase order list | cli.py contract-list --role BUYER --page 1 --size 10 |
contract-detail |
Query purchase order details | cli.py contract-detail --draft-no 88SYT20260324419012 |
contract-summary |
Query purchase order summary | cli.py contract-summary |
create-order |
Create purchase order | cli.py create-order --role BUYER --counterparty "对方登录名" --items '[{"productName":"商品","quantity":10,"unitPrice":"1.00"}]' |
sign-order |
Sign purchase order | cli.py sign-order --draft-no 88SYT20260324419012 |
sign-reject |
Reject signing | cli.py sign-reject --draft-no 88SYT20260324419012 |
confirm-receipt |
Confirm receipt | cli.py confirm-receipt --draft-no 88SYT20260324419012 |
invalidate-order |
Invalidate purchase order | cli.py invalidate-order --draft-no 88SYT20260324419012 |
refund-apply |
Apply for refund | cli.py refund-apply --draft-no 88SYT20260324419012 |
configure |
Configure AK | cli.py configure YOUR_AK |
check |
Check configuration status | cli.py check |
All commands output JSON:{"success": bool, "markdown": str, "data": {...}}
When displaying, directly output the markdown field; Agent analysis is appended afterward and must not be mixed into it.
Usage Flow
The Agent, based on user intent,directly executes the corresponding command, without needing to execute checkfirst each time.
Each command will return a clear error on its own in cases such as missing AK or abnormal account status; the Agent can respond according to the "Exception Handling" below.
Typical Purchase Order Path:account(check access) → create-order-> sign-order(buyer signs) → contract-detail(confirm status)
Security Statement
| Risk Level | Command | Agent Behavior |
|---|---|---|
| Read-only | account, contract-list, contract-detail, contract-summary, check | Execute directly |
| Configuration | configure | Execute after indicating the scope of impact |
| Write | create-order, sign-order, sign-reject, confirm-receipt, invalidate-order, refund-apply | User intent must be confirmed first; operations involving funds/status changes require secondary confirmation |
Global Write Rules (applicable to all write operations):
- The user's explicit intent must be confirmed first.
- For operations involving funds (refunds, confirming receipt) or status changes (invalidation, rejecting signing), the user must be asked forsecondary confirmationbefore execution.
- After a successful operation, it is recommended to call
contract-detailto query the latest status and report back to the user.
Exception Handling
When any command outputs success: false :
- First output the
markdownfield(which already contains a user-readable error description) - Then append guidance based on keywords:
| markdown keyword | Agent additional action |
|---|---|
| "AK not configured" or "invalid signature"/"401" | Output the AK guidance script |
| "not a main account" / "NOT_1688_MAIN_ACCOUNT" | Guide the user to operate with the main account, or go to the web page |
| "not signed" / "not real-name verified" / "no card bound" | Guide the user to go to the 88 Business Connect page to complete the relevant operations |
| "rate limited"/"429" | Suggest the user wait 1-2 minutes and try again |
| Other | Just output markdown |
AK guidance script
"You need to configure an AK first to use the 88 Business Connect features. Please log in to ClawHub, click the key button in the upper right corner to get your AK, then tell me: 'My AK is xxx'"
Execution prerequisites (required when a capability is triggered for the first time)
- Before executing
accountfor the first time: first read in fullreferences/capabilities/account.md - Before executing
contract-listfor the first time: first read in fullreferences/capabilities/contract-list.md - Before executing
contract-detailfor the first time: first read in fullreferences/capabilities/contract-detail.md - Before executing
contract-summaryfor the first time: first read in fullreferences/capabilities/contract-summary.md - Before executing
create-orderfor the first time: first read in fullreferences/capabilities/create-order.md - Before executing
sign-orderfor the first time: first read in fullreferences/capabilities/sign-order.md - Before executing
sign-rejectfor the first time: first read in fullreferences/capabilities/sign-reject.md - Before executing
confirm-receiptfor the first time: first read in fullreferences/capabilities/confirm-receipt.md - Before executing
invalidate-orderfor the first time: first read in fullreferences/capabilities/invalidate-order.md - Before executing
refund-applyfor the first time: first read in fullreferences/capabilities/refund-apply.md - Repeated calls to the same capability within the same session can reuse the already loaded knowledge; reread only when rules conflict or documents are updated.
General rules (required reading)
Before executing any business, read in full and comply with references/common-rules.md. Among them, the gateway domain、fixed input parameters、customer-facing Chinese、do not expose requests、external link tracelog、disclaimer、high-risk secondary confirmation、main account/purchase order only/bank card transfer only etc. arehard requirements, and must not be omitted or improvised.
Business restrictions
| Restriction item | Description |
|---|---|
| Account type | Only the main account is supported, sub-accounts are directed to operate on the web page |
| Transaction method | Only purchase orders are supported, contract-type transactions are directed to the web page |
| Payment method | Payments etc. are directed to the web page |
| Role description | Seller and merchant refer to the same role |
Disclaimer
Add at the end of each answer:
The above information is compiled based on the current query results; the specific details are subject to the 88 Business Connect page and the actual processing by the bank/platform. If it is inconsistent with your page, please refer to what is displayed on the page.