It seems like the new APIs are a major step backwards in certain regards and I’m hoping that I'm just misunderstanding their usage. For instance, if I have an array containing, say, two hundred profiles that I want to insert into a list, some of which are existing profiles with updated information and some of which are new profiles, previously I could use the https://a.klaviyo.com/api/v2/list/[listid]/members endpoint, which accepts an array of profiles and would update/create the profiles and ensure they were in the referenced list.
With the new API it seems like I have cycle through the list one-by-one and use a POST call for new users, and PATCH call for existing users, even though the POST call knows which profile is being referenced as the existing ID is returned in the error message. After doing that I use the Subscribe or Add profiles endpoint to add them to the list via Klaviyo ID (as opposed to a key field like email address that we don’t have to get back from Klaviyo).
While I sort of understand splitting the profile operations from the list operations (although it’s certainly more cumbersome since we now have to transport and store data back from Klaviyo, where before we didn’t), it’s puzzling that the profile operations don’t accept arrays and that you have to use a different call based on it being a new profile or an update to an existing one - especially considering the POST operation clearly knows that the profile exists. My operation that previously could be done in 1 call (or a few, depending on the number of profiles) now needs to be done in hundreds or even thousands of calls.
Am I misunderstanding things? If not, is there a plan to at least include support for arrays in the POST or PATCH operations by the time the v2 API sunsets? I’d also suggest that POST operations be allowed to update existing profiles (could be an optional parameter).