This skill (linkfox-temu-returns-refunds-eu) covers Partner Platform for EU Returns & Refunds / e-commerce returns and refunds(and related After-sales returns and refunds category) related bg.* / temu.* endpoints (menu_code and each sub_menu_code subject to the Partner backend, see partner-eu-catalog.md)。
Integrated 9 Partner Return and Refund endpoints, see the list at partner-eu-catalog.md。
Gateway (built into this skill):
| Capability | Method | Path |
|---|---|---|
Returns and refunds OpenAPI (eu_returns_refunds_*、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 |
|---|---|
| Returns and refunds(this skill) | linkfox-temu-returns-refunds-eu |
| Buyer-initiatedCancel order(not the full returns and refunds process) | linkfox-temu-cancel-order-eu |
| Seller-initiatedCancel order / out-of-stock cancellation / appeal | linkfox-temu-cancel-order-eu |
| Order list/details/amounts/after-sales context | linkfox-temu-order-eu |
| Product management | linkfox-temu-manage-product-eu |
| Fulfillment/shipping | linkfox-temu-fulfillment-eu |
| Gateway and Temu token | This skill scripts/ |
How to call
- API endpoint:
POST /temu/proxy(different operations are distinguished via the request body; for complete parameters/responses/error codes seereferences/api.md) - Python script:
python scripts/<脚本名>.py '<JSON 参数>' [--inline](for available scripts see the script overview above) - Cost constraint: this tool consumes compute; on failure/empty results you must not automatically change keywords, paginate, or repeatedly probe; if further searching is needed, first explain to the user that it will incur additional consumption.
Output strategy (default script behavior):
- Alwayswrite the complete response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-returns-refunds-eu-<timestamp>.json(<cwd>which is the working directory when the script runs, i.e. the current project directory in Claude Code;<session>taken from the environment variableSESSION_ID, aggregated automatically according to the user task;writing to /tmp is prohibited, error out if the current directory is not writable) - 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
--inlineto force printing the full content 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 putting the entire JSON into context.
Resolving authentication and compute issues
When the following abnormal situations occur, use references/onboarding.md to guide resolution:
Abnormal situations
- API Key not configured: environment variable not configured with
LINKFOX_AGENT_API_KEY, and also not configured withLINKFOXAGENT_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 | order-shipping |
Order/after-sales scenario token (see access-token.md) |
Authentication
- LinkFox:
LINKFOXAGENT_API_KEY→ HeaderAuthorization+Token - Temu:
accessTokenorstoreKey(storeKey, it is recommended to includetokenPurpose=order-shipping)
Scripts
| Script | Description |
|---|---|
temu_eu_proxy.py |
Any type generic forwarding |
temu_eu_file_download.py |
Signed file download |
eu_returns_refunds_aftersales_parentaftersales_list_get.py |
bg.aftersales.parentaftersales.list.get |
eu_returns_refunds_aftersales_aftersales_list_get.py |
bg.aftersales.aftersales.list.get |
eu_returns_refunds_aftersales_parentaftersales_detail_get.py |
temu.aftersales.parentaftersales.detail.get |
eu_returns_refunds_aftersales_parentreturnorder_get.py |
bg.aftersales.parentreturnorder.get |
eu_returns_refunds_aftersales_returnaddress_get.py |
temu.aftersales.returnaddress.get |
eu_returns_refunds_aftersales_returnlabel_prepare_get.py |
temu.aftersales.returnlabel.prepare.get |
eu_returns_refunds_aftersales_signature_get.py |
temu.aftersales.signature.get |
eu_returns_refunds_aftersales_upload_returnlabel.py |
temu.aftersales.upload.returnlabel |
eu_returns_refunds_aftersales_carrier_get.py |
temu.aftersales.carrier.get |
Integrate more APIs (convention)
Each time you provide a Partner document (type + sub_menu_code + URL + Request/Response parameter table), the following will be done:
- Add
references/apis/<type-slug>.md(complete input/output parameter hierarchy) - Add
scripts/eu_returns_refunds_<slug>.py(call_eu_returns_refunds_script.run_cli) - 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": "order-shipping",
"type": "<TEMU_API_TYPE>",
"params": {
"request": {}
}
}'
Feedback: skillName:linkfox-temu-returns-refunds-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
No compute is consumed.