{"id":"d6ac5871-0a43-454f-b695-4ff528c23f5a","entityType":"agent","slug":"clawhub-linkfox-ai-linkfox-temu-tax-eu","name":"Temu欧洲站-税务","canonicalUrl":"https://www.xpersona.co/agent/clawhub-linkfox-ai-linkfox-temu-tax-eu","canonicalPath":"/agent/clawhub-linkfox-ai-linkfox-temu-tax-eu","generatedAt":"2026-10-10T21:54:28.476Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":null},"description":"Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-temu-tax-eu","sourceUrl":"https://clawhub.ai/linkfox-ai/linkfox-temu-tax-eu","homepage":"https://clawhub.ai/linkfox-ai/skills/linkfox-temu-tax-eu","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/linkfox-ai/linkfox-temu-tax-eu","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/linkfox-ai/skills/linkfox-temu-tax-eu","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Temu欧洲站-税务 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":null},"stars":null,"forks":null,"downloads":1341,"packageName":null,"latestVersion":"1.0.6","tractionLabel":"1.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T16:20:27.449Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T16:20:27.450Z","lastCrawledAt":"2026-10-10T16:20:27.449Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T16:20:27.449Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.6","createdAt":"2026-08-14T15:20:15.258Z","changelog":"Update from 1.0.5 to 1.0.6","fileCount":38,"zipByteSize":50697},{"version":"1.0.5","createdAt":"2026-08-07T11:24:42.030Z","changelog":"Update from 1.0.4 to 1.0.5","fileCount":38,"zipByteSize":51195},{"version":"1.0.4","createdAt":"2026-07-13T12:43:33.210Z","changelog":"Update from 1.0.3 to 1.0.4","fileCount":36,"zipByteSize":41866},{"version":"1.0.3","createdAt":"2026-07-06T11:49:03.617Z","changelog":"Update from 1.0.2 to 1.0.3","fileCount":36,"zipByteSize":41432},{"version":"1.0.2","createdAt":"2026-07-03T09:49:02.565Z","changelog":"Update from 1.0.0 to 1.0.2","fileCount":35,"zipByteSize":39682},{"version":"1.0.0","createdAt":"2026-05-28T06:37:16.024Z","changelog":"Initial release","fileCount":36,"zipByteSize":38128}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-temu-tax-eu","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s171g8b6m2khwdy9ye8bxj0wx183vd4z:linkfox-temu-tax-eu` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/linkfox-ai/linkfox-temu-tax-eu before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T21:54:28.473Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-linkfox-ai-linkfox-temu-tax-eu/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":null},"readme":"Skill: Temu欧洲站-税务\n\nOwner: linkfox-ai\n\nSummary: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\n\nTags: latest:1.0.6\n\nVersion history:\n\nv1.0.6 | 2026-08-14T15:20:15.258Z | user\n\nUpdate from 1.0.5 to 1.0.6\n\nv1.0.5 | 2026-08-07T11:24:42.030Z | user\n\nUpdate from 1.0.4 to 1.0.5\n\nv1.0.4 | 2026-07-13T12:43:33.210Z | user\n\nUpdate from 1.0.3 to 1.0.4\n\nv1.0.3 | 2026-07-06T11:49:03.617Z | user\n\nUpdate from 1.0.2 to 1.0.3\n\nv1.0.2 | 2026-07-03T09:49:02.565Z | user\n\nUpdate from 1.0.0 to 1.0.2\n\nv1.0.0 | 2026-05-28T06:37:16.024Z | user\n\nInitial release\n\nArchive index:\n\nArchive v1.0.6: 38 files, 50697 bytes\n\nFiles: references/access-token.md (4818b), references/api.md (4303b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/onboarding.md (2046b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (12422b), scripts/_temu_eu_common.py (3126b), scripts/_temu_token_store.py (4273b), scripts/check_linkfox_token.py (1798b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/onboarding.py (24089b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (705b), scripts/temu_eu_proxy.py (871b), scripts/temu_file_download.py (1695b), scripts/temu_proxy.py (2138b), scripts/temu_token_guide.py (1594b), skill-card.md (2743b), SKILL.md (5714b), _meta.json (138b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: linkfox-temu-tax-eu\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\n---\n\n# Temu 欧洲站 — 电商税务（Tax）\n\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\n\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\n\n**网关（本 skill 内置）**：\n\n| 能力 | 方法 | 路径 |\n|------|------|------|\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\n\n## 相关 skill\n\n| 场景 | skill |\n|------|--------|\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\n| 价格/供货价 | `linkfox-temu-price-eu` |\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\n| 网关与 Temu token | 本 skill `scripts/` |\n\n## 调用方式\n\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 默认参数\n\n| 字段 | 默认 | 说明 |\n|------|------|------|\n| site | `eu` | Partner EU |\n| managementType | `semi-managed` | 半托管 |\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\n\n## 鉴权\n\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\n\n## Scripts（按 type）\n\n| 脚本 | type | 状态 |\n|------|------|------|\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.download` | 已接入 |\n| `eu_tax_merchant_upload_invoice.py` | `temu.pay.tax.merchant.upload.invoice` | 已接入 |\n| `temu_eu_proxy.py` | 任意 `type` | 通用 |\n| `temu_eu_file_download.py` | 加签文件下载 | 通用 |\n\n## 接入新接口（约定）\n\n你每提供一条 Partner 文档（HTML/URL + `type` + Request/Response 表 + 可选 `sub_menu_code`），将：\n\n1. 新增 `references/apis/<type-slug>.md`（入参/出参层级全部展开）\n2. 新增 `scripts/eu_tax_<slug>.py`（调用 `_eu_tax_script.run_cli`）\n3. 更新 [partner-eu-catalog.md](./references/partner-eu-catalog.md)、[apis/README.md](./references/apis/README.md) 与本表\n\n## 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\n\n# 发票信息查询（最多 20 个父单号）\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSnList\": [\"PO-123456789\"]\n  }\n}'\n\n# 申请导出税务报表（月份 YYYY-MM）\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"request\": {\n    \"reportMonth\": \"2025-04\",\n    \"requestId\": \"req-uuid-001\"\n  }\n}'\n```\n\n**Feedback：** `skillName`：`linkfox-temu-tax-eu`\n\n## 网关与授权脚本\n\n授权说明：[references/access-token.md](./references/access-token.md)\n\n## 积分消耗规则\n\n不消耗积分。\n\nFile v1.0.6:references/apis/README.md\n\n# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n| `temu.pay.tax.get.galerie.signature` | [temu-pay-tax-get-galerie-signature.md](./temu-pay-tax-get-galerie-signature.md) |\n\n## 发票\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.invoice.detail.query` | [temu-pay-tax-invoice-detail-query.md](./temu-pay-tax-invoice-detail-query.md) |\n| `temu.pay.tax.invoice.info.query` | [temu-pay-tax-invoice-info-query.md](./temu-pay-tax-invoice-info-query.md) |\n| `temu.pay.tax.invoice.pdf.download` | [temu-pay-tax-invoice-pdf-download.md](./temu-pay-tax-invoice-pdf-download.md) |\n\n## 商家报表 / 上传\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.merchant.report.download` | [temu-pay-tax-merchant-report-download.md](./temu-pay-tax-merchant-report-download.md) |\n| `temu.pay.tax.merchant.upload.invoice` | [temu-pay-tax-merchant-upload-invoice.md](./temu-pay-tax-merchant-upload-invoice.md) |\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-temu-tax-eu\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786720815258\n}\n\nFile v1.0.6:references/access-token.md\n\n# Temu accessToken 授权与获取\n\n> 本文件供 **`linkfox-temu-tax-eu`**（及同仓库其它 Temu EU skill）共用。Tax 接口默认 `site=eu`、`tokenPurpose=product-inventory`；若 Partner Tax 文档指定其它 token，以文档为准。\n\nTemu **没有** LinkFox 侧自动 OAuth；`accessToken` 须在 Temu 卖家后台「服务市场 → 授权管理」**手动复制**。与 `LINKFOXAGENT_API_KEY`（LinkFox 用户鉴权）是两套令牌（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n## 两种鉴权（勿混淆）\n\n| 令牌 | 用途 | 获取方式 |\n|------|------|----------|\n| **LinkFox 用户 Token** | 调用 `/temu/proxy`、`/temu/fileDownload` **必填** | `LINKFOXAGENT_API_KEY` 或请求 JSON 的 `token`；Header `Authorization` + `Token`（同 amazon-store-auth）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| **Temu accessToken** | Temu 业务 API（经紫鸟转发） | Temu 卖家后台授权后复制 |\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py\n```\n\n## tokenPurpose 与场景\n\n| tokenPurpose | 店铺类型 | 推荐 site | 授权应用 |\n|--------------|----------|-----------|----------|\n| `product-inventory` | 半托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `order-shipping` | 半托管 | `us` / `global` / `eu` | Cyber-ERP酷鸟助手 |\n| `full-managed` | 全托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `local-native` | 本土（美/欧主体） | `us` 等 | Cyber-ERP |\n\n## 1. 半托管 — 商品/库存 Token\n\n1. 登录 [seller.kuajingmaihuo.com](https://seller.kuajingmaihuo.com) 或 [agentseller.temu.com](https://agentseller.temu.com)\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → 选择 **「酷鸟卖家助手」**\n4. 全选常规和特殊授权 → 确认 → **复制 access_token**\n5. 调用 API：`site=cn` 或 `partner`，`managementType=semi-managed`\n\n## 2. 半托管 — 订单/发货 Token\n\n1. 登录 Temu 卖家后台\n2. 右上角 **Seller Central** → 切换到目标区域（美区 / 欧区 / 全球）\n3. **服务市场** → **授权管理**\n4. **获取授权** → 选择 **「Cyber-ERP酷鸟助手」**\n5. 全选授权 → 确认 → 复制 token\n6. 调用 API：`site=eu` / `global` / `eu`，`managementType=semi-managed`\n\n## 3. 全托管店铺\n\n1. 登录 Temu 平台\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → **「酷鸟卖家助手」** → 全选 → 复制 token\n4. 调用 API：`managementType=full-managed`，`site` 通常 `cn` 或 `partner`\n\n## 4. 本土店铺（美区、欧区主体）\n\n1. 登录 Temu\n2. **Apps And Services** → **Manage Your Apps**\n3. **Authorize a new app** → 搜索 **「Cyber-ERP」**\n4. 一般权限与敏感权限全选 → 确认 → 复制 token\n\n## 站点与 OpenAPI 网关\n\n| site | 说明 | Temu 网关 |\n|------|------|-----------|\n| cn | 中国站 | openapi.kuajingmaihuo.com |\n| partner | Partner 网关 | openapi-b-partner.temu.com |\n| us | 欧洲站 | openapi-b-eu.temu.com |\n| global | 全球区 | openapi-b-global.temu.com |\n| eu | 欧洲站 | openapi-b-eu.temu.com |\n\n## 本地保存 Token（推荐）\n\n默认存储：`~/.linkfox/temu-access-tokens.json`（可用 `TEMU_TOKEN_STORE_PATH` 覆盖）。\n\n```bash\n# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mapping\",\n  \"params\": {\"goodsName\": \"测试\", \"goodsNameEn\": \"Test\"}\n}'\n```\n\n## 注意事项\n\n1. **子账号**：可能无法进入服务市场，需主账号授权。\n2. **多站点**：欧洲站、英国站等需分别登录对应后台获取 Token。\n3. **有效期**：Token 会过期，过期后重新在后台复制并 `save_temu_access_token.py`。\n4. **IP 白名单**：需联系紫鸟开放平台配置调用 IP。\n5. **参数小写**：`site`、`managementType` 必须小写。\n\n## 脚本一览\n\n| 脚本 | 说明 |\n|------|------|\n| `temu_token_guide.py` | 按店铺类型/用途输出授权步骤 |\n| `save_temu_access_token.py` | 保存 accessToken 到本地 |\n| `list_temu_access_tokens.py` | 列出已保存 token（默认脱敏）|\n| `get_temu_access_token.py` | 读取指定 store 的 token |\n\nFile v1.0.6:references/api.md\n\n# linkfox-temu-tax-eu — API 参考\n\nTemu **欧洲站电商税务（Tax）**（Partner EU **Tax** 菜单相关接口），经本 skill `temu_eu_proxy`（`POST /temu/proxy`） 转发。Temu 的 `type` 写在 Body，**不是** URL 路径。\n\n> 网关与鉴权：本 skill `scripts/`（`LINKFOXAGENT_API_KEY`、`accessToken` / `storeKey`）。授权见 [access-token.md](./access-token.md)（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n---\n\n## 调用规范\n\n| 项 | 说明 |\n|----|------|\n| 网关根地址 | `${LINKFOX_TOOL_GATEWAY}`（可用 `TEMU_API_BASE_URL` / `STORE_API_BASE_URL` 覆盖） |\n| 税务 OpenAPI | `POST /temu/proxy` |\n| 加签文件下载 | `POST /temu/fileDownload`（`temu_eu_file_download.py`） |\n| LinkFox 鉴权 | Header **`Authorization`** 与 **`Token`**（同值）；或 `LINKFOX_AGENT_API_KEY` / `LINKFOXAGENT_API_KEY`；或 JSON `token`（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| Temu 鉴权 | Body `accessToken`，或 `storeKey` + `site` + `managementType` + `tokenPurpose` |\n| 默认 | `site=eu`，`managementType=semi-managed`，`tokenPurpose=product-inventory` |\n| 上游 OpenAPI（EU） | `https://openapi-b-eu.temu.com/openapi/router`（网关按 `site` 解析） |\n\n### 网关请求 Body（`/temu/proxy`）\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| site | string | 是 | `eu`（本 skill 默认） |\n| managementType | string | 是 | `semi-managed` |\n| accessToken | string | 与 storeKey 二选一 | Temu 店铺令牌 |\n| storeKey | string | 与 accessToken 二选一 | `~/.linkfox/temu-access-tokens.json` 中的键 |\n| tokenPurpose | string | 否 | 默认 `product-inventory`；以 Partner 文档为准 |\n| type | string | 是 | Temu 接口名（Partner Tax 文档中的 `type`） |\n| params | object | 否 | 业务参数；多数接口业务块在 **`params.request`** |\n\n### 网关响应\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| body | string | Temu 原始 JSON 字符串；脚本解析为 `temuBody` |\n| code | integer | 网关错误码：`1002` 参数/Token，`1003` 转发失败 |\n\n解析顺序：**网关 `code`** → `JSON.parse(body)` → `success` / `errorCode` / `errorMsg` / `result`。\n\n### 脚本调用\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'\n```\n\n业务字段可放在顶层或嵌套 `params`；含 `request` 时通常整体作为 `params` 转发。\n\n---\n\n## 接口一览\n\n完整 `sub_menu_code` 与 Partner 文档 URL 见 [partner-eu-catalog.md](./partner-eu-catalog.md)。\n\n**每个接口单独一份文档**：[apis/README.md](./apis/README.md)（随你提供的 Partner 文档递增）。\n\n当前 **7** 个业务 `type` 已接入；见 [apis/README.md](./apis/README.md)。\n\n---\n\n## 典型税务流程\n\n```text\n1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件\n```\n\n---\n\n## 与其它 EU skill 的关系\n\n| 能力 | skill |\n|------|--------|\n| 税务（本 skill） | **`linkfox-temu-tax-eu`** |\n| 商品管理（可含 `taxCodeInfo` 等） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税字段） | `linkfox-temu-order-eu` |\n| 价格 | `linkfox-temu-price-eu` |\n\n---\n\n## 网关错误码\n\n| code | 说明 | 处理 |\n|------|------|------|\n| HTTP 401 | authorized error | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| HTTP 402 | — | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| 1002 | 参数或 LinkFox Token 无效 | 修正参数与 `LINKFOXAGENT_API_KEY` |\n| 1003 | 转发失败 | 检查 Temu token、白名单、网络 |\n\n---\n\n## Feedback API\n\n- **POST** `https://skill-api.linkfox.com/api/v1/public/feedback`\n- `skillName`: **`linkfox-temu-tax-eu`**\n\nFile v1.0.6:references/apis/temu-pay-tax-apply-export-report.md\n\n# 申请导出税务报表 — `temu.pay.tax.apply.export.report`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_apply_export_report.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=6494bb7afd8048d380a13e92f6275d17 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.apply.export.report`，业务载荷放在 Body 的 `params` |\n\n**Description:** Apply to export tax/sales report for a given month.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── reportMonth (STRING **必填**)\n    └── requestId (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| reportMonth | STRING | **是** | Report Month, format YYYY-MM |\n| requestId | STRING | **是** | Request Id |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taskId (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taskId | INTEGER | taskId（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020005 | Region or site not support | — |\n| 200020004 | Reqeust parameter is invalid. | — |\n| 200020003 | Not supported to apply for sales report for the current month | — |\n| 200020002 | Cannot apply for sales reports repeatedly | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-get-galerie-signature.md\n\n# 获取 Galerie 签名 — `temu.pay.tax.get.galerie.signature`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_get_galerie_signature.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=d6147c0484a341c49790b6dfed7da275 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.get.galerie.signature`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get Galerie upload signature for tax-related file operations.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n```\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signature (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signature | STRING | signature（STRING） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_get_galerie_signature.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-invoice-detail-query.md\n\n# 发票明细查询 — `temu.pay.tax.invoice.detail.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_detail_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=3985fe93bff5437c87863a22112b72db |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.detail.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query invoice detail information by parent order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── invoiceDetailInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].orderMetaInfo (OBJECT)\n    ├── invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder (BOOLEAN)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].platformInfo (OBJECT)\n    ├── invoiceDetailInfoList[].platformInfo.platformName (STRING)\n    ├── invoiceDetailInfoList[].platformInfo.platformAddress (STRING)\n    ├── invoiceDetailInfoList[].shippingFee (OBJECT)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceDetailType (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceType (INTEGER)\n    ├── invoiceDetailInfoList[].currency (STRING)\n    ├── invoiceDetailInfoList[].promotionInfo (OBJECT)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| invoiceDetailInfoList[] | OBJECT[] | invoiceDetailInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].orderMetaInfo | OBJECT | orderMetaInfo（OBJECT） |\n| invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder | BOOLEAN | isCustomerServiceChargeOrder（BOOLEAN） |\n| invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn | STRING | parentAppealOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis | INTEGER | originParentOrderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis | INTEGER | orderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn | STRING | tradeTransactionSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentOrderSn | STRING | parentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis | INTEGER | parentShippingTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis | INTEGER | refundTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn | STRING | originParentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn | STRING | financeParentOrderSn（STRING） |\n| invoiceDetailInfoList[].platformInfo | OBJECT | platformInfo（OBJECT） |\n| invoiceDetailInfoList[].platformInfo.platformName | STRING | platformName（STRING） |\n| invoiceDetailInfoList[].platformInfo.platformAddress | STRING | platformAddress（STRING） |\n| invoiceDetailInfoList[].shippingFee | OBJECT | shippingFee（OBJECT） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountWithTax | INTEGER | shippingAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax | INTEGER | shippingAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[] | OBJECT[] | goodsInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceDetailType | INTEGER | invoiceDetailType（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[] | OBJECT[] | shippingInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceType | INTEGER | invoiceType（INTEGER） |\n| invoiceDetailInfoList[].currency | STRING | currency（STRING） |\n| invoiceDetailInfoList[].promotionInfo | OBJECT | promotionInfo（OBJECT） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax | INTEGER | promotionAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax | INTEGER | promotionAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[] | OBJECT[] | addOrderInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountWithTax | INTEGER | amountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax | INTEGER | amountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType | INTEGER | addOrderDetailType（INTEGER） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_detail_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-invoice-info-query.md\n\n# 发票信息查询 — `temu.pay.tax.invoice.info.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_info_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=5f5d1168742b4991a86684cbd0c21489 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.info.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query tax invoice summary list by parent order numbers.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSnList (STRING[] **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSnList | STRING[] | **是** | Parent order number list, max 20 per request. |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taxInvoiceInfoList[] (OBJECT[])\n    ├── taxInvoiceInfoList[].invoiceTime (INTEGER)\n    ├── taxInvoiceInfoList[].invoiceNumber (STRING)\n    ├── taxInvoiceInfoList[].parentOrderSn (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taxInvoiceInfoList[] | OBJECT[] | taxInvoiceInfoList（OBJECT[]） |\n| taxInvoiceInfoList[].invoiceTime | INTEGER | invoiceTime（INTEGER） |\n| taxInvoiceInfoList[].invoiceNumber | STRING | invoiceNumber（STRING） |\n| taxInvoiceInfoList[].parentOrderSn | STRING | parentOrderSn（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-invoice-pdf-download.md\n\n# 发票 PDF 下载 — `temu.pay.tax.invoice.pdf.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_pdf_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=2b8a5a8a75604779b2e0017ee79b462a |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.pdf.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get signed URL to download invoice PDF.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceNumber (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | Parent order number |\n| invoiceNumber | STRING | **是** | Invoice number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signUrl (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signUrl | STRING | signUrl（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_pdf_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-merchant-report-download.md\n\n# 商家税务报表下载 — `temu.pay.tax.merchant.report.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_report_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=cc87994f2ac24fc88795f2a3a8844683 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.report.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Download merchant tax report file by task/request.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── requestId (STRING)\n    └── taskId (LONG)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestId | STRING | 否 | Request ID |\n| taskId | LONG | 否 | Task ID |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── fileUrl (STRING)\n    ├── status (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| fileUrl | STRING | fileUrl（STRING） |\n| status | INTEGER | status（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020004 | Reqeust parameter is invalid. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_report_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.6:references/apis/temu-pay-tax-merchant-upload-invoice.md\n\n# 商家上传发票 — `temu.pay.tax.merchant.upload.invoice`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_upload_invoice.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=98fcf420ee5c4f0d8c8f708adfd89160 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.upload.invoice`，业务载荷放在 Body 的 `params` |\n\n**Description:** Merchant upload invoice or credit note file for an order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceDirection (INTEGER **必填**)\n    └── invoiceName (STRING **必填**)\n    └── recipientType (INTEGER **必填**)\n    └── fileUrl (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order sn |\n| invoiceDirection | INTEGER | **是** | invoice direction. 1-invoice, 2-credit-note |\n| invoiceName | STRING | **是** | invoice name |\n| recipientType | INTEGER | **是** | recipient type. 1-consumer, 2-platform |\n| fileUrl | STRING | **是** | invoice file url |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── success (BOOLEAN)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | Upload result inside `result`（上传是否成功；与响应顶层 `success` 不同，顶层表示 API 调用是否成功） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200030003 | ParentOrderSn Invalid | — |\n| 200030002 | Invalid Invoice Content | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_upload_invoice.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}'\n```\n\nArchive v1.0.5: 38 files, 51195 bytes\n\nFiles: references/access-token.md (4818b), references/api.md (4303b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/onboarding.md (2046b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (12421b), scripts/_temu_eu_common.py (3125b), scripts/_temu_token_store.py (4273b), scripts/check_linkfox_token.py (1797b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/onboarding.py (24089b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (705b), scripts/temu_eu_proxy.py (871b), scripts/temu_file_download.py (1695b), scripts/temu_proxy.py (2138b), scripts/temu_token_guide.py (1594b), skill-card.md (4167b), SKILL.md (5714b), _meta.json (138b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: linkfox-temu-tax-eu\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\n---\n\n# Temu 欧洲站 — 电商税务（Tax）\n\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\n\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\n\n**网关（本 skill 内置）**：\n\n| 能力 | 方法 | 路径 |\n|------|------|------|\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\n\n## 相关 skill\n\n| 场景 | skill |\n|------|--------|\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\n| 价格/供货价 | `linkfox-temu-price-eu` |\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\n| 网关与 Temu token | 本 skill `scripts/` |\n\n## 调用方式\n\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 默认参数\n\n| 字段 | 默认 | 说明 |\n|------|------|------|\n| site | `eu` | Partner EU |\n| managementType | `semi-managed` | 半托管 |\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\n\n## 鉴权\n\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\n\n## Scripts（按 type）\n\n| 脚本 | type | 状态 |\n|------|------|------|\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.download` | 已接入 |\n| `eu_tax_merchant_upload_invoice.py` | `temu.pay.tax.merchant.upload.invoice` | 已接入 |\n| `temu_eu_proxy.py` | 任意 `type` | 通用 |\n| `temu_eu_file_download.py` | 加签文件下载 | 通用 |\n\n## 接入新接口（约定）\n\n你每提供一条 Partner 文档（HTML/URL + `type` + Request/Response 表 + 可选 `sub_menu_code`），将：\n\n1. 新增 `references/apis/<type-slug>.md`（入参/出参层级全部展开）\n2. 新增 `scripts/eu_tax_<slug>.py`（调用 `_eu_tax_script.run_cli`）\n3. 更新 [partner-eu-catalog.md](./references/partner-eu-catalog.md)、[apis/README.md](./references/apis/README.md) 与本表\n\n## 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\n\n# 发票信息查询（最多 20 个父单号）\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSnList\": [\"PO-123456789\"]\n  }\n}'\n\n# 申请导出税务报表（月份 YYYY-MM）\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"request\": {\n    \"reportMonth\": \"2025-04\",\n    \"requestId\": \"req-uuid-001\"\n  }\n}'\n```\n\n**Feedback：** `skillName`：`linkfox-temu-tax-eu`\n\n## 网关与授权脚本\n\n授权说明：[references/access-token.md](./references/access-token.md)\n\n## 积分消耗规则\n\n不消耗积分。\n\nFile v1.0.5:references/apis/README.md\n\n# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n| `temu.pay.tax.get.galerie.signature` | [temu-pay-tax-get-galerie-signature.md](./temu-pay-tax-get-galerie-signature.md) |\n\n## 发票\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.invoice.detail.query` | [temu-pay-tax-invoice-detail-query.md](./temu-pay-tax-invoice-detail-query.md) |\n| `temu.pay.tax.invoice.info.query` | [temu-pay-tax-invoice-info-query.md](./temu-pay-tax-invoice-info-query.md) |\n| `temu.pay.tax.invoice.pdf.download` | [temu-pay-tax-invoice-pdf-download.md](./temu-pay-tax-invoice-pdf-download.md) |\n\n## 商家报表 / 上传\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.merchant.report.download` | [temu-pay-tax-merchant-report-download.md](./temu-pay-tax-merchant-report-download.md) |\n| `temu.pay.tax.merchant.upload.invoice` | [temu-pay-tax-merchant-upload-invoice.md](./temu-pay-tax-merchant-upload-invoice.md) |\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-temu-tax-eu\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786101882030\n}\n\nFile v1.0.5:references/access-token.md\n\n# Temu accessToken 授权与获取\n\n> 本文件供 **`linkfox-temu-tax-eu`**（及同仓库其它 Temu EU skill）共用。Tax 接口默认 `site=eu`、`tokenPurpose=product-inventory`；若 Partner Tax 文档指定其它 token，以文档为准。\n\nTemu **没有** LinkFox 侧自动 OAuth；`accessToken` 须在 Temu 卖家后台「服务市场 → 授权管理」**手动复制**。与 `LINKFOXAGENT_API_KEY`（LinkFox 用户鉴权）是两套令牌（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n## 两种鉴权（勿混淆）\n\n| 令牌 | 用途 | 获取方式 |\n|------|------|----------|\n| **LinkFox 用户 Token** | 调用 `/temu/proxy`、`/temu/fileDownload` **必填** | `LINKFOXAGENT_API_KEY` 或请求 JSON 的 `token`；Header `Authorization` + `Token`（同 amazon-store-auth）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| **Temu accessToken** | Temu 业务 API（经紫鸟转发） | Temu 卖家后台授权后复制 |\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py\n```\n\n## tokenPurpose 与场景\n\n| tokenPurpose | 店铺类型 | 推荐 site | 授权应用 |\n|--------------|----------|-----------|----------|\n| `product-inventory` | 半托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `order-shipping` | 半托管 | `us` / `global` / `eu` | Cyber-ERP酷鸟助手 |\n| `full-managed` | 全托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `local-native` | 本土（美/欧主体） | `us` 等 | Cyber-ERP |\n\n## 1. 半托管 — 商品/库存 Token\n\n1. 登录 [seller.kuajingmaihuo.com](https://seller.kuajingmaihuo.com) 或 [agentseller.temu.com](https://agentseller.temu.com)\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → 选择 **「酷鸟卖家助手」**\n4. 全选常规和特殊授权 → 确认 → **复制 access_token**\n5. 调用 API：`site=cn` 或 `partner`，`managementType=semi-managed`\n\n## 2. 半托管 — 订单/发货 Token\n\n1. 登录 Temu 卖家后台\n2. 右上角 **Seller Central** → 切换到目标区域（美区 / 欧区 / 全球）\n3. **服务市场** → **授权管理**\n4. **获取授权** → 选择 **「Cyber-ERP酷鸟助手」**\n5. 全选授权 → 确认 → 复制 token\n6. 调用 API：`site=eu` / `global` / `eu`，`managementType=semi-managed`\n\n## 3. 全托管店铺\n\n1. 登录 Temu 平台\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → **「酷鸟卖家助手」** → 全选 → 复制 token\n4. 调用 API：`managementType=full-managed`，`site` 通常 `cn` 或 `partner`\n\n## 4. 本土店铺（美区、欧区主体）\n\n1. 登录 Temu\n2. **Apps And Services** → **Manage Your Apps**\n3. **Authorize a new app** → 搜索 **「Cyber-ERP」**\n4. 一般权限与敏感权限全选 → 确认 → 复制 token\n\n## 站点与 OpenAPI 网关\n\n| site | 说明 | Temu 网关 |\n|------|------|-----------|\n| cn | 中国站 | openapi.kuajingmaihuo.com |\n| partner | Partner 网关 | openapi-b-partner.temu.com |\n| us | 欧洲站 | openapi-b-eu.temu.com |\n| global | 全球区 | openapi-b-global.temu.com |\n| eu | 欧洲站 | openapi-b-eu.temu.com |\n\n## 本地保存 Token（推荐）\n\n默认存储：`~/.linkfox/temu-access-tokens.json`（可用 `TEMU_TOKEN_STORE_PATH` 覆盖）。\n\n```bash\n# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mapping\",\n  \"params\": {\"goodsName\": \"测试\", \"goodsNameEn\": \"Test\"}\n}'\n```\n\n## 注意事项\n\n1. **子账号**：可能无法进入服务市场，需主账号授权。\n2. **多站点**：欧洲站、英国站等需分别登录对应后台获取 Token。\n3. **有效期**：Token 会过期，过期后重新在后台复制并 `save_temu_access_token.py`。\n4. **IP 白名单**：需联系紫鸟开放平台配置调用 IP。\n5. **参数小写**：`site`、`managementType` 必须小写。\n\n## 脚本一览\n\n| 脚本 | 说明 |\n|------|------|\n| `temu_token_guide.py` | 按店铺类型/用途输出授权步骤 |\n| `save_temu_access_token.py` | 保存 accessToken 到本地 |\n| `list_temu_access_tokens.py` | 列出已保存 token（默认脱敏）|\n| `get_temu_access_token.py` | 读取指定 store 的 token |\n\nFile v1.0.5:references/api.md\n\n# linkfox-temu-tax-eu — API 参考\n\nTemu **欧洲站电商税务（Tax）**（Partner EU **Tax** 菜单相关接口），经本 skill `temu_eu_proxy`（`POST /temu/proxy`） 转发。Temu 的 `type` 写在 Body，**不是** URL 路径。\n\n> 网关与鉴权：本 skill `scripts/`（`LINKFOXAGENT_API_KEY`、`accessToken` / `storeKey`）。授权见 [access-token.md](./access-token.md)（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n---\n\n## 调用规范\n\n| 项 | 说明 |\n|----|------|\n| 网关根地址 | `${LINKFOX_TOOL_GATEWAY}`（可用 `TEMU_API_BASE_URL` / `STORE_API_BASE_URL` 覆盖） |\n| 税务 OpenAPI | `POST /temu/proxy` |\n| 加签文件下载 | `POST /temu/fileDownload`（`temu_eu_file_download.py`） |\n| LinkFox 鉴权 | Header **`Authorization`** 与 **`Token`**（同值）；或 `LINKFOX_AGENT_API_KEY` / `LINKFOXAGENT_API_KEY`；或 JSON `token`（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| Temu 鉴权 | Body `accessToken`，或 `storeKey` + `site` + `managementType` + `tokenPurpose` |\n| 默认 | `site=eu`，`managementType=semi-managed`，`tokenPurpose=product-inventory` |\n| 上游 OpenAPI（EU） | `https://openapi-b-eu.temu.com/openapi/router`（网关按 `site` 解析） |\n\n### 网关请求 Body（`/temu/proxy`）\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| site | string | 是 | `eu`（本 skill 默认） |\n| managementType | string | 是 | `semi-managed` |\n| accessToken | string | 与 storeKey 二选一 | Temu 店铺令牌 |\n| storeKey | string | 与 accessToken 二选一 | `~/.linkfox/temu-access-tokens.json` 中的键 |\n| tokenPurpose | string | 否 | 默认 `product-inventory`；以 Partner 文档为准 |\n| type | string | 是 | Temu 接口名（Partner Tax 文档中的 `type`） |\n| params | object | 否 | 业务参数；多数接口业务块在 **`params.request`** |\n\n### 网关响应\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| body | string | Temu 原始 JSON 字符串；脚本解析为 `temuBody` |\n| code | integer | 网关错误码：`1002` 参数/Token，`1003` 转发失败 |\n\n解析顺序：**网关 `code`** → `JSON.parse(body)` → `success` / `errorCode` / `errorMsg` / `result`。\n\n### 脚本调用\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'\n```\n\n业务字段可放在顶层或嵌套 `params`；含 `request` 时通常整体作为 `params` 转发。\n\n---\n\n## 接口一览\n\n完整 `sub_menu_code` 与 Partner 文档 URL 见 [partner-eu-catalog.md](./partner-eu-catalog.md)。\n\n**每个接口单独一份文档**：[apis/README.md](./apis/README.md)（随你提供的 Partner 文档递增）。\n\n当前 **7** 个业务 `type` 已接入；见 [apis/README.md](./apis/README.md)。\n\n---\n\n## 典型税务流程\n\n```text\n1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件\n```\n\n---\n\n## 与其它 EU skill 的关系\n\n| 能力 | skill |\n|------|--------|\n| 税务（本 skill） | **`linkfox-temu-tax-eu`** |\n| 商品管理（可含 `taxCodeInfo` 等） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税字段） | `linkfox-temu-order-eu` |\n| 价格 | `linkfox-temu-price-eu` |\n\n---\n\n## 网关错误码\n\n| code | 说明 | 处理 |\n|------|------|------|\n| HTTP 401 | authorized error | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| HTTP 402 | — | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| 1002 | 参数或 LinkFox Token 无效 | 修正参数与 `LINKFOXAGENT_API_KEY` |\n| 1003 | 转发失败 | 检查 Temu token、白名单、网络 |\n\n---\n\n## Feedback API\n\n- **POST** `https://skill-api.linkfox.com/api/v1/public/feedback`\n- `skillName`: **`linkfox-temu-tax-eu`**\n\nFile v1.0.5:references/apis/temu-pay-tax-apply-export-report.md\n\n# 申请导出税务报表 — `temu.pay.tax.apply.export.report`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_apply_export_report.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=6494bb7afd8048d380a13e92f6275d17 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.apply.export.report`，业务载荷放在 Body 的 `params` |\n\n**Description:** Apply to export tax/sales report for a given month.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── reportMonth (STRING **必填**)\n    └── requestId (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| reportMonth | STRING | **是** | Report Month, format YYYY-MM |\n| requestId | STRING | **是** | Request Id |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taskId (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taskId | INTEGER | taskId（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020005 | Region or site not support | — |\n| 200020004 | Reqeust parameter is invalid. | — |\n| 200020003 | Not supported to apply for sales report for the current month | — |\n| 200020002 | Cannot apply for sales reports repeatedly | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-get-galerie-signature.md\n\n# 获取 Galerie 签名 — `temu.pay.tax.get.galerie.signature`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_get_galerie_signature.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=d6147c0484a341c49790b6dfed7da275 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.get.galerie.signature`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get Galerie upload signature for tax-related file operations.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n```\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signature (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signature | STRING | signature（STRING） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_get_galerie_signature.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-invoice-detail-query.md\n\n# 发票明细查询 — `temu.pay.tax.invoice.detail.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_detail_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=3985fe93bff5437c87863a22112b72db |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.detail.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query invoice detail information by parent order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── invoiceDetailInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].orderMetaInfo (OBJECT)\n    ├── invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder (BOOLEAN)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].platformInfo (OBJECT)\n    ├── invoiceDetailInfoList[].platformInfo.platformName (STRING)\n    ├── invoiceDetailInfoList[].platformInfo.platformAddress (STRING)\n    ├── invoiceDetailInfoList[].shippingFee (OBJECT)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceDetailType (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceType (INTEGER)\n    ├── invoiceDetailInfoList[].currency (STRING)\n    ├── invoiceDetailInfoList[].promotionInfo (OBJECT)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| invoiceDetailInfoList[] | OBJECT[] | invoiceDetailInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].orderMetaInfo | OBJECT | orderMetaInfo（OBJECT） |\n| invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder | BOOLEAN | isCustomerServiceChargeOrder（BOOLEAN） |\n| invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn | STRING | parentAppealOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis | INTEGER | originParentOrderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis | INTEGER | orderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn | STRING | tradeTransactionSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentOrderSn | STRING | parentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis | INTEGER | parentShippingTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis | INTEGER | refundTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn | STRING | originParentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn | STRING | financeParentOrderSn（STRING） |\n| invoiceDetailInfoList[].platformInfo | OBJECT | platformInfo（OBJECT） |\n| invoiceDetailInfoList[].platformInfo.platformName | STRING | platformName（STRING） |\n| invoiceDetailInfoList[].platformInfo.platformAddress | STRING | platformAddress（STRING） |\n| invoiceDetailInfoList[].shippingFee | OBJECT | shippingFee（OBJECT） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountWithTax | INTEGER | shippingAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax | INTEGER | shippingAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[] | OBJECT[] | goodsInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceDetailType | INTEGER | invoiceDetailType（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[] | OBJECT[] | shippingInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceType | INTEGER | invoiceType（INTEGER） |\n| invoiceDetailInfoList[].currency | STRING | currency（STRING） |\n| invoiceDetailInfoList[].promotionInfo | OBJECT | promotionInfo（OBJECT） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax | INTEGER | promotionAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax | INTEGER | promotionAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[] | OBJECT[] | addOrderInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountWithTax | INTEGER | amountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax | INTEGER | amountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType | INTEGER | addOrderDetailType（INTEGER） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_detail_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-invoice-info-query.md\n\n# 发票信息查询 — `temu.pay.tax.invoice.info.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_info_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=5f5d1168742b4991a86684cbd0c21489 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.info.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query tax invoice summary list by parent order numbers.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSnList (STRING[] **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSnList | STRING[] | **是** | Parent order number list, max 20 per request. |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taxInvoiceInfoList[] (OBJECT[])\n    ├── taxInvoiceInfoList[].invoiceTime (INTEGER)\n    ├── taxInvoiceInfoList[].invoiceNumber (STRING)\n    ├── taxInvoiceInfoList[].parentOrderSn (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taxInvoiceInfoList[] | OBJECT[] | taxInvoiceInfoList（OBJECT[]） |\n| taxInvoiceInfoList[].invoiceTime | INTEGER | invoiceTime（INTEGER） |\n| taxInvoiceInfoList[].invoiceNumber | STRING | invoiceNumber（STRING） |\n| taxInvoiceInfoList[].parentOrderSn | STRING | parentOrderSn（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-invoice-pdf-download.md\n\n# 发票 PDF 下载 — `temu.pay.tax.invoice.pdf.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_pdf_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=2b8a5a8a75604779b2e0017ee79b462a |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.pdf.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get signed URL to download invoice PDF.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceNumber (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | Parent order number |\n| invoiceNumber | STRING | **是** | Invoice number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signUrl (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signUrl | STRING | signUrl（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_pdf_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-merchant-report-download.md\n\n# 商家税务报表下载 — `temu.pay.tax.merchant.report.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_report_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=cc87994f2ac24fc88795f2a3a8844683 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.report.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Download merchant tax report file by task/request.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── requestId (STRING)\n    └── taskId (LONG)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestId | STRING | 否 | Request ID |\n| taskId | LONG | 否 | Task ID |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── fileUrl (STRING)\n    ├── status (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| fileUrl | STRING | fileUrl（STRING） |\n| status | INTEGER | status（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020004 | Reqeust parameter is invalid. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_report_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.5:references/apis/temu-pay-tax-merchant-upload-invoice.md\n\n# 商家上传发票 — `temu.pay.tax.merchant.upload.invoice`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_upload_invoice.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=98fcf420ee5c4f0d8c8f708adfd89160 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.upload.invoice`，业务载荷放在 Body 的 `params` |\n\n**Description:** Merchant upload invoice or credit note file for an order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceDirection (INTEGER **必填**)\n    └── invoiceName (STRING **必填**)\n    └── recipientType (INTEGER **必填**)\n    └── fileUrl (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order sn |\n| invoiceDirection | INTEGER | **是** | invoice direction. 1-invoice, 2-credit-note |\n| invoiceName | STRING | **是** | invoice name |\n| recipientType | INTEGER | **是** | recipient type. 1-consumer, 2-platform |\n| fileUrl | STRING | **是** | invoice file url |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── success (BOOLEAN)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | Upload result inside `result`（上传是否成功；与响应顶层 `success` 不同，顶层表示 API 调用是否成功） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200030003 | ParentOrderSn Invalid | — |\n| 200030002 | Invalid Invoice Content | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_upload_invoice.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}'\n```\n\nArchive v1.0.4: 36 files, 41866 bytes\n\nFiles: references/access-token.md (4818b), references/api.md (4303b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (12421b), scripts/_temu_eu_common.py (3125b), scripts/_temu_token_store.py (4273b), scripts/check_linkfox_token.py (1797b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (705b), scripts/temu_eu_proxy.py (871b), scripts/temu_file_download.py (1695b), scripts/temu_proxy.py (2138b), scripts/temu_token_guide.py (1594b), skill-card.md (2892b), SKILL.md (6331b), _meta.json (138b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: linkfox-temu-tax-eu\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\n---\n\n# Temu 欧洲站 — 电商税务（Tax）\n\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\n\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\n\n**网关（本 skill 内置）**：\n\n| 能力 | 方法 | 路径 |\n|------|------|------|\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\n\n## 相关 skill\n\n| 场景 | skill |\n|------|--------|\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\n| 价格/供货价 | `linkfox-temu-price-eu` |\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\n| 网关与 Temu token | 本 skill `scripts/` |\n\n## 调用方式\n\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用以下措施来处理：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n### 措施\n- 优先采用skill内的 onboarding.md 引导解决问题。\n- 如找不到 onboarding.md 文件，则加载 /linkfox-onboarding 这个skill并根据它的引导来处理。如未安装请先安装：\n    - 下载 https://agent-files.linkfox.com/skills/linkfox-onboarding/release.zip，解压后安装这个skill。如需用户授权才可下载，要询问用户获得授权，你不能自己放弃下载。\n- 兜底措施：仅当前面两个措施经过所有努力都走不通时，才提示用户依据 https://skill.linkfox.com/linkfoxskills/guide.htm 指引获取API Key，或去 https://os.linkfox.com/ 补充积分。\n\n## 默认参数\n\n| 字段 | 默认 | 说明 |\n|------|------|------|\n| site | `eu` | Partner EU |\n| managementType | `semi-managed` | 半托管 |\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\n\n## 鉴权\n\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\n\n## Scripts（按 type）\n\n| 脚本 | type | 状态 |\n|------|------|------|\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.download` | 已接入 |\n| `eu_tax_merchant_upload_invoice.py` | `temu.pay.tax.merchant.upload.invoice` | 已接入 |\n| `temu_eu_proxy.py` | 任意 `type` | 通用 |\n| `temu_eu_file_download.py` | 加签文件下载 | 通用 |\n\n## 接入新接口（约定）\n\n你每提供一条 Partner 文档（HTML/URL + `type` + Request/Response 表 + 可选 `sub_menu_code`），将：\n\n1. 新增 `references/apis/<type-slug>.md`（入参/出参层级全部展开）\n2. 新增 `scripts/eu_tax_<slug>.py`（调用 `_eu_tax_script.run_cli`）\n3. 更新 [partner-eu-catalog.md](./references/partner-eu-catalog.md)、[apis/README.md](./references/apis/README.md) 与本表\n\n## 示例\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\n\n# 发票信息查询（最多 20 个父单号）\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSnList\": [\"PO-123456789\"]\n  }\n}'\n\n# 申请导出税务报表（月份 YYYY-MM）\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"request\": {\n    \"reportMonth\": \"2025-04\",\n    \"requestId\": \"req-uuid-001\"\n  }\n}'\n```\n\n**Feedback：** `skillName`：`linkfox-temu-tax-eu`\n\n## 网关与授权脚本\n\n授权说明：[references/access-token.md](./references/access-token.md)\n\n## 积分消耗规则\n\n不消耗积分。\n\nFile v1.0.4:references/apis/README.md\n\n# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n| `temu.pay.tax.get.galerie.signature` | [temu-pay-tax-get-galerie-signature.md](./temu-pay-tax-get-galerie-signature.md) |\n\n## 发票\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.invoice.detail.query` | [temu-pay-tax-invoice-detail-query.md](./temu-pay-tax-invoice-detail-query.md) |\n| `temu.pay.tax.invoice.info.query` | [temu-pay-tax-invoice-info-query.md](./temu-pay-tax-invoice-info-query.md) |\n| `temu.pay.tax.invoice.pdf.download` | [temu-pay-tax-invoice-pdf-download.md](./temu-pay-tax-invoice-pdf-download.md) |\n\n## 商家报表 / 上传\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.merchant.report.download` | [temu-pay-tax-merchant-report-download.md](./temu-pay-tax-merchant-report-download.md) |\n| `temu.pay.tax.merchant.upload.invoice` | [temu-pay-tax-merchant-upload-invoice.md](./temu-pay-tax-merchant-upload-invoice.md) |\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-temu-tax-eu\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783946613210\n}\n\nFile v1.0.4:references/access-token.md\n\n# Temu accessToken 授权与获取\n\n> 本文件供 **`linkfox-temu-tax-eu`**（及同仓库其它 Temu EU skill）共用。Tax 接口默认 `site=eu`、`tokenPurpose=product-inventory`；若 Partner Tax 文档指定其它 token，以文档为准。\n\nTemu **没有** LinkFox 侧自动 OAuth；`accessToken` 须在 Temu 卖家后台「服务市场 → 授权管理」**手动复制**。与 `LINKFOXAGENT_API_KEY`（LinkFox 用户鉴权）是两套令牌（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n## 两种鉴权（勿混淆）\n\n| 令牌 | 用途 | 获取方式 |\n|------|------|----------|\n| **LinkFox 用户 Token** | 调用 `/temu/proxy`、`/temu/fileDownload` **必填** | `LINKFOXAGENT_API_KEY` 或请求 JSON 的 `token`；Header `Authorization` + `Token`（同 amazon-store-auth）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| **Temu accessToken** | Temu 业务 API（经紫鸟转发） | Temu 卖家后台授权后复制 |\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py\n```\n\n## tokenPurpose 与场景\n\n| tokenPurpose | 店铺类型 | 推荐 site | 授权应用 |\n|--------------|----------|-----------|----------|\n| `product-inventory` | 半托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `order-shipping` | 半托管 | `us` / `global` / `eu` | Cyber-ERP酷鸟助手 |\n| `full-managed` | 全托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `local-native` | 本土（美/欧主体） | `us` 等 | Cyber-ERP |\n\n## 1. 半托管 — 商品/库存 Token\n\n1. 登录 [seller.kuajingmaihuo.com](https://seller.kuajingmaihuo.com) 或 [agentseller.temu.com](https://agentseller.temu.com)\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → 选择 **「酷鸟卖家助手」**\n4. 全选常规和特殊授权 → 确认 → **复制 access_token**\n5. 调用 API：`site=cn` 或 `partner`，`managementType=semi-managed`\n\n## 2. 半托管 — 订单/发货 Token\n\n1. 登录 Temu 卖家后台\n2. 右上角 **Seller Central** → 切换到目标区域（美区 / 欧区 / 全球）\n3. **服务市场** → **授权管理**\n4. **获取授权** → 选择 **「Cyber-ERP酷鸟助手」**\n5. 全选授权 → 确认 → 复制 token\n6. 调用 API：`site=eu` / `global` / `eu`，`managementType=semi-managed`\n\n## 3. 全托管店铺\n\n1. 登录 Temu 平台\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → **「酷鸟卖家助手」** → 全选 → 复制 token\n4. 调用 API：`managementType=full-managed`，`site` 通常 `cn` 或 `partner`\n\n## 4. 本土店铺（美区、欧区主体）\n\n1. 登录 Temu\n2. **Apps And Services** → **Manage Your Apps**\n3. **Authorize a new app** → 搜索 **「Cyber-ERP」**\n4. 一般权限与敏感权限全选 → 确认 → 复制 token\n\n## 站点与 OpenAPI 网关\n\n| site | 说明 | Temu 网关 |\n|------|------|-----------|\n| cn | 中国站 | openapi.kuajingmaihuo.com |\n| partner | Partner 网关 | openapi-b-partner.temu.com |\n| us | 欧洲站 | openapi-b-eu.temu.com |\n| global | 全球区 | openapi-b-global.temu.com |\n| eu | 欧洲站 | openapi-b-eu.temu.com |\n\n## 本地保存 Token（推荐）\n\n默认存储：`~/.linkfox/temu-access-tokens.json`（可用 `TEMU_TOKEN_STORE_PATH` 覆盖）。\n\n```bash\n# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mapping\",\n  \"params\": {\"goodsName\": \"测试\", \"goodsNameEn\": \"Test\"}\n}'\n```\n\n## 注意事项\n\n1. **子账号**：可能无法进入服务市场，需主账号授权。\n2. **多站点**：欧洲站、英国站等需分别登录对应后台获取 Token。\n3. **有效期**：Token 会过期，过期后重新在后台复制并 `save_temu_access_token.py`。\n4. **IP 白名单**：需联系紫鸟开放平台配置调用 IP。\n5. **参数小写**：`site`、`managementType` 必须小写。\n\n## 脚本一览\n\n| 脚本 | 说明 |\n|------|------|\n| `temu_token_guide.py` | 按店铺类型/用途输出授权步骤 |\n| `save_temu_access_token.py` | 保存 accessToken 到本地 |\n| `list_temu_access_tokens.py` | 列出已保存 token（默认脱敏）|\n| `get_temu_access_token.py` | 读取指定 store 的 token |\n\nFile v1.0.4:references/api.md\n\n# linkfox-temu-tax-eu — API 参考\n\nTemu **欧洲站电商税务（Tax）**（Partner EU **Tax** 菜单相关接口），经本 skill `temu_eu_proxy`（`POST /temu/proxy`） 转发。Temu 的 `type` 写在 Body，**不是** URL 路径。\n\n> 网关与鉴权：本 skill `scripts/`（`LINKFOXAGENT_API_KEY`、`accessToken` / `storeKey`）。授权见 [access-token.md](./access-token.md)（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n---\n\n## 调用规范\n\n| 项 | 说明 |\n|----|------|\n| 网关根地址 | `${LINKFOX_TOOL_GATEWAY}`（可用 `TEMU_API_BASE_URL` / `STORE_API_BASE_URL` 覆盖） |\n| 税务 OpenAPI | `POST /temu/proxy` |\n| 加签文件下载 | `POST /temu/fileDownload`（`temu_eu_file_download.py`） |\n| LinkFox 鉴权 | Header **`Authorization`** 与 **`Token`**（同值）；或 `LINKFOX_AGENT_API_KEY` / `LINKFOXAGENT_API_KEY`；或 JSON `token`（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| Temu 鉴权 | Body `accessToken`，或 `storeKey` + `site` + `managementType` + `tokenPurpose` |\n| 默认 | `site=eu`，`managementType=semi-managed`，`tokenPurpose=product-inventory` |\n| 上游 OpenAPI（EU） | `https://openapi-b-eu.temu.com/openapi/router`（网关按 `site` 解析） |\n\n### 网关请求 Body（`/temu/proxy`）\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| site | string | 是 | `eu`（本 skill 默认） |\n| managementType | string | 是 | `semi-managed` |\n| accessToken | string | 与 storeKey 二选一 | Temu 店铺令牌 |\n| storeKey | string | 与 accessToken 二选一 | `~/.linkfox/temu-access-tokens.json` 中的键 |\n| tokenPurpose | string | 否 | 默认 `product-inventory`；以 Partner 文档为准 |\n| type | string | 是 | Temu 接口名（Partner Tax 文档中的 `type`） |\n| params | object | 否 | 业务参数；多数接口业务块在 **`params.request`** |\n\n### 网关响应\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| body | string | Temu 原始 JSON 字符串；脚本解析为 `temuBody` |\n| code | integer | 网关错误码：`1002` 参数/Token，`1003` 转发失败 |\n\n解析顺序：**网关 `code`** → `JSON.parse(body)` → `success` / `errorCode` / `errorMsg` / `result`。\n\n### 脚本调用\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'\n```\n\n业务字段可放在顶层或嵌套 `params`；含 `request` 时通常整体作为 `params` 转发。\n\n---\n\n## 接口一览\n\n完整 `sub_menu_code` 与 Partner 文档 URL 见 [partner-eu-catalog.md](./partner-eu-catalog.md)。\n\n**每个接口单独一份文档**：[apis/README.md](./apis/README.md)（随你提供的 Partner 文档递增）。\n\n当前 **7** 个业务 `type` 已接入；见 [apis/README.md](./apis/README.md)。\n\n---\n\n## 典型税务流程\n\n```text\n1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件\n```\n\n---\n\n## 与其它 EU skill 的关系\n\n| 能力 | skill |\n|------|--------|\n| 税务（本 skill） | **`linkfox-temu-tax-eu`** |\n| 商品管理（可含 `taxCodeInfo` 等） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税字段） | `linkfox-temu-order-eu` |\n| 价格 | `linkfox-temu-price-eu` |\n\n---\n\n## 网关错误码\n\n| code | 说明 | 处理 |\n|------|------|------|\n| HTTP 401 | authorized error | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| HTTP 402 | — | 按 SKILL.md 的 **## 解决认证和积分问题** 处理。 |\n| 1002 | 参数或 LinkFox Token 无效 | 修正参数与 `LINKFOXAGENT_API_KEY` |\n| 1003 | 转发失败 | 检查 Temu token、白名单、网络 |\n\n---\n\n## Feedback API\n\n- **POST** `https://skill-api.linkfox.com/api/v1/public/feedback`\n- `skillName`: **`linkfox-temu-tax-eu`**\n\nFile v1.0.4:references/apis/temu-pay-tax-apply-export-report.md\n\n# 申请导出税务报表 — `temu.pay.tax.apply.export.report`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_apply_export_report.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=6494bb7afd8048d380a13e92f6275d17 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.apply.export.report`，业务载荷放在 Body 的 `params` |\n\n**Description:** Apply to export tax/sales report for a given month.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── reportMonth (STRING **必填**)\n    └── requestId (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| reportMonth | STRING | **是** | Report Month, format YYYY-MM |\n| requestId | STRING | **是** | Request Id |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taskId (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taskId | INTEGER | taskId（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020005 | Region or site not support | — |\n| 200020004 | Reqeust parameter is invalid. | — |\n| 200020003 | Not supported to apply for sales report for the current month | — |\n| 200020002 | Cannot apply for sales reports repeatedly | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-get-galerie-signature.md\n\n# 获取 Galerie 签名 — `temu.pay.tax.get.galerie.signature`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_get_galerie_signature.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=d6147c0484a341c49790b6dfed7da275 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.get.galerie.signature`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get Galerie upload signature for tax-related file operations.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n```\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signature (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signature | STRING | signature（STRING） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_get_galerie_signature.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-invoice-detail-query.md\n\n# 发票明细查询 — `temu.pay.tax.invoice.detail.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_detail_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=3985fe93bff5437c87863a22112b72db |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.detail.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query invoice detail information by parent order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── invoiceDetailInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].orderMetaInfo (OBJECT)\n    ├── invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder (BOOLEAN)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].platformInfo (OBJECT)\n    ├── invoiceDetailInfoList[].platformInfo.platformName (STRING)\n    ├── invoiceDetailInfoList[].platformInfo.platformAddress (STRING)\n    ├── invoiceDetailInfoList[].shippingFee (OBJECT)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceDetailType (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceType (INTEGER)\n    ├── invoiceDetailInfoList[].currency (STRING)\n    ├── invoiceDetailInfoList[].promotionInfo (OBJECT)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| invoiceDetailInfoList[] | OBJECT[] | invoiceDetailInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].orderMetaInfo | OBJECT | orderMetaInfo（OBJECT） |\n| invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder | BOOLEAN | isCustomerServiceChargeOrder（BOOLEAN） |\n| invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn | STRING | parentAppealOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis | INTEGER | originParentOrderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis | INTEGER | orderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn | STRING | tradeTransactionSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentOrderSn | STRING | parentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis | INTEGER | parentShippingTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis | INTEGER | refundTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn | STRING | originParentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn | STRING | financeParentOrderSn（STRING） |\n| invoiceDetailInfoList[].platformInfo | OBJECT | platformInfo（OBJECT） |\n| invoiceDetailInfoList[].platformInfo.platformName | STRING | platformName（STRING） |\n| invoiceDetailInfoList[].platformInfo.platformAddress | STRING | platformAddress（STRING） |\n| invoiceDetailInfoList[].shippingFee | OBJECT | shippingFee（OBJECT） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountWithTax | INTEGER | shippingAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax | INTEGER | shippingAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[] | OBJECT[] | goodsInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceDetailType | INTEGER | invoiceDetailType（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[] | OBJECT[] | shippingInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceType | INTEGER | invoiceType（INTEGER） |\n| invoiceDetailInfoList[].currency | STRING | currency（STRING） |\n| invoiceDetailInfoList[].promotionInfo | OBJECT | promotionInfo（OBJECT） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax | INTEGER | promotionAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax | INTEGER | promotionAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[] | OBJECT[] | addOrderInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountWithTax | INTEGER | amountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax | INTEGER | amountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType | INTEGER | addOrderDetailType（INTEGER） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_detail_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-invoice-info-query.md\n\n# 发票信息查询 — `temu.pay.tax.invoice.info.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_info_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=5f5d1168742b4991a86684cbd0c21489 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.info.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query tax invoice summary list by parent order numbers.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSnList (STRING[] **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSnList | STRING[] | **是** | Parent order number list, max 20 per request. |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taxInvoiceInfoList[] (OBJECT[])\n    ├── taxInvoiceInfoList[].invoiceTime (INTEGER)\n    ├── taxInvoiceInfoList[].invoiceNumber (STRING)\n    ├── taxInvoiceInfoList[].parentOrderSn (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taxInvoiceInfoList[] | OBJECT[] | taxInvoiceInfoList（OBJECT[]） |\n| taxInvoiceInfoList[].invoiceTime | INTEGER | invoiceTime（INTEGER） |\n| taxInvoiceInfoList[].invoiceNumber | STRING | invoiceNumber（STRING） |\n| taxInvoiceInfoList[].parentOrderSn | STRING | parentOrderSn（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-invoice-pdf-download.md\n\n# 发票 PDF 下载 — `temu.pay.tax.invoice.pdf.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_pdf_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=2b8a5a8a75604779b2e0017ee79b462a |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.pdf.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get signed URL to download invoice PDF.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceNumber (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | Parent order number |\n| invoiceNumber | STRING | **是** | Invoice number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signUrl (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signUrl | STRING | signUrl（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_pdf_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-merchant-report-download.md\n\n# 商家税务报表下载 — `temu.pay.tax.merchant.report.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_report_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=cc87994f2ac24fc88795f2a3a8844683 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.report.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Download merchant tax report file by task/request.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── requestId (STRING)\n    └── taskId (LONG)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestId | STRING | 否 | Request ID |\n| taskId | LONG | 否 | Task ID |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── fileUrl (STRING)\n    ├── status (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| fileUrl | STRING | fileUrl（STRING） |\n| status | INTEGER | status（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020004 | Reqeust parameter is invalid. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_report_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.4:references/apis/temu-pay-tax-merchant-upload-invoice.md\n\n# 商家上传发票 — `temu.pay.tax.merchant.upload.invoice`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_upload_invoice.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=98fcf420ee5c4f0d8c8f708adfd89160 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.upload.invoice`，业务载荷放在 Body 的 `params` |\n\n**Description:** Merchant upload invoice or credit note file for an order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceDirection (INTEGER **必填**)\n    └── invoiceName (STRING **必填**)\n    └── recipientType (INTEGER **必填**)\n    └── fileUrl (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order sn |\n| invoiceDirection | INTEGER | **是** | invoice direction. 1-invoice, 2-credit-note |\n| invoiceName | STRING | **是** | invoice name |\n| recipientType | INTEGER | **是** | recipient type. 1-consumer, 2-platform |\n| fileUrl | STRING | **是** | invoice file url |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── success (BOOLEAN)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | Upload result inside `result`（上传是否成功；与响应顶层 `success` 不同，顶层表示 API 调用是否成功） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200030003 | ParentOrderSn Invalid | — |\n| 200030002 | Invalid Invoice Content | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_upload_invoice.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}'\n```\n\nArchive v1.0.3: 36 files, 41432 bytes\n\nFiles: references/access-token.md (4664b), references/api.md (3970b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (12421b), scripts/_temu_eu_common.py (3125b), scripts/_temu_token_store.py (4273b), scripts/check_linkfox_token.py (1797b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (705b), scripts/temu_eu_proxy.py (871b), scripts/temu_file_download.py (1695b), scripts/temu_proxy.py (2138b), scripts/temu_token_guide.py (1594b), skill-card.md (4011b), SKILL.md (5307b), _meta.json (138b)\n\nFile v1.0.3:SKILL.md\n\n---\r\nname: linkfox-temu-tax-eu\r\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\r\n---\r\n\r\n# Temu 欧洲站 — 电商税务（Tax）\r\n\r\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\r\n\r\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\r\n\r\n**网关（本 skill 内置）**：\r\n\r\n| 能力 | 方法 | 路径 |\r\n|------|------|------|\r\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\r\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\r\n\r\n## 相关 skill\r\n\r\n| 场景 | skill |\r\n|------|--------|\r\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\r\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\r\n| 价格/供货价 | `linkfox-temu-price-eu` |\r\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\r\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\r\n| 网关与 Temu token | 本 skill `scripts/` |\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 默认参数\r\n\r\n| 字段 | 默认 | 说明 |\r\n|------|------|------|\r\n| site | `eu` | Partner EU |\r\n| managementType | `semi-managed` | 半托管 |\r\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\r\n\r\n## 鉴权\r\n\r\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\r\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\r\n\r\n## Scripts（按 type）\r\n\r\n| 脚本 | type | 状态 |\r\n|------|------|------|\r\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\r\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\r\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\r\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\r\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\r\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.download` | 已接入 |\r\n| `eu_tax_merchant_upload_invoice.py` | `temu.pay.tax.merchant.upload.invoice` | 已接入 |\r\n| `temu_eu_proxy.py` | 任意 `type` | 通用 |\r\n| `temu_eu_file_download.py` | 加签文件下载 | 通用 |\r\n\r\n## 接入新接口（约定）\r\n\r\n你每提供一条 Partner 文档（HTML/URL + `type` + Request/Response 表 + 可选 `sub_menu_code`），将：\r\n\r\n1. 新增 `references/apis/<type-slug>.md`（入参/出参层级全部展开）\r\n2. 新增 `scripts/eu_tax_<slug>.py`（调用 `_eu_tax_script.run_cli`）\r\n3. 更新 [partner-eu-catalog.md](./references/partner-eu-catalog.md)、[apis/README.md](./references/apis/README.md) 与本表\r\n\r\n## 示例\r\n\r\n```bash\r\nexport LINKFOXAGENT_API_KEY=\"<key>\"\r\n\r\n# 发票信息查询（最多 20 个父单号）\r\npython scripts/eu_tax_invoice_info_query.py '{\r\n  \"accessToken\": \"TOKEN\",\r\n  \"tokenPurpose\": \"product-inventory\",\r\n  \"site\": \"eu\",\r\n  \"request\": {\r\n    \"parentOrderSnList\": [\"PO-123456789\"]\r\n  }\r\n}'\r\n\r\n# 申请导出税务报表（月份 YYYY-MM）\r\npython scripts/eu_tax_apply_export_report.py '{\r\n  \"accessToken\": \"TOKEN\",\r\n  \"request\": {\r\n    \"reportMonth\": \"2025-04\",\r\n    \"requestId\": \"req-uuid-001\"\r\n  }\r\n}'\r\n```\r\n\r\n**Feedback：** `skillName`：`linkfox-temu-tax-eu`\r\n\r\n## 网关与授权脚本\r\n\r\n授权说明：[references/access-token.md](./references/access-token.md)\n\nFile v1.0.3:references/apis/README.md\n\n# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n| `temu.pay.tax.get.galerie.signature` | [temu-pay-tax-get-galerie-signature.md](./temu-pay-tax-get-galerie-signature.md) |\n\n## 发票\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.invoice.detail.query` | [temu-pay-tax-invoice-detail-query.md](./temu-pay-tax-invoice-detail-query.md) |\n| `temu.pay.tax.invoice.info.query` | [temu-pay-tax-invoice-info-query.md](./temu-pay-tax-invoice-info-query.md) |\n| `temu.pay.tax.invoice.pdf.download` | [temu-pay-tax-invoice-pdf-download.md](./temu-pay-tax-invoice-pdf-download.md) |\n\n## 商家报表 / 上传\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.merchant.report.download` | [temu-pay-tax-merchant-report-download.md](./temu-pay-tax-merchant-report-download.md) |\n| `temu.pay.tax.merchant.upload.invoice` | [temu-pay-tax-merchant-upload-invoice.md](./temu-pay-tax-merchant-upload-invoice.md) |\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-temu-tax-eu\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783338543617\n}\n\nFile v1.0.3:references/access-token.md\n\n# Temu accessToken 授权与获取\n\n> 本文件供 **`linkfox-temu-tax-eu`**（及同仓库其它 Temu EU skill）共用。Tax 接口默认 `site=eu`、`tokenPurpose=product-inventory`；若 Partner Tax 文档指定其它 token，以文档为准。\n\nTemu **没有** LinkFox 侧自动 OAuth；`accessToken` 须在 Temu 卖家后台「服务市场 → 授权管理」**手动复制**。与 `LINKFOXAGENT_API_KEY`（LinkFox 用户鉴权）是两套令牌。\n\n## 两种鉴权（勿混淆）\n\n| 令牌 | 用途 | 获取方式 |\n|------|------|----------|\n| **LinkFox 用户 Token** | 调用 `/temu/proxy`、`/temu/fileDownload` **必填** | `LINKFOXAGENT_API_KEY` 或请求 JSON 的 `token`；Header `Authorization` + `Token`（同 amazon-store-auth） |\n| **Temu accessToken** | Temu 业务 API（经紫鸟转发） | Temu 卖家后台授权后复制 |\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py\n```\n\n## tokenPurpose 与场景\n\n| tokenPurpose | 店铺类型 | 推荐 site | 授权应用 |\n|--------------|----------|-----------|----------|\n| `product-inventory` | 半托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `order-shipping` | 半托管 | `us` / `global` / `eu` | Cyber-ERP酷鸟助手 |\n| `full-managed` | 全托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `local-native` | 本土（美/欧主体） | `us` 等 | Cyber-ERP |\n\n## 1. 半托管 — 商品/库存 Token\n\n1. 登录 [seller.kuajingmaihuo.com](https://seller.kuajingmaihuo.com) 或 [agentseller.temu.com](https://agentseller.temu.com)\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → 选择 **「酷鸟卖家助手」**\n4. 全选常规和特殊授权 → 确认 → **复制 access_token**\n5. 调用 API：`site=cn` 或 `partner`，`managementType=semi-managed`\n\n## 2. 半托管 — 订单/发货 Token\n\n1. 登录 Temu 卖家后台\n2. 右上角 **Seller Central** → 切换到目标区域（美区 / 欧区 / 全球）\n3. **服务市场** → **授权管理**\n4. **获取授权** → 选择 **「Cyber-ERP酷鸟助手」**\n5. 全选授权 → 确认 → 复制 token\n6. 调用 API：`site=eu` / `global` / `eu`，`managementType=semi-managed`\n\n## 3. 全托管店铺\n\n1. 登录 Temu 平台\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → **「酷鸟卖家助手」** → 全选 → 复制 token\n4. 调用 API：`managementType=full-managed`，`site` 通常 `cn` 或 `partner`\n\n## 4. 本土店铺（美区、欧区主体）\n\n1. 登录 Temu\n2. **Apps And Services** → **Manage Your Apps**\n3. **Authorize a new app** → 搜索 **「Cyber-ERP」**\n4. 一般权限与敏感权限全选 → 确认 → 复制 token\n\n## 站点与 OpenAPI 网关\n\n| site | 说明 | Temu 网关 |\n|------|------|-----------|\n| cn | 中国站 | openapi.kuajingmaihuo.com |\n| partner | Partner 网关 | openapi-b-partner.temu.com |\n| us | 欧洲站 | openapi-b-eu.temu.com |\n| global | 全球区 | openapi-b-global.temu.com |\n| eu | 欧洲站 | openapi-b-eu.temu.com |\n\n## 本地保存 Token（推荐）\n\n默认存储：`~/.linkfox/temu-access-tokens.json`（可用 `TEMU_TOKEN_STORE_PATH` 覆盖）。\n\n```bash\n# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mapping\",\n  \"params\": {\"goodsName\": \"测试\", \"goodsNameEn\": \"Test\"}\n}'\n```\n\n## 注意事项\n\n1. **子账号**：可能无法进入服务市场，需主账号授权。\n2. **多站点**：欧洲站、英国站等需分别登录对应后台获取 Token。\n3. **有效期**：Token 会过期，过期后重新在后台复制并 `save_temu_access_token.py`。\n4. **IP 白名单**：需联系紫鸟开放平台配置调用 IP。\n5. **参数小写**：`site`、`managementType` 必须小写。\n\n## 脚本一览\n\n| 脚本 | 说明 |\n|------|------|\n| `temu_token_guide.py` | 按店铺类型/用途输出授权步骤 |\n| `save_temu_access_token.py` | 保存 accessToken 到本地 |\n| `list_temu_access_tokens.py` | 列出已保存 token（默认脱敏）|\n| `get_temu_access_token.py` | 读取指定 store 的 token |\n\nFile v1.0.3:references/api.md\n\n# linkfox-temu-tax-eu — API 参考\n\nTemu **欧洲站电商税务（Tax）**（Partner EU **Tax** 菜单相关接口），经本 skill `temu_eu_proxy`（`POST /temu/proxy`） 转发。Temu 的 `type` 写在 Body，**不是** URL 路径。\n\n> 网关与鉴权：本 skill `scripts/`（`LINKFOXAGENT_API_KEY`、`accessToken` / `storeKey`）。授权见 [access-token.md](./access-token.md)。\n\n---\n\n## 调用规范\n\n| 项 | 说明 |\n|----|------|\n| 网关根地址 | `${LINKFOX_TOOL_GATEWAY}`（可用 `TEMU_API_BASE_URL` / `STORE_API_BASE_URL` 覆盖） |\n| 税务 OpenAPI | `POST /temu/proxy` |\n| 加签文件下载 | `POST /temu/fileDownload`（`temu_eu_file_download.py`） |\n| LinkFox 鉴权 | Header **`Authorization`** 与 **`Token`**（同值）；或 `LINKFOX_AGENT_API_KEY` / `LINKFOXAGENT_API_KEY`；或 JSON `token` |\n| Temu 鉴权 | Body `accessToken`，或 `storeKey` + `site` + `managementType` + `tokenPurpose` |\n| 默认 | `site=eu`，`managementType=semi-managed`，`tokenPurpose=product-inventory` |\n| 上游 OpenAPI（EU） | `https://openapi-b-eu.temu.com/openapi/router`（网关按 `site` 解析） |\n\n### 网关请求 Body（`/temu/proxy`）\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| site | string | 是 | `eu`（本 skill 默认） |\n| managementType | string | 是 | `semi-managed` |\n| accessToken | string | 与 storeKey 二选一 | Temu 店铺令牌 |\n| storeKey | string | 与 accessToken 二选一 | `~/.linkfox/temu-access-tokens.json` 中的键 |\n| tokenPurpose | string | 否 | 默认 `product-inventory`；以 Partner 文档为准 |\n| type | string | 是 | Temu 接口名（Partner Tax 文档中的 `type`） |\n| params | object | 否 | 业务参数；多数接口业务块在 **`params.request`** |\n\n### 网关响应\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| body | string | Temu 原始 JSON 字符串；脚本解析为 `temuBody` |\n| code | integer | 网关错误码：`1002` 参数/Token，`1003` 转发失败 |\n\n解析顺序：**网关 `code`** → `JSON.parse(body)` → `success` / `errorCode` / `errorMsg` / `result`。\n\n### 脚本调用\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'\n```\n\n业务字段可放在顶层或嵌套 `params`；含 `request` 时通常整体作为 `params` 转发。\n\n---\n\n## 接口一览\n\n完整 `sub_menu_code` 与 Partner 文档 URL 见 [partner-eu-catalog.md](./partner-eu-catalog.md)。\n\n**每个接口单独一份文档**：[apis/README.md](./apis/README.md)（随你提供的 Partner 文档递增）。\n\n当前 **7** 个业务 `type` 已接入；见 [apis/README.md](./apis/README.md)。\n\n---\n\n## 典型税务流程\n\n```text\n1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件\n```\n\n---\n\n## 与其它 EU skill 的关系\n\n| 能力 | skill |\n|------|--------|\n| 税务（本 skill） | **`linkfox-temu-tax-eu`** |\n| 商品管理（可含 `taxCodeInfo` 等） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税字段） | `linkfox-temu-order-eu` |\n| 价格 | `linkfox-temu-price-eu` |\n\n---\n\n## 网关错误码\n\n| code | 说明 | 处理 |\n|------|------|------|\n| 1002 | 参数或 LinkFox Token 无效 | 修正参数与 `LINKFOXAGENT_API_KEY` |\n| 1003 | 转发失败 | 检查 Temu token、白名单、网络 |\n\n---\n\n## Feedback API\n\n- **POST** `https://skill-api.linkfox.com/api/v1/public/feedback`\n- `skillName`: **`linkfox-temu-tax-eu`**\n\nFile v1.0.3:references/apis/temu-pay-tax-apply-export-report.md\n\n# 申请导出税务报表 — `temu.pay.tax.apply.export.report`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_apply_export_report.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=6494bb7afd8048d380a13e92f6275d17 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.apply.export.report`，业务载荷放在 Body 的 `params` |\n\n**Description:** Apply to export tax/sales report for a given month.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── reportMonth (STRING **必填**)\n    └── requestId (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| reportMonth | STRING | **是** | Report Month, format YYYY-MM |\n| requestId | STRING | **是** | Request Id |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taskId (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taskId | INTEGER | taskId（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020005 | Region or site not support | — |\n| 200020004 | Reqeust parameter is invalid. | — |\n| 200020003 | Not supported to apply for sales report for the current month | — |\n| 200020002 | Cannot apply for sales reports repeatedly | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-get-galerie-signature.md\n\n# 获取 Galerie 签名 — `temu.pay.tax.get.galerie.signature`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_get_galerie_signature.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=d6147c0484a341c49790b6dfed7da275 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.get.galerie.signature`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get Galerie upload signature for tax-related file operations.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n```\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signature (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signature | STRING | signature（STRING） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_get_galerie_signature.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-invoice-detail-query.md\n\n# 发票明细查询 — `temu.pay.tax.invoice.detail.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_detail_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=3985fe93bff5437c87863a22112b72db |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.detail.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query invoice detail information by parent order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── invoiceDetailInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].orderMetaInfo (OBJECT)\n    ├── invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder (BOOLEAN)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis (INTEGER)\n    ├── invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn (STRING)\n    ├── invoiceDetailInfoList[].platformInfo (OBJECT)\n    ├── invoiceDetailInfoList[].platformInfo.platformName (STRING)\n    ├── invoiceDetailInfoList[].platformInfo.platformAddress (STRING)\n    ├── invoiceDetailInfoList[].shippingFee (OBJECT)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceDetailType (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].skuSpec (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].quantity (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRateBase (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].orderSn (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].vatRate (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].description (STRING)\n    ├── invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT (INTEGER)\n    ├── invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount (INTEGER)\n    ├── invoiceDetailInfoList[].invoiceType (INTEGER)\n    ├── invoiceDetailInfoList[].currency (STRING)\n    ├── invoiceDetailInfoList[].promotionInfo (OBJECT)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[] (OBJECT[])\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountWithTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax (INTEGER)\n    ├── invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| invoiceDetailInfoList[] | OBJECT[] | invoiceDetailInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].orderMetaInfo | OBJECT | orderMetaInfo（OBJECT） |\n| invoiceDetailInfoList[].orderMetaInfo.isCustomerServiceChargeOrder | BOOLEAN | isCustomerServiceChargeOrder（BOOLEAN） |\n| invoiceDetailInfoList[].orderMetaInfo.parentAppealOrderSn | STRING | parentAppealOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderTimeMillis | INTEGER | originParentOrderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.orderTimeMillis | INTEGER | orderTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.tradeTransactionSn | STRING | tradeTransactionSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentOrderSn | STRING | parentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.parentShippingTimeMillis | INTEGER | parentShippingTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.refundTimeMillis | INTEGER | refundTimeMillis（INTEGER） |\n| invoiceDetailInfoList[].orderMetaInfo.originParentOrderSn | STRING | originParentOrderSn（STRING） |\n| invoiceDetailInfoList[].orderMetaInfo.financeParentOrderSn | STRING | financeParentOrderSn（STRING） |\n| invoiceDetailInfoList[].platformInfo | OBJECT | platformInfo（OBJECT） |\n| invoiceDetailInfoList[].platformInfo.platformName | STRING | platformName（STRING） |\n| invoiceDetailInfoList[].platformInfo.platformAddress | STRING | platformAddress（STRING） |\n| invoiceDetailInfoList[].shippingFee | OBJECT | shippingFee（OBJECT） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountWithTax | INTEGER | shippingAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].shippingFee.shippingAmountExcludeTax | INTEGER | shippingAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[] | OBJECT[] | goodsInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].goodsInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].goodsInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceDetailType | INTEGER | invoiceDetailType（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[] | OBJECT[] | shippingInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceWithVAT | INTEGER | unitPriceWithVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].skuSpec | STRING | skuSpec（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].quantity | INTEGER | quantity（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRateBase | INTEGER | vatRateBase（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].orderSn | STRING | orderSn（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].vatRate | INTEGER | vatRate（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].description | STRING | description（STRING） |\n| invoiceDetailInfoList[].shippingInfoList[].unitPriceExcludeVAT | INTEGER | unitPriceExcludeVAT（INTEGER） |\n| invoiceDetailInfoList[].shippingInfoList[].totalGoodsAmount | INTEGER | totalGoodsAmount（INTEGER） |\n| invoiceDetailInfoList[].invoiceType | INTEGER | invoiceType（INTEGER） |\n| invoiceDetailInfoList[].currency | STRING | currency（STRING） |\n| invoiceDetailInfoList[].promotionInfo | OBJECT | promotionInfo（OBJECT） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountExcludeTax | INTEGER | promotionAmountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].promotionInfo.promotionAmountWithTax | INTEGER | promotionAmountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[] | OBJECT[] | addOrderInfoList（OBJECT[]） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountWithTax | INTEGER | amountWithTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].amountExcludeTax | INTEGER | amountExcludeTax（INTEGER） |\n| invoiceDetailInfoList[].addOrderInfoList[].addOrderDetailType | INTEGER | addOrderDetailType（INTEGER） |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_detail_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-invoice-info-query.md\n\n# 发票信息查询 — `temu.pay.tax.invoice.info.query`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_info_query.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=5f5d1168742b4991a86684cbd0c21489 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.info.query`，业务载荷放在 Body 的 `params` |\n\n**Description:** Query tax invoice summary list by parent order numbers.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSnList (STRING[] **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSnList | STRING[] | **是** | Parent order number list, max 20 per request. |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── taxInvoiceInfoList[] (OBJECT[])\n    ├── taxInvoiceInfoList[].invoiceTime (INTEGER)\n    ├── taxInvoiceInfoList[].invoiceNumber (STRING)\n    ├── taxInvoiceInfoList[].parentOrderSn (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| taxInvoiceInfoList[] | OBJECT[] | taxInvoiceInfoList（OBJECT[]） |\n| taxInvoiceInfoList[].invoiceTime | INTEGER | invoiceTime（INTEGER） |\n| taxInvoiceInfoList[].invoiceNumber | STRING | invoiceNumber（STRING） |\n| taxInvoiceInfoList[].parentOrderSn | STRING | parentOrderSn（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-invoice-pdf-download.md\n\n# 发票 PDF 下载 — `temu.pay.tax.invoice.pdf.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_invoice_pdf_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=2b8a5a8a75604779b2e0017ee79b462a |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.invoice.pdf.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Get signed URL to download invoice PDF.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceNumber (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | Parent order number |\n| invoiceNumber | STRING | **是** | Invoice number |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── signUrl (STRING)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| signUrl | STRING | signUrl（STRING） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020001 | Non-compliant query, please use the information correctly. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_invoice_pdf_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-merchant-report-download.md\n\n# 商家税务报表下载 — `temu.pay.tax.merchant.report.download`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_report_download.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=cc87994f2ac24fc88795f2a3a8844683 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.report.download`，业务载荷放在 Body 的 `params` |\n\n**Description:** Download merchant tax report file by task/request.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── requestId (STRING)\n    └── taskId (LONG)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| requestId | STRING | 否 | Request ID |\n| taskId | LONG | 否 | Task ID |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── fileUrl (STRING)\n    ├── status (INTEGER)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| fileUrl | STRING | fileUrl（STRING） |\n| status | INTEGER | status（INTEGER） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200020004 | Reqeust parameter is invalid. | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_report_download.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {}\n}'\n```\n\nFile v1.0.3:references/apis/temu-pay-tax-merchant-upload-invoice.md\n\n# 商家上传发票 — `temu.pay.tax.merchant.upload.invoice`\n\n| 项 | 值 |\n|----|-----|\n| **脚本** | `scripts/eu_tax_merchant_upload_invoice.py` |\n| **Partner 文档** | https://partner-eu.temu.com/documentation?menu_code=7289390cfd724be4a196f11ebe45a896&sub_menu_code=98fcf420ee5c4f0d8c8f708adfd89160 |\n| **网关** | `POST /temu/proxy`，`type`=`temu.pay.tax.merchant.upload.invoice`，业务载荷放在 Body 的 `params` |\n\n**Description:** Merchant upload invoice or credit note file for an order.\n\n> **网关鉴权字段**由本 skill 处理；业务参数见下方 **`request`**。默认 **`site=eu`**、**`tokenPurpose=product-inventory`**。\n\n---\n\n## Request 结构（官方业务参数）\n\n```text\nparams\n└── request (OBJECT)\n    └── parentOrderSn (STRING **必填**)\n    └── invoiceDirection (INTEGER **必填**)\n    └── invoiceName (STRING **必填**)\n    └── recipientType (INTEGER **必填**)\n    └── fileUrl (STRING **必填**)\n```\n\n### `request` 内字段\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| parentOrderSn | STRING | **是** | parent order sn |\n| invoiceDirection | INTEGER | **是** | invoice direction. 1-invoice, 2-credit-note |\n| invoiceName | STRING | **是** | invoice name |\n| recipientType | INTEGER | **是** | recipient type. 1-consumer, 2-platform |\n| fileUrl | STRING | **是** | invoice file url |\n\n### 网关 `params` 写法\n\n```json\n{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}\n```\n\n---\n\n## Response（Temu `body` 解析后）\n\nPartner **Response** 嵌套子行在导出 HTML 中多为折叠状态；下列层级按 **Response 表 + Response Example** 全部展开。\n\n```text\nresponse\n├── success (BOOLEAN)\n├── errorCode (INTEGER)\n├── errorMsg (STRING)\n└── result (OBJECT)\n    ├── success (BOOLEAN)\n```\n\n### 顶层字段\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | success |\n| errorCode | INTEGER | error code |\n| errorMsg | STRING | error message |\n| result | OBJECT | Business result |\n\n### `result`\n\n| 参数 | 类型 | 说明 |\n|------|------|------|\n| success | BOOLEAN | Upload result inside `result`（上传是否成功；与响应顶层 `success` 不同，顶层表示 API 调用是否成功） |\n\n---\n\n## Error Code（Partner 表）\n\n| errorCode | errorMsg | Error SOP |\n|-----------|----------|----------|\n| 200030003 | ParentOrderSn Invalid | — |\n| 200030002 | Invalid Invoice Content | — |\n\n---\n\n## 脚本\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/eu_tax_merchant_upload_invoice.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSn\": \"PO-123456789\",\n    \"invoiceDirection\": 1,\n    \"invoiceName\": \"invoice-001.pdf\",\n    \"recipientType\": 1,\n    \"fileUrl\": \"https://...\"\n  }\n}'\n```\n\nArchive v1.0.2: 35 files, 39682 bytes\n\nFiles: references/access-token.md (4664b), references/api.md (3970b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (12421b), scripts/_temu_eu_common.py (3125b), scripts/_temu_token_store.py (4273b), scripts/check_linkfox_token.py (1797b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (705b), scripts/temu_eu_proxy.py (871b), scripts/temu_file_download.py (1695b), scripts/temu_proxy.py (2138b), scripts/temu_token_guide.py (1594b), SKILL.md (5307b), _meta.json (138b)\n\nFile v1.0.2:SKILL.md\n\n---\r\nname: linkfox-temu-tax-eu\r\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\r\n---\r\n\r\n# Temu 欧洲站 — 电商税务（Tax）\r\n\r\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\r\n\r\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\r\n\r\n**网关（本 skill 内置）**：\r\n\r\n| 能力 | 方法 | 路径 |\r\n|------|------|------|\r\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\r\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\r\n\r\n## 相关 skill\r\n\r\n| 场景 | skill |\r\n|------|--------|\r\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\r\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\r\n| 价格/供货价 | `linkfox-temu-price-eu` |\r\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\r\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\r\n| 网关与 Temu token | 本 skill `scripts/` |\r\n\r\n## 调用方式\r\n\r\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\r\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\r\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\r\n\r\n**输出策略（脚本默认行为）**：\r\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\r\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\r\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\r\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\r\n\r\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\r\n\r\n## 默认参数\r\n\r\n| 字段 | 默认 | 说明 |\r\n|------|------|------|\r\n| site | `eu` | Partner EU |\r\n| managementType | `semi-managed` | 半托管 |\r\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\r\n\r\n## 鉴权\r\n\r\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\r\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\r\n\r\n## Scripts（按 type）\r\n\r\n| 脚本 | type | 状态 |\r\n|------|------|------|\r\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\r\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\r\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\r\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\r\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\r\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.download` | 已接入 |\r\n| `eu_tax_merchant_upload_invoice.py` | `temu.pay.tax.merchant.upload.invoice` | 已接入 |\r\n| `temu_eu_proxy.py` | 任意 `type` | 通用 |\r\n| `temu_eu_file_download.py` | 加签文件下载 | 通用 |\r\n\r\n## 接入新接口（约定）\r\n\r\n你每提供一条 Partner 文档（HTML/URL + `type` + Request/Response 表 + 可选 `sub_menu_code`），将：\r\n\r\n1. 新增 `references/apis/<type-slug>.md`（入参/出参层级全部展开）\r\n2. 新增 `scripts/eu_tax_<slug>.py`（调用 `_eu_tax_script.run_cli`）\r\n3. 更新 [partner-eu-catalog.md](./references/partner-eu-catalog.md)、[apis/README.md](./references/apis/README.md) 与本表\r\n\r\n## 示例\r\n\r\n```bash\r\nexport LINKFOXAGENT_API_KEY=\"<key>\"\r\n\r\n# 发票信息查询（最多 20 个父单号）\r\npython scripts/eu_tax_invoice_info_query.py '{\r\n  \"accessToken\": \"TOKEN\",\r\n  \"tokenPurpose\": \"product-inventory\",\r\n  \"site\": \"eu\",\r\n  \"request\": {\r\n    \"parentOrderSnList\": [\"PO-123456789\"]\r\n  }\r\n}'\r\n\r\n# 申请导出税务报表（月份 YYYY-MM）\r\npython scripts/eu_tax_apply_export_report.py '{\r\n  \"accessToken\": \"TOKEN\",\r\n  \"request\": {\r\n    \"reportMonth\": \"2025-04\",\r\n    \"requestId\": \"req-uuid-001\"\r\n  }\r\n}'\r\n```\r\n\r\n**Feedback：** `skillName`：`linkfox-temu-tax-eu`\r\n\r\n## 网关与授权脚本\r\n\r\n授权说明：[references/access-token.md](./references/access-token.md)\n\nFile v1.0.2:references/apis/README.md\n\n# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n\n\nArchive v1.0.0: 36 files, 38128 bytes\n\nFiles: references/access-token.md (4664b), references/api.md (3953b), references/apis/README.md (1122b), references/apis/temu-pay-tax-apply-export-report.md (2428b), references/apis/temu-pay-tax-get-galerie-signature.md (1793b), references/apis/temu-pay-tax-invoice-detail-query.md (10153b), references/apis/temu-pay-tax-invoice-info-query.md (2639b), references/apis/temu-pay-tax-invoice-pdf-download.md (2252b), references/apis/temu-pay-tax-merchant-report-download.md (2259b), references/apis/temu-pay-tax-merchant-upload-invoice.md (3066b), references/authorization-flow.md (1186b), references/partner-eu-catalog.md (3754b), scripts/_eu_tax_script.py (440b), scripts/_temu_auth_guide.py (6198b), scripts/_temu_common.py (5593b), scripts/_temu_eu_common.py (3099b), scripts/_temu_token_store.py (4237b), scripts/check_linkfox_token.py (1797b), scripts/eu_tax_apply_export_report.py (264b), scripts/eu_tax_get_galerie_signature.py (267b), scripts/eu_tax_invoice_detail_query.py (261b), scripts/eu_tax_invoice_info_query.py (255b), scripts/eu_tax_invoice_pdf_download.py (260b), scripts/eu_tax_merchant_report_download.py (279b), scripts/eu_tax_merchant_upload_invoice.py (270b), scripts/get_temu_access_token.py (1843b), scripts/list_temu_access_tokens.py (652b), scripts/save_temu_access_token.py (1377b), scripts/temu_eu_file_download.py (650b), scripts/temu_eu_proxy.py (809b), scripts/temu_file_download.py (1595b), scripts/temu_proxy.py (2027b), scripts/temu_token_guide.py (1594b), skill-card.md (2592b), SKILL.md (4287b), _meta.json (138b)","readmeExcerpt":"Skill: Temu欧洲站-税务 Owner: linkfox-ai Summary: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。 Tags: latest:1.0.6 Version history: v1.0.6 | 2026-08-14T15:20:15.258Z | user Update from 1.0.5 to 1.0.6 v1.0.5 | 2026-08-07T11:24:42.030Z","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<key>\"\n\n# 发票信息查询（最多 20 个父单号）\npython scripts/eu_tax_invoice_info_query.py '{\n  \"accessToken\": \"TOKEN\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"site\": \"eu\",\n  \"request\": {\n    \"parentOrderSnList\": [\"PO-123456789\"]\n  }\n}'\n\n# 申请导出税务报表（月份 YYYY-MM）\npython scripts/eu_tax_apply_export_report.py '{\n  \"accessToken\": \"TOKEN\",\n  \"request\": {\n    \"reportMonth\": \"2025-04\",\n    \"requestId\": \"req-uuid-001\"\n  }\n}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py"},{"language":"bash","snippet":"# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mapping\",\n  \"params\": {\"goodsName\": \"测试\", \"goodsNameEn\": \"Test\"}\n}'"},{"language":"bash","snippet":"export LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'"},{"language":"text","snippet":"1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件"},{"language":"text","snippet":"params\n└── request (OBJECT)\n    └── reportMonth (STRING **必填**)\n    └── requestId (STRING **必填**)"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: linkfox-temu-tax-eu\ndescription: Temu 欧洲站电商税务（Tax）API，经 LinkFox 网关转发 Partner EU 7 个 temu.pay.tax.* 接口：导出报表、Galerie签名、发票查询/下载、商家报表下载/上传发票等。当用户提到 Temu EU Tax、temu.pay.tax.invoice、VAT、发票上传、export report、Galerie signature、site=eu 税务 时触发。商品管理用 linkfox-temu-manage-product-eu。\n---\n\n# Temu 欧洲站 — 电商税务（Tax）\n\n本 skill（`linkfox-temu-tax-eu`）覆盖 Partner Platform for EU **Tax / 电商税务** 相关 OpenAPI（`menu_code` 与各 `sub_menu_code` 以 Partner 后台为准，见 [partner-eu-catalog.md](./references/partner-eu-catalog.md)）。\n\n> 当前已接入 **7** 个接口；其余 Tax 接口将按 Partner 文档逐条补充。\n\n**网关（本 skill 内置）**：\n\n| 能力 | 方法 | 路径 |\n|------|------|------|\n| 税务 OpenAPI（`eu_tax_*`、`temu_eu_proxy`） | POST | `https://tool-gateway.linkfox.com/temu/proxy` |\n| 加签文件下载 | POST | `https://tool-gateway.linkfox.com/temu/fileDownload` |\n\n## 相关 skill\n\n| 场景 | skill |\n|------|--------|\n| 商品列表/编辑/合规（含 `taxCodeInfo` 等字段） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税/不含税明细） | `linkfox-temu-order-eu` |\n| 价格/供货价 | `linkfox-temu-price-eu` |\n| 买家/卖家取消订单 | `linkfox-temu-cancel-order-eu` |\n| 发品 | `linkfox-temu-add-product-us`（`site=eu`） |\n| 网关与 Temu token | 本 skill `scripts/` |\n\n## 调用方式\n\n- **API 端点**：`POST /temu/proxy`（不同操作通过请求体区分；完整参数/响应/错误码见 `references/api.md`）\n- **Python 脚本**：`python scripts/<脚本名>.py '<JSON 参数>' [--inline]`（可用脚本见上文脚本一览）\n- **成本约束**：本工具会消耗积分；失败/空结果不得自动换关键词、翻页或连续试探；需要继续检索时先向用户说明会产生额外消耗。\n\n**输出策略（脚本默认行为）**：\n- **始终**将完整响应写入 `<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-temu-tax-eu-<timestamp>.json`（`<cwd>` 为脚本执行时的工作目录，在 Claude Code 里即当前项目目录；`<session>` 取自环境变量 `SESSION_ID`，按用户任务自动聚合；**禁止写入 /tmp**，当前目录不可写则报错）\n- 响应体 ≤ 8 KB：落盘后把完整 JSON 打印到 stdout\n- 响应体 > 8 KB：落盘后 stdout 只输出摘要（顶层字段、常见计数如 `total`/`costToken`、最大列表字段的长度 + 前 3 条样本）\n- 加 `--inline` 强制全量打印到 stdout（同样落盘）\n\n**读数据建议**：先看摘要判断是否足够；需要具体字段时优先用 `jq`或`ConvertFrom-Json` 从保存的 json 文件按需抽取，避免整份 JSON 进入上下文。\n\n## 解决认证和积分问题\n发生以下异常情况时，采用 references/onboarding.md 引导解决问题：\n\n### 异常情况\n- **未配置API Key**：环境变量未配置 `LINKFOX_AGENT_API_KEY`，也未配置 `LINKFOXAGENT_API_KEY`。\n- **响应401或402状态码**\n- **响应提示积分或余额不足**：消息含\"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值\"，或类似含义的内容。\n\n## 默认参数\n\n| 字段 | 默认 | 说明 |\n|------|------|------|\n| site | `eu` | Partner EU |\n| managementType | `semi-managed` | 半托管 |\n| tokenPurpose | `product-inventory` | 酷鸟卖家助手 token（若 Partner 要求其它 purpose，以文档为准） |\n\n## 鉴权\n\n1. **LinkFox**：`LINKFOXAGENT_API_KEY` → Header `Authorization` + `Token`\n2. **Temu**：`accessToken` 或 `storeKey`（`storeKey` 时建议带 `tokenPurpose=product-inventory`）\n\n## Scripts（按 type）\n\n| 脚本 | type | 状态 |\n|------|------|------|\n| `eu_tax_apply_export_report.py` | `temu.pay.tax.apply.export.report` | 已接入 |\n| `eu_tax_get_galerie_signature.py` | `temu.pay.tax.get.galerie.signature` | 已接入 |\n| `eu_tax_invoice_detail_query.py` | `temu.pay.tax.invoice.detail.query` | 已接入 |\n| `eu_tax_invoice_info_query.py` | `temu.pay.tax.invoice.info.query` | 已接入 |\n| `eu_tax_invoice_pdf_download.py` | `temu.pay.tax.invoice.pdf.download` | 已接入 |\n| `eu_tax_merchant_report_download.py` | `temu.pay.tax.merchant.report.d"},{"path":"references/apis/README.md","content":"# Tax — 接口文档索引\n\n每个 `type` 单独一份文档，经 `POST /temu/proxy` 调用。\n\n## 报表 / 签名\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.apply.export.report` | [temu-pay-tax-apply-export-report.md](./temu-pay-tax-apply-export-report.md) |\n| `temu.pay.tax.get.galerie.signature` | [temu-pay-tax-get-galerie-signature.md](./temu-pay-tax-get-galerie-signature.md) |\n\n## 发票\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.invoice.detail.query` | [temu-pay-tax-invoice-detail-query.md](./temu-pay-tax-invoice-detail-query.md) |\n| `temu.pay.tax.invoice.info.query` | [temu-pay-tax-invoice-info-query.md](./temu-pay-tax-invoice-info-query.md) |\n| `temu.pay.tax.invoice.pdf.download` | [temu-pay-tax-invoice-pdf-download.md](./temu-pay-tax-invoice-pdf-download.md) |\n\n## 商家报表 / 上传\n\n| type | 文档 |\n|------|------|\n| `temu.pay.tax.merchant.report.download` | [temu-pay-tax-merchant-report-download.md](./temu-pay-tax-merchant-report-download.md) |\n| `temu.pay.tax.merchant.upload.invoice` | [temu-pay-tax-merchant-upload-invoice.md](./temu-pay-tax-merchant-upload-invoice.md) |"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7dmc1t4j28hem1twwyav85p182pb1j\",\n  \"slug\": \"linkfox-temu-tax-eu\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1786720815258\n}"},{"path":"references/access-token.md","content":"# Temu accessToken 授权与获取\n\n> 本文件供 **`linkfox-temu-tax-eu`**（及同仓库其它 Temu EU skill）共用。Tax 接口默认 `site=eu`、`tokenPurpose=product-inventory`；若 Partner Tax 文档指定其它 token，以文档为准。\n\nTemu **没有** LinkFox 侧自动 OAuth；`accessToken` 须在 Temu 卖家后台「服务市场 → 授权管理」**手动复制**。与 `LINKFOXAGENT_API_KEY`（LinkFox 用户鉴权）是两套令牌（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n## 两种鉴权（勿混淆）\n\n| 令牌 | 用途 | 获取方式 |\n|------|------|----------|\n| **LinkFox 用户 Token** | 调用 `/temu/proxy`、`/temu/fileDownload` **必填** | `LINKFOXAGENT_API_KEY` 或请求 JSON 的 `token`；Header `Authorization` + `Token`（同 amazon-store-auth）（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| **Temu accessToken** | Temu 业务 API（经紫鸟转发） | Temu 卖家后台授权后复制 |\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<your-key>\"\npython scripts/check_linkfox_token.py\n```\n\n## tokenPurpose 与场景\n\n| tokenPurpose | 店铺类型 | 推荐 site | 授权应用 |\n|--------------|----------|-----------|----------|\n| `product-inventory` | 半托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `order-shipping` | 半托管 | `us` / `global` / `eu` | Cyber-ERP酷鸟助手 |\n| `full-managed` | 全托管 | `cn` / `partner` | 酷鸟卖家助手 |\n| `local-native` | 本土（美/欧主体） | `us` 等 | Cyber-ERP |\n\n## 1. 半托管 — 商品/库存 Token\n\n1. 登录 [seller.kuajingmaihuo.com](https://seller.kuajingmaihuo.com) 或 [agentseller.temu.com](https://agentseller.temu.com)\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → 选择 **「酷鸟卖家助手」**\n4. 全选常规和特殊授权 → 确认 → **复制 access_token**\n5. 调用 API：`site=cn` 或 `partner`，`managementType=semi-managed`\n\n## 2. 半托管 — 订单/发货 Token\n\n1. 登录 Temu 卖家后台\n2. 右上角 **Seller Central** → 切换到目标区域（美区 / 欧区 / 全球）\n3. **服务市场** → **授权管理**\n4. **获取授权** → 选择 **「Cyber-ERP酷鸟助手」**\n5. 全选授权 → 确认 → 复制 token\n6. 调用 API：`site=eu` / `global` / `eu`，`managementType=semi-managed`\n\n## 3. 全托管店铺\n\n1. 登录 Temu 平台\n2. **系统管理** → **服务市场** → **授权管理**\n3. **获取授权** → **「酷鸟卖家助手」** → 全选 → 复制 token\n4. 调用 API：`managementType=full-managed`，`site` 通常 `cn` 或 `partner`\n\n## 4. 本土店铺（美区、欧区主体）\n\n1. 登录 Temu\n2. **Apps And Services** → **Manage Your Apps**\n3. **Authorize a new app** → 搜索 **「Cyber-ERP」**\n4. 一般权限与敏感权限全选 → 确认 → 复制 token\n\n## 站点与 OpenAPI 网关\n\n| site | 说明 | Temu 网关 |\n|------|------|-----------|\n| cn | 中国站 | openapi.kuajingmaihuo.com |\n| partner | Partner 网关 | openapi-b-partner.temu.com |\n| us | 欧洲站 | openapi-b-eu.temu.com |\n| global | 全球区 | openapi-b-global.temu.com |\n| eu | 欧洲站 | openapi-b-eu.temu.com |\n\n## 本地保存 Token（推荐）\n\n默认存储：`~/.linkfox/temu-access-tokens.json`（可用 `TEMU_TOKEN_STORE_PATH` 覆盖）。\n\n```bash\n# 查看授权步骤\npython scripts/temu_token_guide.py '{\"shopType\":\"semi-managed\",\"tokenPurpose\":\"product-inventory\",\"site\":\"cn\"}'\n\n# 保存 token\npython scripts/save_temu_access_token.py '{\n  \"storeKey\": \"my-shop\",\n  \"label\": \"中国半托管\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"accessToken\": \"PASTE_TOKEN\"\n}'\n\n# 列出已保存（脱敏）\npython scripts/list_temu_access_tokens.py\n\n# 用 storeKey 调 API（无需每次粘贴 token）\npython scripts/temu_proxy.py '{\n  \"storeKey\": \"my-shop\",\n  \"site\": \"cn\",\n  \"managementType\": \"semi-managed\",\n  \"tokenPurpose\": \"product-inventory\",\n  \"type\": \"bg.goods.category.mappin"},{"path":"references/api.md","content":"# linkfox-temu-tax-eu — API 参考\n\nTemu **欧洲站电商税务（Tax）**（Partner EU **Tax** 菜单相关接口），经本 skill `temu_eu_proxy`（`POST /temu/proxy`） 转发。Temu 的 `type` 写在 Body，**不是** URL 路径。\n\n> 网关与鉴权：本 skill `scripts/`（`LINKFOXAGENT_API_KEY`、`accessToken` / `storeKey`）。授权见 [access-token.md](./access-token.md)（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理）。\n\n---\n\n## 调用规范\n\n| 项 | 说明 |\n|----|------|\n| 网关根地址 | `${LINKFOX_TOOL_GATEWAY}`（可用 `TEMU_API_BASE_URL` / `STORE_API_BASE_URL` 覆盖） |\n| 税务 OpenAPI | `POST /temu/proxy` |\n| 加签文件下载 | `POST /temu/fileDownload`（`temu_eu_file_download.py`） |\n| LinkFox 鉴权 | Header **`Authorization`** 与 **`Token`**（同值）；或 `LINKFOX_AGENT_API_KEY` / `LINKFOXAGENT_API_KEY`；或 JSON `token`（如未配置 按 SKILL.md 的 **## 解决认证和积分问题** 处理） |\n| Temu 鉴权 | Body `accessToken`，或 `storeKey` + `site` + `managementType` + `tokenPurpose` |\n| 默认 | `site=eu`，`managementType=semi-managed`，`tokenPurpose=product-inventory` |\n| 上游 OpenAPI（EU） | `https://openapi-b-eu.temu.com/openapi/router`（网关按 `site` 解析） |\n\n### 网关请求 Body（`/temu/proxy`）\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| site | string | 是 | `eu`（本 skill 默认） |\n| managementType | string | 是 | `semi-managed` |\n| accessToken | string | 与 storeKey 二选一 | Temu 店铺令牌 |\n| storeKey | string | 与 accessToken 二选一 | `~/.linkfox/temu-access-tokens.json` 中的键 |\n| tokenPurpose | string | 否 | 默认 `product-inventory`；以 Partner 文档为准 |\n| type | string | 是 | Temu 接口名（Partner Tax 文档中的 `type`） |\n| params | object | 否 | 业务参数；多数接口业务块在 **`params.request`** |\n\n### 网关响应\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| body | string | Temu 原始 JSON 字符串；脚本解析为 `temuBody` |\n| code | integer | 网关错误码：`1002` 参数/Token，`1003` 转发失败 |\n\n解析顺序：**网关 `code`** → `JSON.parse(body)` → `success` / `errorCode` / `errorMsg` / `result`。\n\n### 脚本调用\n\n```bash\nexport LINKFOXAGENT_API_KEY=\"<key>\"\npython scripts/temu_eu_proxy.py '{\"accessToken\":\"TOKEN\",\"type\":\"<PARTNER_TYPE>\",\"request\":{}}'\n```\n\n业务字段可放在顶层或嵌套 `params`；含 `request` 时通常整体作为 `params` 转发。\n\n---\n\n## 接口一览\n\n完整 `sub_menu_code` 与 Partner 文档 URL 见 [partner-eu-catalog.md](./partner-eu-catalog.md)。\n\n**每个接口单独一份文档**：[apis/README.md](./apis/README.md)（随你提供的 Partner 文档递增）。\n\n当前 **7** 个业务 `type` 已接入；见 [apis/README.md](./apis/README.md)。\n\n---\n\n## 典型税务流程\n\n```text\n1. temu.pay.tax.get.galerie.signature        → 获取文件上传签名\n2. temu.pay.tax.merchant.upload.invoice      → 商家上传发票/贷项通知单\n3. temu.pay.tax.invoice.info.query           → 发票摘要（parentOrderSnList ≤20）\n4. temu.pay.tax.invoice.detail.query         → 发票明细（含 VAT/商品/运费）\n5. temu.pay.tax.invoice.pdf.download         → 发票 PDF 加签 URL\n6. temu.pay.tax.apply.export.report          → 申请导出月度报表（返回 taskId）\n7. temu.pay.tax.merchant.report.download     → 下载报表文件\n```\n\n---\n\n## 与其它 EU skill 的关系\n\n| 能力 | skill |\n|------|--------|\n| 税务（本 skill） | **`linkfox-temu-tax-eu`** |\n| 商品管理（可含 `taxCodeInfo` 等） | `linkfox-temu-manage-product-eu` |\n| 订单金额（含税字段） | `linkfox-temu-order-eu` |\n| 价格 | `linkfox-temu-price-eu` |\n\n---\n\n## 网关错误码\n\n| code | 说明 | 处理 |\n|------|------|------|\n| HTTP 401 | authorized error | 按 SKILL.md 的 **## 解决"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1057,"uniquenessScore":37,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T16:20:27.450Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T21:54:28.476Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}