SuperAPI AI Directory

linkfox-temu-cancel-order-global

Coding & development

View repository

Updated 10-16 00:00

About this skill

Temu Global Site — Cancel Order (Buyer + Seller)

This skill (linkfox-temu-cancel-order-global) covers Global region (site=global, non-US/Europe) of Order / Cancel Order related endpoints:

  • 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-global-catalog.md(6 endpoints). For the US site, use linkfox-temu-cancel-order-us; for the Europe site, use linkfox-temu-cancel-order-eu。

Gateway (built into this skill):

Capability Method Path
Cancel Order OpenAPI (global_cancel_*、global_seller_cancel_*、temu_global_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/details/shipping/address/amount linkfox-temu-order-global
US site cancel order linkfox-temu-cancel-order-us
Europe site cancel order linkfox-temu-cancel-order-eu
Fulfillment/Shipping linkfox-temu-fulfillment-global
Product management linkfox-temu-manage-product-global
Returns and refunds linkfox-temu-returns-refunds-us / linkfox-temu-returns-refunds-eu(site=global)
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 are listed in the script overview above)
  • Cost constraint: This tool consumes compute; on failure/empty results, do not automatically switch keywords, paginate, or repeatedly probe; if further searching is needed, first explain to the user that additional consumption will be incurred.

Output strategy (default script behavior):

  • Alwayswrite the complete response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-cancel-order-global-<timestamp>.json(<cwd> is the working directory when the script is executed, i.e. the current project directory in Claude Code;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's 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 check 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 the entire JSON entering the context.

Resolve authentication and compute issues

When the following abnormal situations occur, use references/onboarding.md to guide problem resolution:

Abnormal situations

  • API Key not configured: environment variable not configured LINKFOX_AGENT_API_KEY, and LINKFOXAGENT_API_KEY。
  • response 401 or 402 status code
  • response indicates insufficient compute or balance: message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/plan expired/recharge required/please recharge", or content with similar meaning.

Default parameters

Field Default Description
site global Partner Global (non-US/EU)
managementType semi-managed Semi-managed
tokenPurpose order-shipping Order/cancellation 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
global_cancel_aftersales_cancel_list_get.py bg.aftersales.cancel.list.get
global_cancel_aftersales_cancel_agree.py bg.aftersales.cancel.agree

Seller cancellation

Script type
global_seller_cancel_order_cancel_appeal_apply.py temu.order.cancel.appeal.apply
global_seller_cancel_order_cancel_appeal_result_get.py temu.order.cancel.appeal.result.get
global_seller_cancel_order_cancel_outofstock_apply.py temu.order.cancel.outofstock.apply
global_seller_cancel_order_cancel_outofstock_result_get.py temu.order.cancel.outofstock.result.get

General

Script Description
temu_global_proxy.py Any type
temu_global_file_download.py signed file download

Integrate a new interface (convention)

  1. Add references/apis/<type-slug>.md
  2. Add scripts/global_cancel_* or global_seller_cancel_*(call _global_cancel_order_script.run_cli)
  3. Update partner-global-catalog.md、apis/README.md

Example

export LINKFOXAGENT_API_KEY="<key>"

# 买家取消 — 待处理列表
python scripts/global_cancel_aftersales_cancel_list_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "site": "global",
  "request": { "pageNo": 1, "pageSize": 20, "afterSalesStatusGroup": 8 }
}'

# 卖家 — 缺货取消申请
python scripts/global_seller_cancel_order_cancel_outofstock_apply.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "site": "global",
  "request": {
    "parentOrderSn": "PO-123456789",
    "orderSnList": ["O-111111111"]
  }
}'

Feedback: skillName:linkfox-temu-cancel-order-global

Gateway and authorization script

Authorization description:references/access-token.md

Computing power consumption rules

No computing power is consumed.