SuperAPI AI Directory

linkfox-temu-promotion-eu

Coding & development

View repository

Updated 10-16 06:23

About this skill

Temu Europe — E-commerce Promotion

This skill (linkfox-temu-promotion-eu) covers Partner Platform for EU Promotion / e-commerce promotion(promotional campaigns, coupons, campaign enrollment, etc.; the Partner backend menu may display it as Marketing/Promotion) related bg.* / temu.* interfaces (menu_code and each sub_menu_code are subject to the Partner backend, see partner-eu-catalog.md)。

Integrated 6 Partner Promotion interfaces, see the list at partner-eu-catalog.md。

Gateway (built into this skill):

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

Related skills

Scenario skill
Promotion/marketing campaigns(this skill) linkfox-temu-promotion-eu
Ads linkfox-temu-ads-eu
Product list/detail/edit/inventory/listing and delisting linkfox-temu-manage-product-eu
Product publishing linkfox-temu-add-product-eu
Price/supply price, pricing sheet linkfox-temu-price-eu
Order list/detail linkfox-temu-order-eu
Returns and refunds linkfox-temu-returns-refunds-eu
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](available scripts are listed in the script overview above)
  • Cost constraint: this tool consumes compute; on failure/empty results you must not automatically switch keywords, paginate, or repeatedly probe; 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, the length of the largest list field + the 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 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 situations

  • API Key not configured: the environment variable is not configured with LINKFOX_AGENT_API_KEY, nor is 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 a similar meaning.

Default parameters

Field Default Description
site eu Partner EU
managementType semi-managed Semi-hosted (for specific APIs, refer to the Partner documentation)
tokenPurpose product-inventory Consistent with product/promotion scenarios (see access-token.md)

Authentication

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

Scripts

Script Description
temu_eu_proxy.py Any type
temu_eu_file_download.py Signed download
eu_promotion_activity_query.py bg.promotion.activity.query
eu_promotion_activity_candidate_goods_query.py bg.promotion.activity.candidate.goods.query
eu_promotion_activity_goods_query.py bg.promotion.activity.goods.query
eu_promotion_activity_goods_enroll.py bg.promotion.activity.goods.enroll
eu_promotion_activity_goods_operation_query.py bg.promotion.activity.goods.operation.query
eu_promotion_activity_goods_update.py bg.promotion.activity.goods.update

Integrating a new API (convention)

Each time you provide a Partner document (type + sub_menu_code + URL + Request/Response parameter table), we will:

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

Example (generic proxy)

export LINKFOXAGENT_API_KEY="<key>"

python scripts/temu_eu_proxy.py '{
  "accessToken": "TOKEN",
  "tokenPurpose": "product-inventory",
  "type": "<TEMU_API_TYPE>",
  "params": {
    "request": {}
  }
}'

Feedback: skillName:linkfox-temu-promotion-eu

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 Generic gateway forwarding (multi-site)
temu_file_download.py Signed file download (multi-site)

Authorization instructions:references/access-token.md

Compute consumption rules

Does not consume compute.