GET
/hyax-api/visitorRead the visitor ID
On your own site, read the visitor ID with `hyax.getVisitorId()` — hyax.js owns the `hyax_vid` cookie there and this is the value to pass into payment metadata or server-side calls. This endpoint is the first-party counterpart used on Hyax-hosted pages, where `hyax_vid` is issued server-side as an HttpOnly cookie that JavaScript can't read: it returns the existing ID or issues a new one, refreshes the two-year cookie, and is served `no-store`. Call it with `credentials: "include"` from the same origin.
Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.
Request
curl -X GET 'https://platform.hyax.com/hyax-api/visitor'Response
{
"visitorId": "m5x2k9p-8fj3nd0q2la"
}