Skip to main content
Solved

Add profiles to list failed with Invalid profile IDs: set()


Forum|alt.badge.img+4
  • Problem Solver I
  • 11 replies
I’ve been running into an issue trying to add profiles to a list in batches of 950.  Things were working fine but I started to run into this error:
{:success=>false, :response=>{:errors=>[{:id=>"c8932474-507f-45e6-9d12-4a1a87403ae1", :status=>400, :code=>"invalid", :title=>"Invalid input.", :detail=>"Invalid profile IDs: set()", :source=>{:pointer=>"/data/"}}]}}

The endpoint is:
https://a.klaviyo.com/api/lists/{id}/relationships/profiles/

And I tried to keep my payload under 1000 so 950 per call.  I’ve been able to successfully move 20,000 profiles into a list without issue but lately I’ve been getting the error above.  Any ideas what might be happening?  I was going to drop my numbers down to try to isolate which profiles might be failing.  Would love any feedback if anyone has hit the same error.

Best answer by Chops

I found the issue, it’s on my end.  set() is maybe Python so you’re trying to create a list with no duplicates which made me think I probably have duplicate IDs in my list and I found 5 duplicates in the list I was trying to send.  I need to update the code on my end to de-dupe before attempting to send these. 

View original
Did this topic or the replies in the thread help you find an answer to your question?

6 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @Chops!

I’m going to check on this with our Engineering team and I’ll update the thread ASAP!
 

Best,

Brian


Forum|alt.badge.img+4
  • Author
  • Problem Solver I
  • 11 replies
  • Answer
  • July 31, 2023

I found the issue, it’s on my end.  set() is maybe Python so you’re trying to create a list with no duplicates which made me think I probably have duplicate IDs in my list and I found 5 duplicates in the list I was trying to send.  I need to update the code on my end to de-dupe before attempting to send these. 


Brian Turcotte
Forum|alt.badge.img+37

Hi @Chops!

Glad to hear it’s resolved and thanks for sharing your solution with the Community!

 

- Brian


Forum|alt.badge.img
  • Contributor I
  • 1 reply
  • February 14, 2024

I ran afoul of this just now. @Chops is a hero for figuring this out. @Brian Turcotte Please log a request with the engineering team to make this an actual error message, rather than what it is today. It will save customers & partners a lot of time. 


Forum|alt.badge.img
  • Contributor I
  • 2 replies
  • June 9, 2024

@Brian Turcotte I think it would be worth making the error message more informative. 

I have the same error message with the same root cause (profiles duplication):

Invalid profile IDs: set()

And it’s quite difficult to guess what’s wrong with the payload. 

It would be good to mention duplicates in the error message.

Thank you.


Kim Strauch
Klaviyo Employee
Forum|alt.badge.img+9
  • Klaviyo Employee
  • 91 replies
  • June 13, 2024

@Chops and @MVysh, thank you for raising this issue! Our Engineering team is working on a fix to de-dupe the profile IDs on our end to avoid this error case.