SuperAPI AI Directory

linkfox-temu-cancel-order-us

Coding & development

View repository

Updated 10-16 09:58

About this skill

Temu US Site — Cancel Order (Buyer + Seller)

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 see references/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 variable SESSION_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 --inline to 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 configured LINKFOXAGENT_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

  1. LinkFox:LINKFOXAGENT_API_KEY → Header Authorization + Token
  2. Temu:accessToken or storeKey(recommended tokenPurpose=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)

  1. Add references/apis/<type-slug>.md
  2. Add scripts/us_cancel_* or us_seller_cancel_*(call _us_cancel_order_script.run_cli)
  3. 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.