My fetch request looks like this
fetch(`https://a.klaviyo.com/api/v1/catalog/subscribe`, {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
a: process.env.NEXT_PUBLIC_KLAVIYO_KEY,
email: email,
variant: properties.variantId,
platform: 'shopify'
})
})
but the issue is that my shopify variant Ids are alphanumeric and this endpoint is requiring the integer ID that comes from my klaviyo catalog, and I’m a bit stuck on how to get this working properly.
Any info would be great, thanks!