Update affiliate settings
Updates the affiliate's profile and accepted legal details.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
| name | string | no | 2–100 characters. |
| image | string (URL) | no | |
| acceptedAffiliateLegalVersion | string | no | Must be the current legal version. |
| acceptedAffiliateLegalLanguage | string | no | "en" or "fr". |
Response — 200 OK
{
"name": "Jane Doe",
"image": "https://example.com/jane.png",
"acceptedAffiliateLegalVersion": "2026-v1",
"acceptedAffiliateLegalLanguage": "en"
}Fetching the legal terms version
acceptedAffiliateLegalVersion must exactly match the platform's current affiliate terms version. Fetch the current value with:
GET /api/legal-version/affiliate
{ "version": "2026-v1" }No API key is required. Pass the returned version verbatim when the affiliate (re-)accepts the terms. Note the rule this endpoint enforces: if the request provides acceptedAffiliateLegalVersion, it must be the current one; if it omits the field, the affiliate's stored version must already be current — an affiliate on an older version cannot update other profile fields until they accept the latest terms.
Errors — all { "error": "<message>" }:
| Status | error values |
|---|---|
| 400 | A field-specific validation message, or Invalid affiliate settings. for an unparseable body |
| 403 | The affiliate must accept the current affiliate legal terms. |
| 404 | Affiliate not found |
