Solved

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

  • 27 July 2023
  • 4 replies
  • 186 views

Userlevel 1
Badge +2
  • 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.

icon

Best answer by Chops 31 July 2023, 16:03

View original

4 replies

Userlevel 7
Badge +36

Hi @Chops!

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

Best,

Brian

Userlevel 1
Badge +2

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. 

Userlevel 7
Badge +36

Hi @Chops!

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

 

- Brian

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. 

Reply