Safely read and change a FreshStore affiliate site through its Site API, covering products, articles, redirects, click analytics and product feeds.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Connect an affiliate network product feed (or a CSV) and its products arrive in the site's categories, each with a custom offer on the network's tracking link. Scope: products:read to read, products:write for the rest, plus categories:read for the category map.
How a run behaves:
daily (default), weekly, or only on demand (manual).network | credentials (secret) | source |
|---|---|---|
awin | feed_key (the product feed API key from a Create-a-Feed link) | feed_ids, and publisher_id for Enhanced feeds |
impact | account_sid, auth_token | catalog_ids, tracking_link |
cj | access_token | company_id, pid, and ad_ids or advertiser_ids |
rakuten | client_id, client_secret | sid, mids, optional keyword |
tradedoubler | token (products token) | feed_ids |
avantlink | none | affiliate_id, website_id, merchant_ids or datafeed_ids |
csv | none | csv_url, or a multipart file |
Credentials are network secrets. Ask the user to put them in environment variables, pass them straight into the request, and never print them. Responses never return them, only credentials_set.
fsapi GET /feeds
fsapi GET /categories/treeAgree the category map and filters with the user first.
fsapi POST /feeds -d '{
"network": "awin",
"name": "Hand tools feed",
"credentials": {"feed_key": "'"$AWIN_FEED_KEY"'"},
"source": {"feed_ids": "5001"},
"category_map": [{"match": "pliers", "category_id": 12}, {"match": "*", "category_id": 10}],
"filters": {"min_price": 5, "in_stock_only": true, "max_products": 100},
"schedule": "daily",
"generate_content": false
}'category_map: the first rule whose match words appear in the row's feed category wins; * matches every row. default_category_id catches rows no rule matches. filters.max_products is 1 to 2,000 (default 100). filters.include and filters.exclude take words. Keep generate_content false unless the user agrees to spend AI chips on every new product.
fsapi POST /feeds/{id}/previewReturns the connection message and the first 20 rows as they would import, with the site category each lands in and action (create or update). Show the user the rows, the kept and left_out counts and, if content is on, the content_chips estimate. Fix the map or filters with PATCH /feeds/{id} and preview again.
fsapi POST /feeds/{id}/import # 202, queued
fsapi GET /feeds/{id} # read last_status, last_message, last_countslast_status is queued, running, done, partial or failed. 409 means a run is already going. Poll every minute or so, not faster.
PATCH /feeds/{id} changes any field except network. A credential key you leave out keeps its value; "" clears it.DELETE /feeds/{id} disconnects the feed. Its products and offers stay on the site and stop refreshing. Confirm first.