SuperAPI AI Directory

linkfox-temu-order-us

Office & productivity

View repository

Updated 10-16 06:23

About this skill

Temu US Order Management API (Manage Order)

This skill (linkfox-temu-order-us) covers Partner Platform for US order management-related bg.order.* / temu.local.order.* interfaces (menu_code and each sub_menu_code is subject to the Partner backend, see partner-us-catalog.md). For the European site, use linkfox-temu-order-eu; for the global site (non-US/EU), use linkfox-temu-order-global。

Currently integrated 8 interfaces; the remaining order interfaces will be added one by one according to the Partner documentation to references/apis/ and us_order_*.py。

Gateway (built into this skill):

Capability Method Path
Order OpenAPI (us_order_*、temu_us_proxy) POST https://tool-gateway.linkfox.com/temu/proxy
signed file download POST https://tool-gateway.linkfox.com/temu/fileDownload

Related skills

Scenario skill
Product list/details/edit/inventory/listing and delisting linkfox-temu-manage-product-us
Product publishing, categories, V2 add linkfox-temu-add-product-us
Price/supply price, pricing sheet linkfox-temu-price-us
Cancel order (buyer + seller) linkfox-temu-cancel-order-us
Returns and refunds linkfox-temu-returns-refunds-us
Fulfillment/shipping (including self-shipping) linkfox-temu-fulfillment-us
Gateway and Temu token This skill scripts/

How to call

  • API endpoint:POST /temu/proxy(different operations are distinguished by the request body; for complete parameters/responses/error codes see references/api.md)
  • Python script:python scripts/<脚本名>.py '<JSON 参数>' [--inline](for available scripts see the script list above)
  • Cost constraint: This tool consumes computing power; on failure/empty results, do not automatically switch keywords, paginate, or make repeated trial calls; if you need to continue searching, 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/<skill-name>-<timestamp>.json(<cwd> is the working directory when the script is executed, which in Claude Code is the current project directory;<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, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
  • Response body > 8 KB: after writing 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 written to disk)

Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.

Document Content
api.md Gateway, authentication, error codes, extended processes
partner-us-catalog.md Interface directory + Partner URL + scripts (updated as integrations are added)
apis/README.md Split into files by interface(apis/<type-slug>.md)

Resolve authentication and computing power issues

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

Abnormal situation

  • API Key not configured: the environment variable is not configured with LINKFOX_AGENT_API_KEYis also not configured LINKFOXAGENT_API_KEY。
  • Respond with 401 or 402 status code
  • Respond indicating insufficient compute power or balance: The message contains "insufficient compute power balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.

Default parameters

Field Default Description
site us Partner US
managementType semi-managed Semi-managed
tokenPurpose order-shipping Order/shipping scenario token (see access-token.md)

Authentication

  1. LinkFox:LINKFOXAGENT_API_KEY → Header Authorization + Token
  2. Temu:accessToken or storeKey(storeKey , it is recommended to include tokenPurpose=order-shipping)

Scripts (by type)

Script type Status
us_order_list_v2_get.py bg.order.list.v2.get Integrated
us_order_detail_v2_get.py bg.order.detail.v2.get Integrated
us_order_shippinginfo_v2_get.py bg.order.shippinginfo.v2.get Integrated
us_order_decryptshippinginfo_get.py bg.order.decryptshippinginfo.get Integrated
us_order_amount_query.py bg.order.amount.query Integrated
us_order_combinedshipment_list_get.py bg.order.combinedshipment.list.get Integrated
us_order_customization_get.py bg.order.customization.get Integrated
us_order_verification_upload.py temu.local.order.verification.upload Integrated
temu_us_proxy.py Any type General
temu_us_file_download.py Signed file download General

Integrating a new API (convention)

Each time you provide a Partner document (type + parameter table + optional sub_menu_code), it will:

  1. Add references/apis/<type-slug>.md(complete input/output parameter hierarchy)
  2. Add scripts/us_order_<slug>.py(call _us_order_script.run_cli)
  3. Update partner-us-catalog.md、apis/README.md and this table

Example

export LINKFOXAGENT_API_KEY="<key>"

# 订单列表 V2(待发货 parentOrderStatus=2)
python scripts/us_order_list_v2_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "pageNumber": 1,
    "pageSize": 20,
    "parentOrderStatus": 2
  }
}'

# 按父订单号查询(最多 20 个)
python scripts/us_order_list_v2_get.py '{
  "accessToken": "TOKEN",
  "request": {
    "parentOrderSnList": ["PO-123456789"]
  }
}'

# 订单详情 V2(须 parentOrderSn)
python scripts/us_order_detail_v2_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "parentOrderSn": "PO-123456789"
  }
}'

# 收货地址 V2(传 parentOrderSn)
python scripts/us_order_shippinginfo_v2_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "parentOrderSn": "PO-123456789"
  }
}'

# 敏感收货地址解密(传 parentOrderSn)
python scripts/us_order_decryptshippinginfo_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "parentOrderSn": "PO-123456789"
  }
}'

# 订单金额/供货价(ERP 对账,传 parentOrderSn)
python scripts/us_order_amount_query.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "parentOrderSn": "PO-123456789"
  }
}'

# 可合并发货订单组(request 可为空对象)
python scripts/us_order_combinedshipment_list_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {}
}'

# 定制商品内容(子订单号 orderSn,单次最多 10 个)
python scripts/us_order_customization_get.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "orderSnList": ["SO-123456789", "SO-987654321"]
  }
}'

# 上传 SN/IMEI 或二手鉴真(orderList[].orderSn)
python scripts/us_order_verification_upload.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "order-shipping",
  "request": {
    "orderList": [
      {
        "orderSn": "SO-123456789",
        "verificationInfo": [
          {
            "serialNumber": "SN-001234567890",
            "imeiNumberList": ["352099001761481"]
          }
        ]
      }
    ]
  }
}'

Feedback: skillName:linkfox-temu-order-us

Gateway and authorization scripts

Script Description
check_linkfox_token.py Verify LinkFox user Token
temu_token_guide.py Temu accessToken backend authorization steps
save_temu_access_token.py Save accessToken locally
list_temu_access_tokens.py List saved tokens
get_temu_access_token.py Read saved token
temu_proxy.py General gateway forwarding (multi-site)
temu_file_download.py Signed file download (multi-site)

Authorization instructions:references/access-token.md

Compute power consumption rules

Does not consume compute power.