Skip to main content

Hello,

I encountered an issue while integrating a CRM with Klaviyo. I'm utilizing the API specified at https://developers.klaviyo.com/en/reference/create_profile, and the body request is in JSON format. However, I need to submit it as Key-Value pairs.

Here's what I attempted:


 

dataatype]=profile
dataaattributes]]email]=sarah.mason@klaviyo-demo.com
dataaattributes]]phone_number]=+15005550006
... (remaining key-value pairs)

I'm unsure if this approach will work. When I tested it, I received the following error message:

{
"errors":
{
"id": "5f746ff4-cfca-45c7-9b1b-d7c884119e98",
"status": 404,
"code": "not_found",
"title": "Not found.",
"detail": "No revisions found for method",
"source": {
"pointer": "/data/"
}
}
]
}


 

Can anyone guide me on the correct format for submitting a Key-Value pair request to Klaviyo's API?

Thank you!

Hi @developerCZ!

 

Would you be willing to try the same API call as a CurL request (taking the actual code from the docs you referenced) via a testing tool like Postman?

 

That would help clarify whether the issue is with your integration or the actual content of the API call.

 

Best,

Brian


I tried that. In postman sending json or curl request works. If I send Key - value, it does not work.

Json request body

 


This is what I tried in the form of Json Key-value pair. How can I resolve this issue?

@Brian Turcotte , Could you please have a look at it and suggest me the solution?


Hi, Any updates?


Is there a resolution for this, please? what does ‘No revisions found for method’ mean. Thanks


Hello @developerCZ  You have to send JSON format key value pairs for it to work.


Hello @amitxenai Make sure you have a header named revision and correct value is passed.

You can check the example given here:

https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy

 

A curl request with revision would look like this:

curl --request GET \
--url https://a.klaviyo.com/api/events/ \
--header 'Authorization: Klaviyo-API-Key your-private-api-key' \
--header 'accept: application/json' \
--header 'revision: 2023-12-15'

 


Reply