Hello, I am new to Klaviyo and I would like to make a back in stock API call out of my Shopify store, like explained here. I do not understand the error: is my products do not have a variant, only a product ID. And maybe I miss understood the concept of a relationship. I thought I am creating one by assigning a product to a profile by this query. Maybe someone can help me.
# URL
url = "https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id=myID"
# Body
body = {
"data": {
"type": "back-in-stock-subscription",
"attributes": {
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "email@mail.com"
}
}
},
"channels": ""EMAIL"]
},
"relationships": {
"product": {
"data": {
"type": "catalog-variant",
"id": "$shopify:::$default:::productID"
}
}
}
}
}
I get the error code:
Response Text: {"errors":r{"id":"dfae79b0-0dd5-46e4-9b3c-7906e4ed4280","status":404,"code":"variant_not_found","title":"The variant in your relationship payload does not exist","detail":"The variant in your relationship payload does not exist","source":{"pointer":"/data/relationships/variant/data/id"},"links":{},"meta":{}}]}