admin-affiliate
Apply an affiliate-link recommendation to one component and country
Upserts the single affiliate_links row for (componentId, country) with the PocketBase superuser client: the first matching row is updated, otherwise a row is created. country defaults to universal.
Per actionType:
- use_existing_url (needs preferredUrl) and search_and_apply (needs researchedUrl) store the expanded URL with unavailable: false. A bare 10-character ASIN becomes a product URL on the country's Amazon marketplace (buildProductUrl); any other URL gets that marketplace's affiliate tag (applyRegionalTag). universal uses the de marketplace.
- mark_unavailable stores url: null, unavailable: true.
- delete_link deletes the affiliate_links record linkId (its country is not checked).
- keep_search_fallback writes nothing.
- manual_review and keep_external are rejected with 400.
componentId is required for every action, including delete_link. componentName, unavailable and searchQuery are accepted and ignored.
post/api/admin/affiliate-apply
Request
- Base URL: https://voltplan.app
- URL: https://voltplan.app/api/admin/affiliate-apply
- Auth: HTTP bearer
Request body
Response
Recommendation applied.
Changes
No recorded changes to this operation across all 1 revision of this API.