๐ Overview
Link Switcher integrates with the Affise API to update offer URLs when a domain must be replaced.
This integration is used by:
๐งฉ Components
AffiseAPIClient
Low-level HTTP client for Affise.
- Auth header:
API-Key: <AFFISE_API_KEY> - Base URL:
AFFISE_BASE_URL
Key endpoints:
GET /3.0/offers(paged)GET /3.0/offer/{offer_id}POST /3.0/admin/offer/{offer_id}(multipart form update)
AffiseController
High-level helpers:
-
get_offers_by_domain(domain, fields)- iterates through paged offers
- filters offers where any of the selected fieldsโ domains match the provided
domain
-
update_offer_with_new_domain(offer_id, old_domain, new_domain, fields)- loads offer details
- replaces the domain part of each selected field when it matches
old_domain - updates the offer in Affise
โ๏ธ Configuration
Relevant settings:
AFFISE_BASE_URLAFFISE_API_KEY