This skill (linkfox-temu-cancel-order-us) covers Partner Platform for US Cancel Orderrelated interfaces:
- Buyer/Consumer:
bg.aftersales.cancel.list.get、bg.aftersales.cancel.agree - Store/Seller:
temu.order.cancel.appeal.apply、temu.order.cancel.appeal.result.get、temu.order.cancel.outofstock.apply、temu.order.cancel.outofstock.result.get
See partner-us-catalog.md(6 interfaces).
Gateway (built into this skill):
| Capability | Method | Path |
|---|---|---|
Cancel Order OpenAPI (us_cancel_*、us_seller_cancel_*、temu_us_proxy) |
POST | https://tool-gateway.linkfox.com/temu/proxy |
| Signature file download | POST | https://tool-gateway.linkfox.com/temu/fileDownload |
Related skills
| Scenario | skill |
|---|---|
| Order list/detail/shipping/address/amount | linkfox-temu-order-us |
| Europe site cancel order | linkfox-temu-cancel-order-eu |
| Global site (non-US/EU) cancel order | linkfox-temu-cancel-order-global |
| Fulfillment/Shipping | linkfox-temu-fulfillment-us |
| Product management | linkfox-temu-manage-product-us |
| Returns and refunds | linkfox-temu-returns-refunds-us |
| Gateway and Temu token | This skill scripts/ |
How to call
- API endpoint:
POST /temu/proxy(different operations are distinguished by request body; for complete parameters/responses/error codes seereferences/api.md) - Python script:
python scripts/<脚本名>.py '<JSON 参数>' [--inline](available scripts see the script list above) - Cost constraint: This tool consumes compute; on failure/empty results do not automatically change keywords, paginate, or repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.
Output strategy (script default behavior):
- Alwayswrite the complete response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-cancel-order-us-<timestamp>.json(<cwd>is the working directory when the script runs, which in Claude Code is the current project directory;<session>is taken from the environment variableSESSION_ID, automatically aggregated according to the user task;writing to /tmp is prohibited, if the current directory is not writable then report an error) - Response body ≤ 8 KB: after saving to disk, print the complete JSON to stdout
- Response body > 8 KB: after saving to disk, stdout outputs only a summary (top-level fields, common counts such as
total/costToken, length of the largest list field + first 3 samples) - Add
--inlineto force full printing to stdout (also saved to disk)
Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.
Resolve authentication and compute issues
When the following abnormal situations occur, use references/onboarding.md to guide resolution:
Abnormal situation
- API Key not configured: environment variable not configured
LINKFOX_AGENT_API_KEY, and also not configuredLINKFOXAGENT_API_KEY。 - Response 401 or 402 status code
- Response indicates insufficient compute or balance: the message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with similar meaning.
Default parameters
| Field | Default | Description |
|---|---|---|
| site | us |
Partner US |
| managementType | semi-managed |
Semi-managed |
| tokenPurpose | order-shipping |
Order/cancel scenario token |
Authentication
- LinkFox:
LINKFOXAGENT_API_KEY→ HeaderAuthorization+Token - Temu:
accessTokenorstoreKey(recommendedtokenPurpose=order-shipping)
Scripts (by type)
Buyer cancellation
| Script | type |
|---|---|
us_cancel_aftersales_cancel_list_get.py |
bg.aftersales.cancel.list.get |
us_cancel_aftersales_cancel_agree.py |
bg.aftersales.cancel.agree |
Seller cancellation
| Script | type |
|---|---|
us_seller_cancel_order_cancel_appeal_apply.py |
temu.order.cancel.appeal.apply |
us_seller_cancel_order_cancel_appeal_result_get.py |
temu.order.cancel.appeal.result.get |
us_seller_cancel_order_cancel_outofstock_apply.py |
temu.order.cancel.outofstock.apply |
us_seller_cancel_order_cancel_outofstock_result_get.py |
temu.order.cancel.outofstock.result.get |
General
| Script | Description |
|---|---|
temu_us_proxy.py |
Any type |
temu_us_file_download.py |
signed file download |
Integrate a new API (convention)
- Add
references/apis/<type-slug>.md - Add
scripts/us_cancel_*orus_seller_cancel_*(call_us_cancel_order_script.run_cli) - Update partner-us-catalog.md、apis/README.md
Example
export LINKFOXAGENT_API_KEY="<key>"
# 买家取消 — 待处理列表
python scripts/us_cancel_aftersales_cancel_list_get.py '{
"accessToken": "TOKEN",
"tokenPurpose": "order-shipping",
"request": { "pageNo": 1, "pageSize": 20, "afterSalesStatusGroup": 8 }
}'
# 卖家 — 缺货取消申请
python scripts/us_seller_cancel_order_cancel_outofstock_apply.py '{
"accessToken": "TOKEN",
"tokenPurpose": "order-shipping",
"request": {
"parentOrderSn": "PO-123456789",
"orderSnList": ["O-111111111"]
}
}'
Feedback: skillName:linkfox-temu-cancel-order-us
Gateway and authorization scripts
| Script | Description |
|---|---|
check_linkfox_token.py |
Verify LinkFox Token |
save_temu_access_token.py / list_temu_access_tokens.py / get_temu_access_token.py |
Local token |
temu_token_guide.py |
Temu authorization guide |
Authorization instructions:references/access-token.md
Compute power consumption rules
No compute power is consumed.