Shopee Open Platform Voucher module(6 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/voucher/...)。
How to call
- API endpoints:
POST /shopee/developerProxy(different Shopee Open API operations are distinguished by path/method; for complete parameters/responses/error codes seereferences/api.md) - Python script:
python scripts/<脚本名>.py '<JSON 参数>' [--inline](available scripts are listed in the script overview above) - Cost constraint: this tool consumes compute; on failure/empty results you must not automatically switch keywords, paginate, or repeatedly probe; if you need to continue searching, first explain to the user that additional consumption will be incurred.
Output strategy (default script behavior):
- Alwayswrite the complete response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-shopee-store-voucher-<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 variableSESSION_ID, automatically aggregated according to the user's task;writing to /tmp is prohibited, if the current directory is not writable then 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
--inlineto force full printing to stdout (also written to disk)
Data reading suggestions: first look at the summary to judge whether it is sufficient; when specific fields are needed, prefer jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.
Resolve authentication and compute issues
When the following abnormal situations occur, use references/onboarding.md to guide resolution:
Abnormal situations
- API Key not configured: the environment variable is not configured
LINKFOX_AGENT_API_KEY, andLINKFOXAGENT_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 similar meaning.
Official reference
Voucher module index:v2.voucher.add_voucher
Prerequisites
- Run
python scripts/check_auth_dependency.py;exit code 42 → first installlinkfox-shopee-store-auth。 - Other promotions: Discount →
linkfox-shopee-store-discount;Bundle Deal →linkfox-shopee-store-bundle-deal;Add-On Deal →linkfox-shopee-store-add-on-deal;Shop Flash Sale →linkfox-shopee-store-shop-flash-sale。
Available scripts (6 APIs)
| Script | API | Method |
|---|---|---|
add_voucher.py |
add_voucher | POST |
delete_voucher.py |
delete_voucher | POST |
end_voucher.py |
end_voucher | POST |
update_voucher.py |
update_voucher | POST |
get_voucher.py |
get_voucher | GET |
get_voucher_list.py |
get_voucher_list | GET |
voucher_api.py |
General entry point | — |
Interface description (by API)
Input parameter and response details are placed in references/apis/, the SKILL keeps only the index.
| API | Documentation |
|---|---|
add_voucher |
references/apis/add-voucher.md |
delete_voucher |
references/apis/delete-voucher.md |
end_voucher |
references/apis/end-voucher.md |
get_voucher |
references/apis/get-voucher.md |
get_voucher_list |
references/apis/get-voucher-list.md |
update_voucher |
references/apis/update-voucher.md |
Module overview / Feedback see references/api.md。
Usage Scenarios
1. Create and manage vouchers
add_voucher.pypass the completebodyget_voucher_list.pyview the campaign listupdate_voucher.py/end_voucher.pyupdate or end
Not Applicable
- Store authorization →
linkfox-shopee-store-auth - Limited-time discount Discount →
linkfox-shopee-store-discount - Bundle Deal →
linkfox-shopee-store-bundle-deal - Add-On Deal →
linkfox-shopee-store-add-on-deal - Product listing →
linkfox-shopee-store-product
Compute consumption rules
Does not consume compute.
Feedback: see references/api.md。
For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.