Log a cookie consent action
Records one consent action from the site's consent banner. Send `visitorId`, `action` and `consentGiven`, plus the optional `sessionId`, `pageUrl` and `locale`. Pass the `locale` you sent to `GET /cookie-consent/config`: the log then records the banner language served and its `version`. It also stores the `User-Agent` and a site-scoped hash of the client IP, never the raw IP. The route takes no credential and no spam fields, so a logged row does not prove that a real visitor made the choice. Returns 200. An invalid field returns 422 and nothing is recorded.
/cookie-consent/logshttps://api.lynkow.com/storefront/{siteId}Request bodyrequired
actionenumrequiredRequired. The consent action: `accept_all`, `reject_all`, `customize` or `withdraw`.
One of:
accept_allreject_allcustomizewithdrawconsentGivenobjectrequiredRequired. Maps each category id to `true` (accepted) or `false`. At most 100 keys, each 1 to 50 characters.
visitorIdstringrequiredRequired. The visitor's stable identifier, 1 to 64 characters after surrounding whitespace is trimmed.
localestringBanner language requested, as sent to `GET /cookie-consent/config`. An unmatched value uses the site default, then English.
pageUrlstringAbsolute `http` or `https` URL of the page, up to 2048 characters. Any other scheme, or none, returns 422.
sessionIdstringAnalytics session ID. UUID format