SuperAPI AI Directory

linkfox-shopee-store-discount

Coding & development

View repository

Updated 10-16 00:00

About this skill

Shopee Store Discount

Shopee Open Platform Discount module(12 APIs).Depends on linkfox-shopee-store-auth store selection; via POST /shopee/developerProxy pass in shopId(or merchantId), the server parses the token and forwards (path must be api/v2/discount/...)。

How to call

  • API endpoint:POST /shopee/developerProxy(different operations are distinguished by the request body; for complete parameters/responses/error codes see references/api.md)
  • Python script:python scripts/<脚本名>.py '<JSON 参数>' [--inline](available scripts are listed in the script overview above)
  • Cost constraint: this tool consumes compute; on failure/empty results you must not automatically switch keywords, paginate, or repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.

Output strategy (script default behavior):

  • Alwayswrite the complete response to <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-discount-<timestamp>.json(<cwd> is the working directory when the script runs, which in Claude Code is the current project directory;<session> is taken from the environment variable SESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, if the current directory is not writable, report an error)
  • Response body ≤ 8 KB: after writing to disk, print the complete JSON to stdout
  • Response body > 8 KB: after writing to disk, stdout outputs only a summary (top-level fields, common counts such as total/costToken, length of the largest list field + first 3 samples)
  • Add --inline to force full printing to stdout (also written to disk)

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

Resolve authentication and compute issues

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

Abnormal situations

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

Official reference

Discount module index:v2.discount.add_discount


Prerequisites

  1. Run python scripts/check_auth_dependency.py;exit code 42 → first install linkfox-shopee-store-auth。
  2. Other promotion modules such as Bundle Deal / Voucher → not this skill.

Available scripts (12 APIs)

Script API Method
add_discount.py add_discount POST
add_discount_item.py add_discount_item POST
get_discount_list.py get_discount_list GET
get_discount.py get_discount GET
update_discount.py update_discount POST
update_discount_item.py update_discount_item POST
end_discount.py end_discount POST
delete_discount.py delete_discount POST
delete_discount_item.py delete_discount_item POST
get_sip_discounts.py get_sip_discounts GET
set_sip_discount.py set_sip_discount POST
delete_sip_discount.py delete_sip_discount POST
discount_api.py General entry point —

Interface description (by API)

Input parameters and response details are in references/apis/, the SKILL keeps only the index.

API Documentation
add_discount references/apis/add-discount.md
add_discount_item references/apis/add-discount-item.md
delete_discount references/apis/delete-discount.md
delete_discount_item references/apis/delete-discount-item.md
delete_sip_discount references/apis/delete-sip-discount.md
end_discount references/apis/end-discount.md
get_discount references/apis/get-discount.md
get_discount_list references/apis/get-discount-list.md
get_sip_discounts references/apis/get-sip-discounts.md
set_sip_discount references/apis/set-sip-discount.md
update_discount references/apis/update-discount.md
update_discount_item references/apis/update-discount-item.md

Module overview / Feedback see references/api.md。

Usage Scenarios

1. Create a discount campaign

  1. add_discount.py pass the complete body(name, time, discount type, etc.)
  2. add_discount_item.py add participating products
  3. get_discount_list.py confirm campaign status

2. Manage existing campaigns

  • get_discount.py check details
  • update_discount.py / update_discount_item.py modify
  • end_discount.py end early

Not Applicable

  • Store authorization → linkfox-shopee-store-auth
  • Bundle Deal / Voucher / Add-On Deal / Shop Flash Sale / Follow Prize → Other promotion modules skill (Bundle Deal → linkfox-shopee-store-bundle-deal;Add-On Deal → linkfox-shopee-store-add-on-deal;Voucher → linkfox-shopee-store-voucher;Shop Flash Sale → linkfox-shopee-store-shop-flash-sale;Follow Prize → linkfox-shopee-store-follow-prize)
  • Product listing → linkfox-shopee-store-product

Computing power consumption rules

Does not consume computing power.

Feedback: See references/api.md。


For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.