redirects

Record a client-side affiliate link click

Writes one component_click_events row (resolved_country: universal; User-Agent and Referer truncated to 255 characters). Development short-circuit: with NODE_ENV=development the handler answers { ok: true } before reading the body, so nothing is validated or recorded. Bot user agents, a failed PocketBase admin login, a malformed JSON body and any server error also answer 200 { ok: true } without recording.

post/api/affiliate-click

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/affiliate-click
  • Auth: none declared

Request body

component_idstring required

Clicked PocketBase components id; missing or empty → 400.

component_namestring

Stored as given; defaults to empty.

component_typestring

Stored as given; defaults to empty.

link_typestring

search records source amazon_search, any other value or absence affiliate; ignored when source is set.

target_urlstring

Destination URL; defaults to empty.

sourcestring

Explicit click source; overrides the link_type mapping.

Response

Accepted (also returned whenever recording is skipped or fails).

oktrue required

Changes

No recorded changes to this operation across all 1 revision of this API.