klaviyo-api-sdk 10.0.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +382 -136
  4. data/klaviyo-api-sdk.gemspec +1 -1
  5. data/lib/klaviyo-api-sdk/api/accounts_api.rb +2 -2
  6. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +41 -23
  7. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +82 -76
  8. data/lib/klaviyo-api-sdk/api/coupons_api.rb +111 -93
  9. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +1 -1
  10. data/lib/klaviyo-api-sdk/api/events_api.rb +128 -116
  11. data/lib/klaviyo-api-sdk/api/flows_api.rb +199 -169
  12. data/lib/klaviyo-api-sdk/api/forms_api.rb +19 -7
  13. data/lib/klaviyo-api-sdk/api/images_api.rb +5 -5
  14. data/lib/klaviyo-api-sdk/api/lists_api.rb +391 -337
  15. data/lib/klaviyo-api-sdk/api/metrics_api.rb +151 -115
  16. data/lib/klaviyo-api-sdk/api/profiles_api.rb +170 -119
  17. data/lib/klaviyo-api-sdk/api/reporting_api.rb +49 -7
  18. data/lib/klaviyo-api-sdk/api/reviews_api.rb +2 -2
  19. data/lib/klaviyo-api-sdk/api/segments_api.rb +170 -146
  20. data/lib/klaviyo-api-sdk/api/tags_api.rb +108 -42
  21. data/lib/klaviyo-api-sdk/api/templates_api.rb +12 -12
  22. data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +3 -3
  23. data/lib/klaviyo-api-sdk/api/webhooks_api.rb +7 -7
  24. data/lib/klaviyo-api-sdk/api_client.rb +1 -1
  25. data/lib/klaviyo-api-sdk/configuration.rb +18 -9
  26. data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_resource_object_attributes.rb +34 -0
  27. data/lib/klaviyo-api-sdk/models/device_metadata.rb +2 -2
  28. data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +224 -0
  29. data/lib/klaviyo-api-sdk/models/html_block_data.rb +4 -14
  30. data/lib/klaviyo-api-sdk/models/profile_subscription_delete_query_resource_object_attributes.rb +14 -5
  31. data/lib/klaviyo-api-sdk/models/sms_subscription_parameters.rb +13 -4
  32. data/lib/klaviyo-api-sdk/models/sms_unsubscription_parameters.rb +228 -0
  33. data/lib/klaviyo-api-sdk/models/template_create_query_resource_object_attributes.rb +1 -1
  34. data/lib/klaviyo-api-sdk/models/unsubscription_channels.rb +228 -0
  35. data/lib/klaviyo-api-sdk/models/unsubscription_parameters.rb +259 -0
  36. data/lib/klaviyo-api-sdk.rb +36 -19
  37. metadata +6 -2
@@ -19,6 +19,100 @@ module KlaviyoAPI
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add Profiles to List
23
+ # Add a profile to a list with the given list ID. It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you're trying to give a profile [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) to receive email marketing, SMS marketing, or both. This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
24
+ # @param id [String]
25
+ # @param list_members_add_query [ListMembersAddQuery]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def add_profiles_to_list(id, list_members_add_query, opts = {})
29
+ add_profiles_to_list_with_http_info(id, list_members_add_query, opts)
30
+ nil
31
+ end
32
+
33
+ # alias of `add_profiles_to_list`
34
+ alias create_list_relationships add_profiles_to_list
35
+
36
+ # alias of `add_profiles_to_list`
37
+ alias create_list_relationships_profile add_profiles_to_list
38
+
39
+ # alias of `add_profiles_to_list`
40
+ alias create_list_relationships_profiles add_profiles_to_list
41
+
42
+ # Add Profiles to List
43
+ # Add a profile to a list with the given list ID. It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you&#39;re trying to give a profile [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) to receive email marketing, SMS marketing, or both. This endpoint accepts a maximum of 1000 profiles per call.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60; &#x60;profiles:write&#x60;
44
+ # @param id [String]
45
+ # @param list_members_add_query [ListMembersAddQuery]
46
+ # @param [Hash] opts the optional parameters
47
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
48
+ def add_profiles_to_list_with_http_info(id, list_members_add_query, opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug 'Calling API: ListsApi.add_profiles_to_list ...'
51
+ end
52
+ # verify the required parameter 'id' is set
53
+ if @api_client.config.client_side_validation && id.nil?
54
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.add_profiles_to_list"
55
+ end
56
+ # verify the required parameter 'list_members_add_query' is set
57
+ if @api_client.config.client_side_validation && list_members_add_query.nil?
58
+ fail ArgumentError, "Missing the required parameter 'list_members_add_query' when calling ListsApi.add_profiles_to_list"
59
+ end
60
+ # resource path
61
+ local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
62
+
63
+ # query parameters
64
+ query_params = opts[:query_params] || {}
65
+
66
+ # header parameters
67
+ header_params = opts[:header_params] || {}
68
+ # klaviyo api revision
69
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
72
+ # HTTP header 'Content-Type'
73
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
74
+ if !content_type.nil?
75
+ header_params['Content-Type'] = content_type
76
+ end
77
+
78
+ # form parameters
79
+ form_params = opts[:form_params] || {}
80
+
81
+ # http body (model)
82
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_add_query)
83
+
84
+ # return_type
85
+ return_type = opts[:debug_return_type]
86
+
87
+ # auth_names
88
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
89
+
90
+ new_options = opts.merge(
91
+ :operation => :"ListsApi.add_profiles_to_list",
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => return_type
98
+ )
99
+
100
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug "API called: ListsApi#add_profiles_to_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
+ end
104
+ return data, status_code, headers
105
+ end
106
+
107
+ # alias of `add_profiles_to_list_with_http_info`
108
+ alias create_list_relationships_with_http_info add_profiles_to_list_with_http_info
109
+
110
+ # alias of `add_profiles_to_list_with_http_info`
111
+ alias create_list_relationships_profile_with_http_info add_profiles_to_list_with_http_info
112
+
113
+ # alias of `add_profiles_to_list_with_http_info`
114
+ alias create_list_relationships_profiles_with_http_info add_profiles_to_list_with_http_info
115
+
22
116
  # Create List
23
117
  # Create a new list.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m`<br>Daily: `150/d` **Scopes:** `lists:write`
24
118
  # @param list_create_query [ListCreateQuery]
@@ -70,7 +164,7 @@ module KlaviyoAPI
70
164
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
71
165
 
72
166
  # auth_names
73
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
167
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
74
168
 
75
169
  new_options = opts.merge(
76
170
  :operation => :"ListsApi.create_list",
@@ -89,40 +183,31 @@ module KlaviyoAPI
89
183
  return data, status_code, headers
90
184
  end
91
185
 
92
- # Add Profile To List
93
- # Add a profile to a list with the given list ID. It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you're trying to give a profile [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) to receive email marketing, SMS marketing, or both. This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
94
- # @param id [String]
95
- # @param list_members_add_query [ListMembersAddQuery]
186
+ # Delete List
187
+ # Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write`
188
+ # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
96
189
  # @param [Hash] opts the optional parameters
97
190
  # @return [nil]
98
- def create_list_relationships(id, list_members_add_query, opts = {})
99
- create_list_relationships_with_http_info(id, list_members_add_query, opts)
191
+ def delete_list(id, opts = {})
192
+ delete_list_with_http_info(id, opts)
100
193
  nil
101
194
  end
102
195
 
103
- # alias of `create_list_relationships`
104
- alias create_list_relationships_profile create_list_relationships
105
-
106
- # Add Profile To List
107
- # Add a profile to a list with the given list ID. It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you&#39;re trying to give a profile [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) to receive email marketing, SMS marketing, or both. This endpoint accepts a maximum of 1000 profiles per call.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60; &#x60;profiles:write&#x60;
108
- # @param id [String]
109
- # @param list_members_add_query [ListMembersAddQuery]
196
+ # Delete List
197
+ # Delete a list with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60;
198
+ # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
110
199
  # @param [Hash] opts the optional parameters
111
200
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
112
- def create_list_relationships_with_http_info(id, list_members_add_query, opts = {})
201
+ def delete_list_with_http_info(id, opts = {})
113
202
  if @api_client.config.debugging
114
- @api_client.config.logger.debug 'Calling API: ListsApi.create_list_relationships ...'
203
+ @api_client.config.logger.debug 'Calling API: ListsApi.delete_list ...'
115
204
  end
116
205
  # verify the required parameter 'id' is set
117
206
  if @api_client.config.client_side_validation && id.nil?
118
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.create_list_relationships"
119
- end
120
- # verify the required parameter 'list_members_add_query' is set
121
- if @api_client.config.client_side_validation && list_members_add_query.nil?
122
- fail ArgumentError, "Missing the required parameter 'list_members_add_query' when calling ListsApi.create_list_relationships"
207
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.delete_list"
123
208
  end
124
209
  # resource path
125
- local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
210
+ local_var_path = '/api/lists/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
126
211
 
127
212
  # query parameters
128
213
  query_params = opts[:query_params] || {}
@@ -133,26 +218,21 @@ module KlaviyoAPI
133
218
  header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
134
219
  # HTTP header 'Accept' (if needed)
135
220
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
136
- # HTTP header 'Content-Type'
137
- content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
138
- if !content_type.nil?
139
- header_params['Content-Type'] = content_type
140
- end
141
221
 
142
222
  # form parameters
143
223
  form_params = opts[:form_params] || {}
144
224
 
145
225
  # http body (model)
146
- post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_add_query)
226
+ post_body = opts[:debug_body]
147
227
 
148
228
  # return_type
149
229
  return_type = opts[:debug_return_type]
150
230
 
151
231
  # auth_names
152
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
232
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
153
233
 
154
234
  new_options = opts.merge(
155
- :operation => :"ListsApi.create_list_relationships",
235
+ :operation => :"ListsApi.delete_list",
156
236
  :header_params => header_params,
157
237
  :query_params => query_params,
158
238
  :form_params => form_params,
@@ -161,44 +241,54 @@ module KlaviyoAPI
161
241
  :return_type => return_type
162
242
  )
163
243
 
164
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
244
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
165
245
  if @api_client.config.debugging
166
- @api_client.config.logger.debug "API called: ListsApi#create_list_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
246
+ @api_client.config.logger.debug "API called: ListsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
247
  end
168
248
  return data, status_code, headers
169
249
  end
170
250
 
171
- # alias of `create_list_relationships_with_http_info`
172
- alias create_list_relationships_profile_with_http_info create_list_relationships_with_http_info
173
-
174
- # Delete List
175
- # Delete a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write`
251
+ # Get Flows Triggered by List
252
+ # Get all flows where the given list ID is being used as the trigger.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `lists:read`
176
253
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
177
254
  # @param [Hash] opts the optional parameters
178
- # @return [nil]
179
- def delete_list(id, opts = {})
180
- delete_list_with_http_info(id, opts)
181
- nil
255
+ # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
256
+ # @return [Hash<String, Object>]
257
+ def get_flows_triggered_by_list(id, opts = {})
258
+ data, _status_code, _headers = get_flows_triggered_by_list_with_http_info(id, opts)
259
+ data
182
260
  end
183
261
 
184
- # Delete List
185
- # Delete a list with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60;
262
+ # alias of `get_flows_triggered_by_list`
263
+ alias get_flow_triggers_for_list get_flows_triggered_by_list
264
+
265
+ # alias of `get_flows_triggered_by_list`
266
+ alias get_list_flow_triggers get_flows_triggered_by_list
267
+
268
+ # Get Flows Triggered by List
269
+ # Get all flows where the given list ID is being used as the trigger.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;lists:read&#x60;
186
270
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
187
271
  # @param [Hash] opts the optional parameters
188
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
189
- def delete_list_with_http_info(id, opts = {})
272
+ # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
273
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
274
+ def get_flows_triggered_by_list_with_http_info(id, opts = {})
190
275
  if @api_client.config.debugging
191
- @api_client.config.logger.debug 'Calling API: ListsApi.delete_list ...'
276
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_flows_triggered_by_list ...'
192
277
  end
193
278
  # verify the required parameter 'id' is set
194
279
  if @api_client.config.client_side_validation && id.nil?
195
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.delete_list"
280
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_flows_triggered_by_list"
281
+ end
282
+ allowable_values = ["name", "status", "archived", "created", "updated", "trigger_type"]
283
+ if @api_client.config.client_side_validation && opts[:'fields_flow'] && !opts[:'fields_flow'].all? { |item| allowable_values.include?(item) }
284
+ fail ArgumentError, "invalid value for \"fields_flow\", must include one of #{allowable_values}"
196
285
  end
197
286
  # resource path
198
- local_var_path = '/api/lists/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
287
+ local_var_path = '/api/lists/{id}/flow-triggers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
199
288
 
200
289
  # query parameters
201
290
  query_params = opts[:query_params] || {}
291
+ query_params[:'fields[flow]'] = @api_client.build_collection_param(opts[:'fields_flow'], :csv) if !opts[:'fields_flow'].nil?
202
292
 
203
293
  # header parameters
204
294
  header_params = opts[:header_params] || {}
@@ -214,13 +304,13 @@ module KlaviyoAPI
214
304
  post_body = opts[:debug_body]
215
305
 
216
306
  # return_type
217
- return_type = opts[:debug_return_type]
307
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
218
308
 
219
309
  # auth_names
220
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
310
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
221
311
 
222
312
  new_options = opts.merge(
223
- :operation => :"ListsApi.delete_list",
313
+ :operation => :"ListsApi.get_flows_triggered_by_list",
224
314
  :header_params => header_params,
225
315
  :query_params => query_params,
226
316
  :form_params => form_params,
@@ -229,47 +319,50 @@ module KlaviyoAPI
229
319
  :return_type => return_type
230
320
  )
231
321
 
232
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
322
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
233
323
  if @api_client.config.debugging
234
- @api_client.config.logger.debug "API called: ListsApi#delete_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
+ @api_client.config.logger.debug "API called: ListsApi#get_flows_triggered_by_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
325
  end
236
326
  return data, status_code, headers
237
327
  end
238
328
 
239
- # Remove Profile From List
240
- # Remove a profile from a list with the given list ID. The provided profile will no longer receive marketing from this particular list once removed. Removing a profile from a list will not impact the profile's [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) status or subscription status in general. To update a profile's subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles). This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
241
- # @param id [String]
242
- # @param list_members_delete_query [ListMembersDeleteQuery]
329
+ # alias of `get_flows_triggered_by_list_with_http_info`
330
+ alias get_flow_triggers_for_list_with_http_info get_flows_triggered_by_list_with_http_info
331
+
332
+ # alias of `get_flows_triggered_by_list_with_http_info`
333
+ alias get_list_flow_triggers_with_http_info get_flows_triggered_by_list_with_http_info
334
+
335
+ # Get IDs for Flows Triggered by List
336
+ # Get the IDs of all flows where the given list is being used as the trigger.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `lists:read`
337
+ # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
243
338
  # @param [Hash] opts the optional parameters
244
- # @return [nil]
245
- def delete_list_relationships(id, list_members_delete_query, opts = {})
246
- delete_list_relationships_with_http_info(id, list_members_delete_query, opts)
247
- nil
339
+ # @return [Hash<String, Object>]
340
+ def get_ids_for_flows_triggered_by_list(id, opts = {})
341
+ data, _status_code, _headers = get_ids_for_flows_triggered_by_list_with_http_info(id, opts)
342
+ data
248
343
  end
249
344
 
250
- # alias of `delete_list_relationships`
251
- alias delete_list_relationships_profiles delete_list_relationships
345
+ # alias of `get_ids_for_flows_triggered_by_list`
346
+ alias get_flow_trigger_ids_for_list get_ids_for_flows_triggered_by_list
252
347
 
253
- # Remove Profile From List
254
- # Remove a profile from a list with the given list ID. The provided profile will no longer receive marketing from this particular list once removed. Removing a profile from a list will not impact the profile&#39;s [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) status or subscription status in general. To update a profile&#39;s subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles). This endpoint accepts a maximum of 1000 profiles per call.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60; &#x60;profiles:write&#x60;
255
- # @param id [String]
256
- # @param list_members_delete_query [ListMembersDeleteQuery]
348
+ # alias of `get_ids_for_flows_triggered_by_list`
349
+ alias get_list_relationships_flow_triggers get_ids_for_flows_triggered_by_list
350
+
351
+ # Get IDs for Flows Triggered by List
352
+ # Get the IDs of all flows where the given list is being used as the trigger.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;lists:read&#x60;
353
+ # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
257
354
  # @param [Hash] opts the optional parameters
258
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
259
- def delete_list_relationships_with_http_info(id, list_members_delete_query, opts = {})
355
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
356
+ def get_ids_for_flows_triggered_by_list_with_http_info(id, opts = {})
260
357
  if @api_client.config.debugging
261
- @api_client.config.logger.debug 'Calling API: ListsApi.delete_list_relationships ...'
358
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_ids_for_flows_triggered_by_list ...'
262
359
  end
263
360
  # verify the required parameter 'id' is set
264
361
  if @api_client.config.client_side_validation && id.nil?
265
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.delete_list_relationships"
266
- end
267
- # verify the required parameter 'list_members_delete_query' is set
268
- if @api_client.config.client_side_validation && list_members_delete_query.nil?
269
- fail ArgumentError, "Missing the required parameter 'list_members_delete_query' when calling ListsApi.delete_list_relationships"
362
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_ids_for_flows_triggered_by_list"
270
363
  end
271
364
  # resource path
272
- local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
365
+ local_var_path = '/api/lists/{id}/relationships/flow-triggers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
273
366
 
274
367
  # query parameters
275
368
  query_params = opts[:query_params] || {}
@@ -280,26 +373,21 @@ module KlaviyoAPI
280
373
  header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
281
374
  # HTTP header 'Accept' (if needed)
282
375
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
283
- # HTTP header 'Content-Type'
284
- content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
285
- if !content_type.nil?
286
- header_params['Content-Type'] = content_type
287
- end
288
376
 
289
377
  # form parameters
290
378
  form_params = opts[:form_params] || {}
291
379
 
292
380
  # http body (model)
293
- post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_delete_query)
381
+ post_body = opts[:debug_body]
294
382
 
295
383
  # return_type
296
- return_type = opts[:debug_return_type]
384
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
297
385
 
298
386
  # auth_names
299
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
387
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
300
388
 
301
389
  new_options = opts.merge(
302
- :operation => :"ListsApi.delete_list_relationships",
390
+ :operation => :"ListsApi.get_ids_for_flows_triggered_by_list",
303
391
  :header_params => header_params,
304
392
  :query_params => query_params,
305
393
  :form_params => form_params,
@@ -308,15 +396,18 @@ module KlaviyoAPI
308
396
  :return_type => return_type
309
397
  )
310
398
 
311
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
312
400
  if @api_client.config.debugging
313
- @api_client.config.logger.debug "API called: ListsApi#delete_list_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
401
+ @api_client.config.logger.debug "API called: ListsApi#get_ids_for_flows_triggered_by_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
402
  end
315
403
  return data, status_code, headers
316
404
  end
317
405
 
318
- # alias of `delete_list_relationships_with_http_info`
319
- alias delete_list_relationships_profiles_with_http_info delete_list_relationships_with_http_info
406
+ # alias of `get_ids_for_flows_triggered_by_list_with_http_info`
407
+ alias get_flow_trigger_ids_for_list_with_http_info get_ids_for_flows_triggered_by_list_with_http_info
408
+
409
+ # alias of `get_ids_for_flows_triggered_by_list_with_http_info`
410
+ alias get_list_relationships_flow_triggers_with_http_info get_ids_for_flows_triggered_by_list_with_http_info
320
411
 
321
412
  # Get List
322
413
  # Get a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`<br><br>Rate limits when using the `additional-fields[list]=profile_count` parameter in your API request:<br>Burst: `1/s`<br>Steady: `15/m`<br><br>To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2024-10-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read`
@@ -399,7 +490,7 @@ module KlaviyoAPI
399
490
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
400
491
 
401
492
  # auth_names
402
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
493
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
403
494
 
404
495
  new_options = opts.merge(
405
496
  :operation => :"ListsApi.get_list",
@@ -418,41 +509,69 @@ module KlaviyoAPI
418
509
  return data, status_code, headers
419
510
  end
420
511
 
421
- # Get List Flow Triggers
422
- # Get all flows where the given lsit ID is being used as the trigger.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `lists:read`
423
- # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
512
+ # Get Lists
513
+ # Get all lists in an account. Filter to request a subset of all lists. Lists can be filtered by `id`, `name`, `created`, and `updated` fields. Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `lists:read`
424
514
  # @param [Hash] opts the optional parameters
425
515
  # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
516
+ # @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
517
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
518
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-than&#x60;
519
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
520
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
521
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
426
522
  # @return [Hash<String, Object>]
427
- def get_list_flow_triggers(id, opts = {})
428
- data, _status_code, _headers = get_list_flow_triggers_with_http_info(id, opts)
523
+ def get_lists(opts = {})
524
+ data, _status_code, _headers = get_lists_with_http_info(opts)
429
525
  data
430
526
  end
431
527
 
432
- # Get List Flow Triggers
433
- # Get all flows where the given lsit ID is being used as the trigger.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;lists:read&#x60;
434
- # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
528
+ # Get Lists
529
+ # Get all lists in an account. Filter to request a subset of all lists. Lists can be filtered by &#x60;id&#x60;, &#x60;name&#x60;, &#x60;created&#x60;, and &#x60;updated&#x60; fields. Returns a maximum of 10 results per page.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;lists:read&#x60;
435
530
  # @param [Hash] opts the optional parameters
436
531
  # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
532
+ # @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
533
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
534
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-than&#x60;
535
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
536
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
537
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
437
538
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
438
- def get_list_flow_triggers_with_http_info(id, opts = {})
539
+ def get_lists_with_http_info(opts = {})
439
540
  if @api_client.config.debugging
440
- @api_client.config.logger.debug 'Calling API: ListsApi.get_list_flow_triggers ...'
441
- end
442
- # verify the required parameter 'id' is set
443
- if @api_client.config.client_side_validation && id.nil?
444
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list_flow_triggers"
541
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_lists ...'
445
542
  end
446
543
  allowable_values = ["name", "status", "archived", "created", "updated", "trigger_type"]
447
544
  if @api_client.config.client_side_validation && opts[:'fields_flow'] && !opts[:'fields_flow'].all? { |item| allowable_values.include?(item) }
448
545
  fail ArgumentError, "invalid value for \"fields_flow\", must include one of #{allowable_values}"
449
546
  end
547
+ allowable_values = ["name", "created", "updated", "opt_in_process"]
548
+ if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
549
+ fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
550
+ end
551
+ allowable_values = ["name"]
552
+ if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
553
+ fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
554
+ end
555
+ allowable_values = ["flow-triggers", "tags"]
556
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
557
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
558
+ end
559
+ allowable_values = ["created", "-created", "id", "-id", "name", "-name", "updated", "-updated"]
560
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
561
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
562
+ end
450
563
  # resource path
451
- local_var_path = '/api/lists/{id}/flow-triggers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
564
+ local_var_path = '/api/lists'
452
565
 
453
566
  # query parameters
454
567
  query_params = opts[:query_params] || {}
455
568
  query_params[:'fields[flow]'] = @api_client.build_collection_param(opts[:'fields_flow'], :csv) if !opts[:'fields_flow'].nil?
569
+ query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
570
+ query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
571
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
572
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
573
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
574
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
456
575
 
457
576
  # header parameters
458
577
  header_params = opts[:header_params] || {}
@@ -471,10 +590,10 @@ module KlaviyoAPI
471
590
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
472
591
 
473
592
  # auth_names
474
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
593
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
475
594
 
476
595
  new_options = opts.merge(
477
- :operation => :"ListsApi.get_list_flow_triggers",
596
+ :operation => :"ListsApi.get_lists",
478
597
  :header_params => header_params,
479
598
  :query_params => query_params,
480
599
  :form_params => form_params,
@@ -485,60 +604,51 @@ module KlaviyoAPI
485
604
 
486
605
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
487
606
  if @api_client.config.debugging
488
- @api_client.config.logger.debug "API called: ListsApi#get_list_flow_triggers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
607
+ @api_client.config.logger.debug "API called: ListsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
489
608
  end
490
609
  return data, status_code, headers
491
610
  end
492
611
 
493
- # Get List Profiles
494
- # Get all profiles within a list with the given list ID. Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, `push_token`, and `joined_group_at` fields. Profiles can be sorted by the following fields, in ascending and descending order: `joined_group_at`<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`<br><br>Rate limits when using the `additional-fields[profile]=predictive_analytics` parameter in your API request:<br>Burst: `10/s`<br>Steady: `150/m`<br><br>To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2024-10-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read` `profiles:read`
612
+ # Get Profile IDs for List
613
+ # Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `lists:read` `profiles:read`
495
614
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
496
615
  # @param [Hash] opts the optional parameters
497
- # @option opts [Array<String>] :additional_fields_profile Request additional fields not included by default in the response. Supported values: &#39;subscriptions&#39;, &#39;predictive_analytics&#39;
498
- # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
499
616
  # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
500
617
  # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
501
- # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
618
+ # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 1000. (default to 20)
502
619
  # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
503
620
  # @return [Hash<String, Object>]
504
- def get_list_profiles(id, opts = {})
505
- data, _status_code, _headers = get_list_profiles_with_http_info(id, opts)
621
+ def get_profile_ids_for_list(id, opts = {})
622
+ data, _status_code, _headers = get_profile_ids_for_list_with_http_info(id, opts)
506
623
  data
507
624
  end
508
625
 
509
- # Get List Profiles
510
- # Get all profiles within a list with the given list ID. Filter to request a subset of all profiles. Profiles can be filtered by &#x60;email&#x60;, &#x60;phone_number&#x60;, &#x60;push_token&#x60;, and &#x60;joined_group_at&#x60; fields. Profiles can be sorted by the following fields, in ascending and descending order: &#x60;joined_group_at&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60;&lt;br&gt;&lt;br&gt;Rate limits when using the &#x60;additional-fields[profile]&#x3D;predictive_analytics&#x60; parameter in your API request:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60;&lt;br&gt;&lt;br&gt;To learn more about how the &#x60;additional-fields&#x60; parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2024-10-15/docs/rate_limits_and_error_handling) guide. **Scopes:** &#x60;lists:read&#x60; &#x60;profiles:read&#x60;
626
+ # alias of `get_profile_ids_for_list`
627
+ alias get_list_relationships_profiles get_profile_ids_for_list
628
+
629
+ # Get Profile IDs for List
630
+ # Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;profiles:read&#x60;
511
631
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
512
632
  # @param [Hash] opts the optional parameters
513
- # @option opts [Array<String>] :additional_fields_profile Request additional fields not included by default in the response. Supported values: &#39;subscriptions&#39;, &#39;predictive_analytics&#39;
514
- # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
515
633
  # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
516
634
  # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
517
- # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
635
+ # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 1000. (default to 20)
518
636
  # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
519
637
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
520
- def get_list_profiles_with_http_info(id, opts = {})
638
+ def get_profile_ids_for_list_with_http_info(id, opts = {})
521
639
  if @api_client.config.debugging
522
- @api_client.config.logger.debug 'Calling API: ListsApi.get_list_profiles ...'
640
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_profile_ids_for_list ...'
523
641
  end
524
642
  # verify the required parameter 'id' is set
525
643
  if @api_client.config.client_side_validation && id.nil?
526
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list_profiles"
527
- end
528
- allowable_values = ["subscriptions", "predictive_analytics"]
529
- if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) }
530
- fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}"
531
- end
532
- allowable_values = ["email", "phone_number", "external_id", "first_name", "last_name", "organization", "locale", "title", "image", "created", "updated", "last_event_date", "location", "location.address1", "location.address2", "location.city", "location.country", "location.latitude", "location.longitude", "location.region", "location.zip", "location.timezone", "location.ip", "properties", "joined_group_at", "subscriptions", "subscriptions.email", "subscriptions.email.marketing", "subscriptions.email.marketing.can_receive_email_marketing", "subscriptions.email.marketing.consent", "subscriptions.email.marketing.consent_timestamp", "subscriptions.email.marketing.last_updated", "subscriptions.email.marketing.method", "subscriptions.email.marketing.method_detail", "subscriptions.email.marketing.custom_method_detail", "subscriptions.email.marketing.double_optin", "subscriptions.email.marketing.suppression", "subscriptions.email.marketing.list_suppressions", "subscriptions.sms", "subscriptions.sms.marketing", "subscriptions.sms.marketing.can_receive_sms_marketing", "subscriptions.sms.marketing.consent", "subscriptions.sms.marketing.consent_timestamp", "subscriptions.sms.marketing.method", "subscriptions.sms.marketing.method_detail", "subscriptions.sms.marketing.last_updated", "subscriptions.sms.transactional", "subscriptions.sms.transactional.can_receive_sms_transactional", "subscriptions.sms.transactional.consent", "subscriptions.sms.transactional.consent_timestamp", "subscriptions.sms.transactional.method", "subscriptions.sms.transactional.method_detail", "subscriptions.sms.transactional.last_updated", "subscriptions.mobile_push", "subscriptions.mobile_push.marketing", "subscriptions.mobile_push.marketing.can_receive_push_marketing", "subscriptions.mobile_push.marketing.consent", "subscriptions.mobile_push.marketing.consent_timestamp", "predictive_analytics", "predictive_analytics.historic_clv", "predictive_analytics.predicted_clv", "predictive_analytics.total_clv", "predictive_analytics.historic_number_of_orders", "predictive_analytics.predicted_number_of_orders", "predictive_analytics.average_days_between_orders", "predictive_analytics.average_order_value", "predictive_analytics.churn_probability", "predictive_analytics.expected_date_of_next_order"]
533
- if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) }
534
- fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}"
644
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_profile_ids_for_list"
535
645
  end
536
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
537
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_list_profiles, must be smaller than or equal to 100.'
646
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
647
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profile_ids_for_list, must be smaller than or equal to 1000.'
538
648
  end
539
649
 
540
650
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
541
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_list_profiles, must be greater than or equal to 1.'
651
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profile_ids_for_list, must be greater than or equal to 1.'
542
652
  end
543
653
 
544
654
  allowable_values = ["joined_group_at", "-joined_group_at"]
@@ -546,12 +656,10 @@ module KlaviyoAPI
546
656
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
547
657
  end
548
658
  # resource path
549
- local_var_path = '/api/lists/{id}/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
659
+ local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
550
660
 
551
661
  # query parameters
552
662
  query_params = opts[:query_params] || {}
553
- query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil?
554
- query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil?
555
663
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
556
664
  query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
557
665
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
@@ -574,10 +682,10 @@ module KlaviyoAPI
574
682
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
575
683
 
576
684
  # auth_names
577
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
685
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
578
686
 
579
687
  new_options = opts.merge(
580
- :operation => :"ListsApi.get_list_profiles",
688
+ :operation => :"ListsApi.get_profile_ids_for_list",
581
689
  :header_params => header_params,
582
690
  :query_params => query_params,
583
691
  :form_params => form_params,
@@ -588,111 +696,83 @@ module KlaviyoAPI
588
696
 
589
697
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
590
698
  if @api_client.config.debugging
591
- @api_client.config.logger.debug "API called: ListsApi#get_list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
699
+ @api_client.config.logger.debug "API called: ListsApi#get_profile_ids_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
592
700
  end
593
701
  return data, status_code, headers
594
702
  end
595
703
 
596
- # Get List Relationships Flow Triggers
597
- # Get all flow [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) where the given list is being used as the trigger.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `lists:read`
704
+ # alias of `get_profile_ids_for_list_with_http_info`
705
+ alias get_list_relationships_profiles_with_http_info get_profile_ids_for_list_with_http_info
706
+
707
+ # Get Profiles for List
708
+ # Get all profiles within a list with the given list ID. Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, `push_token`, and `joined_group_at` fields. Profiles can be sorted by the following fields, in ascending and descending order: `joined_group_at`<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`<br><br>Rate limits when using the `additional-fields[profile]=predictive_analytics` parameter in your API request:<br>Burst: `10/s`<br>Steady: `150/m`<br><br>To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2024-10-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read` `profiles:read`
598
709
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
599
710
  # @param [Hash] opts the optional parameters
711
+ # @option opts [Array<String>] :additional_fields_profile Request additional fields not included by default in the response. Supported values: &#39;subscriptions&#39;, &#39;predictive_analytics&#39;
712
+ # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
713
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
714
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
715
+ # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
716
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
600
717
  # @return [Hash<String, Object>]
601
- def get_list_relationships_flow_triggers(id, opts = {})
602
- data, _status_code, _headers = get_list_relationships_flow_triggers_with_http_info(id, opts)
718
+ def get_profiles_for_list(id, opts = {})
719
+ data, _status_code, _headers = get_profiles_for_list_with_http_info(id, opts)
603
720
  data
604
721
  end
605
722
 
606
- # Get List Relationships Flow Triggers
607
- # Get all flow [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) where the given list is being used as the trigger.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;lists:read&#x60;
723
+ # alias of `get_profiles_for_list`
724
+ alias get_list_profiles get_profiles_for_list
725
+
726
+ # Get Profiles for List
727
+ # Get all profiles within a list with the given list ID. Filter to request a subset of all profiles. Profiles can be filtered by &#x60;email&#x60;, &#x60;phone_number&#x60;, &#x60;push_token&#x60;, and &#x60;joined_group_at&#x60; fields. Profiles can be sorted by the following fields, in ascending and descending order: &#x60;joined_group_at&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60;&lt;br&gt;&lt;br&gt;Rate limits when using the &#x60;additional-fields[profile]&#x3D;predictive_analytics&#x60; parameter in your API request:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60;&lt;br&gt;&lt;br&gt;To learn more about how the &#x60;additional-fields&#x60; parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2024-10-15/docs/rate_limits_and_error_handling) guide. **Scopes:** &#x60;lists:read&#x60; &#x60;profiles:read&#x60;
608
728
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
609
729
  # @param [Hash] opts the optional parameters
730
+ # @option opts [Array<String>] :additional_fields_profile Request additional fields not included by default in the response. Supported values: &#39;subscriptions&#39;, &#39;predictive_analytics&#39;
731
+ # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
732
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
733
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
734
+ # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 100. (default to 20)
735
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
610
736
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
611
- def get_list_relationships_flow_triggers_with_http_info(id, opts = {})
737
+ def get_profiles_for_list_with_http_info(id, opts = {})
612
738
  if @api_client.config.debugging
613
- @api_client.config.logger.debug 'Calling API: ListsApi.get_list_relationships_flow_triggers ...'
739
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_profiles_for_list ...'
614
740
  end
615
741
  # verify the required parameter 'id' is set
616
742
  if @api_client.config.client_side_validation && id.nil?
617
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list_relationships_flow_triggers"
743
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_profiles_for_list"
618
744
  end
619
- # resource path
620
- local_var_path = '/api/lists/{id}/relationships/flow-triggers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
621
-
622
- # query parameters
623
- query_params = opts[:query_params] || {}
624
-
625
- # header parameters
626
- header_params = opts[:header_params] || {}
627
- # klaviyo api revision
628
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
629
- # HTTP header 'Accept' (if needed)
630
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
631
-
632
- # form parameters
633
- form_params = opts[:form_params] || {}
634
-
635
- # http body (model)
636
- post_body = opts[:debug_body]
637
-
638
- # return_type
639
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
640
-
641
- # auth_names
642
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
643
-
644
- new_options = opts.merge(
645
- :operation => :"ListsApi.get_list_relationships_flow_triggers",
646
- :header_params => header_params,
647
- :query_params => query_params,
648
- :form_params => form_params,
649
- :body => post_body,
650
- :auth_names => auth_names,
651
- :return_type => return_type
652
- )
653
-
654
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
655
- if @api_client.config.debugging
656
- @api_client.config.logger.debug "API called: ListsApi#get_list_relationships_flow_triggers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
745
+ allowable_values = ["subscriptions", "predictive_analytics"]
746
+ if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) }
747
+ fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}"
657
748
  end
658
- return data, status_code, headers
659
- end
660
-
661
- # Get List Tags
662
- # Return all tags associated with the given list ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `lists:read` `tags:read`
663
- # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
664
- # @param [Hash] opts the optional parameters
665
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
666
- # @return [Hash<String, Object>]
667
- def get_list_tags(id, opts = {})
668
- data, _status_code, _headers = get_list_tags_with_http_info(id, opts)
669
- data
670
- end
671
-
672
- # Get List Tags
673
- # Return all tags associated with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;tags:read&#x60;
674
- # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
675
- # @param [Hash] opts the optional parameters
676
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
677
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
678
- def get_list_tags_with_http_info(id, opts = {})
679
- if @api_client.config.debugging
680
- @api_client.config.logger.debug 'Calling API: ListsApi.get_list_tags ...'
749
+ allowable_values = ["email", "phone_number", "external_id", "first_name", "last_name", "organization", "locale", "title", "image", "created", "updated", "last_event_date", "location", "location.address1", "location.address2", "location.city", "location.country", "location.latitude", "location.longitude", "location.region", "location.zip", "location.timezone", "location.ip", "properties", "joined_group_at", "subscriptions", "subscriptions.email", "subscriptions.email.marketing", "subscriptions.email.marketing.can_receive_email_marketing", "subscriptions.email.marketing.consent", "subscriptions.email.marketing.consent_timestamp", "subscriptions.email.marketing.last_updated", "subscriptions.email.marketing.method", "subscriptions.email.marketing.method_detail", "subscriptions.email.marketing.custom_method_detail", "subscriptions.email.marketing.double_optin", "subscriptions.email.marketing.suppression", "subscriptions.email.marketing.list_suppressions", "subscriptions.sms", "subscriptions.sms.marketing", "subscriptions.sms.marketing.can_receive_sms_marketing", "subscriptions.sms.marketing.consent", "subscriptions.sms.marketing.consent_timestamp", "subscriptions.sms.marketing.method", "subscriptions.sms.marketing.method_detail", "subscriptions.sms.marketing.last_updated", "subscriptions.sms.transactional", "subscriptions.sms.transactional.can_receive_sms_transactional", "subscriptions.sms.transactional.consent", "subscriptions.sms.transactional.consent_timestamp", "subscriptions.sms.transactional.method", "subscriptions.sms.transactional.method_detail", "subscriptions.sms.transactional.last_updated", "subscriptions.mobile_push", "subscriptions.mobile_push.marketing", "subscriptions.mobile_push.marketing.can_receive_push_marketing", "subscriptions.mobile_push.marketing.consent", "subscriptions.mobile_push.marketing.consent_timestamp", "predictive_analytics", "predictive_analytics.historic_clv", "predictive_analytics.predicted_clv", "predictive_analytics.total_clv", "predictive_analytics.historic_number_of_orders", "predictive_analytics.predicted_number_of_orders", "predictive_analytics.average_days_between_orders", "predictive_analytics.average_order_value", "predictive_analytics.churn_probability", "predictive_analytics.expected_date_of_next_order"]
750
+ if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) }
751
+ fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}"
681
752
  end
682
- # verify the required parameter 'id' is set
683
- if @api_client.config.client_side_validation && id.nil?
684
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_list_tags"
753
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
754
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profiles_for_list, must be smaller than or equal to 100.'
685
755
  end
686
- allowable_values = ["name"]
687
- if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
688
- fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
756
+
757
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
758
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profiles_for_list, must be greater than or equal to 1.'
759
+ end
760
+
761
+ allowable_values = ["joined_group_at", "-joined_group_at"]
762
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
763
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
689
764
  end
690
765
  # resource path
691
- local_var_path = '/api/lists/{id}/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
766
+ local_var_path = '/api/lists/{id}/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
692
767
 
693
768
  # query parameters
694
769
  query_params = opts[:query_params] || {}
695
- query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
770
+ query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil?
771
+ query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil?
772
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
773
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
774
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
775
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
696
776
 
697
777
  # header parameters
698
778
  header_params = opts[:header_params] || {}
@@ -711,10 +791,10 @@ module KlaviyoAPI
711
791
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
712
792
 
713
793
  # auth_names
714
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
794
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
715
795
 
716
796
  new_options = opts.merge(
717
- :operation => :"ListsApi.get_list_tags",
797
+ :operation => :"ListsApi.get_profiles_for_list",
718
798
  :header_params => header_params,
719
799
  :query_params => query_params,
720
800
  :form_params => form_params,
@@ -725,74 +805,45 @@ module KlaviyoAPI
725
805
 
726
806
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
727
807
  if @api_client.config.debugging
728
- @api_client.config.logger.debug "API called: ListsApi#get_list_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
808
+ @api_client.config.logger.debug "API called: ListsApi#get_profiles_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
729
809
  end
730
810
  return data, status_code, headers
731
811
  end
732
812
 
733
- # Get Lists
734
- # Get all lists in an account. Filter to request a subset of all lists. Lists can be filtered by `id`, `name`, `created`, and `updated` fields. Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `lists:read`
813
+ # alias of `get_profiles_for_list_with_http_info`
814
+ alias get_list_profiles_with_http_info get_profiles_for_list_with_http_info
815
+
816
+ # Get Tag IDs for List
817
+ # Returns the tag IDs of all tags associated with the given list.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `lists:read` `tags:read`
818
+ # @param id [String]
735
819
  # @param [Hash] opts the optional parameters
736
- # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
737
- # @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
738
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
739
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-than&#x60;
740
- # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
741
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
742
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
743
820
  # @return [Hash<String, Object>]
744
- def get_lists(opts = {})
745
- data, _status_code, _headers = get_lists_with_http_info(opts)
821
+ def get_tag_ids_for_list(id, opts = {})
822
+ data, _status_code, _headers = get_tag_ids_for_list_with_http_info(id, opts)
746
823
  data
747
824
  end
748
825
 
749
- # Get Lists
750
- # Get all lists in an account. Filter to request a subset of all lists. Lists can be filtered by &#x60;id&#x60;, &#x60;name&#x60;, &#x60;created&#x60;, and &#x60;updated&#x60; fields. Returns a maximum of 10 results per page.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;lists:read&#x60;
826
+ # alias of `get_tag_ids_for_list`
827
+ alias get_list_relationships_tags get_tag_ids_for_list
828
+
829
+ # Get Tag IDs for List
830
+ # Returns the tag IDs of all tags associated with the given list.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;tags:read&#x60;
831
+ # @param id [String]
751
832
  # @param [Hash] opts the optional parameters
752
- # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
753
- # @option opts [Array<String>] :fields_list For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
754
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
755
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;name&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;id&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;created&#x60;: &#x60;greater-than&#x60;&lt;br&gt;&#x60;updated&#x60;: &#x60;greater-than&#x60;
756
- # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
757
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
758
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
759
833
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
760
- def get_lists_with_http_info(opts = {})
834
+ def get_tag_ids_for_list_with_http_info(id, opts = {})
761
835
  if @api_client.config.debugging
762
- @api_client.config.logger.debug 'Calling API: ListsApi.get_lists ...'
763
- end
764
- allowable_values = ["name", "status", "archived", "created", "updated", "trigger_type"]
765
- if @api_client.config.client_side_validation && opts[:'fields_flow'] && !opts[:'fields_flow'].all? { |item| allowable_values.include?(item) }
766
- fail ArgumentError, "invalid value for \"fields_flow\", must include one of #{allowable_values}"
767
- end
768
- allowable_values = ["name", "created", "updated", "opt_in_process"]
769
- if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) }
770
- fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}"
771
- end
772
- allowable_values = ["name"]
773
- if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
774
- fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
775
- end
776
- allowable_values = ["flow-triggers", "tags"]
777
- if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
778
- fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
836
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_tag_ids_for_list ...'
779
837
  end
780
- allowable_values = ["created", "-created", "id", "-id", "name", "-name", "updated", "-updated"]
781
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
782
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
838
+ # verify the required parameter 'id' is set
839
+ if @api_client.config.client_side_validation && id.nil?
840
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_tag_ids_for_list"
783
841
  end
784
842
  # resource path
785
- local_var_path = '/api/lists'
843
+ local_var_path = '/api/lists/{id}/relationships/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
786
844
 
787
845
  # query parameters
788
846
  query_params = opts[:query_params] || {}
789
- query_params[:'fields[flow]'] = @api_client.build_collection_param(opts[:'fields_flow'], :csv) if !opts[:'fields_flow'].nil?
790
- query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil?
791
- query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
792
- query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
793
- query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
794
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
795
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
796
847
 
797
848
  # header parameters
798
849
  header_params = opts[:header_params] || {}
@@ -811,10 +862,10 @@ module KlaviyoAPI
811
862
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
812
863
 
813
864
  # auth_names
814
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
865
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
815
866
 
816
867
  new_options = opts.merge(
817
- :operation => :"ListsApi.get_lists",
868
+ :operation => :"ListsApi.get_tag_ids_for_list",
818
869
  :header_params => header_params,
819
870
  :query_params => query_params,
820
871
  :form_params => form_params,
@@ -825,66 +876,52 @@ module KlaviyoAPI
825
876
 
826
877
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
827
878
  if @api_client.config.debugging
828
- @api_client.config.logger.debug "API called: ListsApi#get_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
879
+ @api_client.config.logger.debug "API called: ListsApi#get_tag_ids_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
829
880
  end
830
881
  return data, status_code, headers
831
882
  end
832
883
 
833
- # Get Profile IDs for List
834
- # Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `lists:read` `profiles:read`
884
+ # alias of `get_tag_ids_for_list_with_http_info`
885
+ alias get_list_relationships_tags_with_http_info get_tag_ids_for_list_with_http_info
886
+
887
+ # Get Tags for List
888
+ # Return all tags associated with the given list ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `lists:read` `tags:read`
835
889
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
836
890
  # @param [Hash] opts the optional parameters
837
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
838
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
839
- # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 1000. (default to 20)
840
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
891
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
841
892
  # @return [Hash<String, Object>]
842
- def get_profile_ids_for_list(id, opts = {})
843
- data, _status_code, _headers = get_profile_ids_for_list_with_http_info(id, opts)
893
+ def get_tags_for_list(id, opts = {})
894
+ data, _status_code, _headers = get_tags_for_list_with_http_info(id, opts)
844
895
  data
845
896
  end
846
897
 
847
- # alias of `get_profile_ids_for_list`
848
- alias get_list_relationships_profiles get_profile_ids_for_list
898
+ # alias of `get_tags_for_list`
899
+ alias get_list_tags get_tags_for_list
849
900
 
850
- # Get Profile IDs for List
851
- # Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;profiles:read&#x60;
901
+ # Get Tags for List
902
+ # Return all tags associated with the given list ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;tags:read&#x60;
852
903
  # @param id [String] Primary key that uniquely identifies this list. Generated by Klaviyo.
853
904
  # @param [Hash] opts the optional parameters
854
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;email&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;phone_number&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;push_token&#x60;: &#x60;any&#x60;, &#x60;equals&#x60;&lt;br&gt;&#x60;_kx&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;joined_group_at&#x60;: &#x60;greater-or-equal&#x60;, &#x60;greater-than&#x60;, &#x60;less-or-equal&#x60;, &#x60;less-than&#x60;
855
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
856
- # @option opts [Integer] :page_size Default: 20. Min: 1. Max: 1000. (default to 20)
857
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
905
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
858
906
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
859
- def get_profile_ids_for_list_with_http_info(id, opts = {})
907
+ def get_tags_for_list_with_http_info(id, opts = {})
860
908
  if @api_client.config.debugging
861
- @api_client.config.logger.debug 'Calling API: ListsApi.get_profile_ids_for_list ...'
909
+ @api_client.config.logger.debug 'Calling API: ListsApi.get_tags_for_list ...'
862
910
  end
863
911
  # verify the required parameter 'id' is set
864
912
  if @api_client.config.client_side_validation && id.nil?
865
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_profile_ids_for_list"
913
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_tags_for_list"
866
914
  end
867
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
868
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profile_ids_for_list, must be smaller than or equal to 1000.'
869
- end
870
-
871
- if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
872
- fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ListsApi.get_profile_ids_for_list, must be greater than or equal to 1.'
873
- end
874
-
875
- allowable_values = ["joined_group_at", "-joined_group_at"]
876
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
877
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
915
+ allowable_values = ["name"]
916
+ if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
917
+ fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
878
918
  end
879
919
  # resource path
880
- local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
920
+ local_var_path = '/api/lists/{id}/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
881
921
 
882
922
  # query parameters
883
923
  query_params = opts[:query_params] || {}
884
- query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
885
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
886
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
887
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
924
+ query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
888
925
 
889
926
  # header parameters
890
927
  header_params = opts[:header_params] || {}
@@ -903,10 +940,10 @@ module KlaviyoAPI
903
940
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
904
941
 
905
942
  # auth_names
906
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
943
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
907
944
 
908
945
  new_options = opts.merge(
909
- :operation => :"ListsApi.get_profile_ids_for_list",
946
+ :operation => :"ListsApi.get_tags_for_list",
910
947
  :header_params => header_params,
911
948
  :query_params => query_params,
912
949
  :form_params => form_params,
@@ -917,42 +954,51 @@ module KlaviyoAPI
917
954
 
918
955
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
919
956
  if @api_client.config.debugging
920
- @api_client.config.logger.debug "API called: ListsApi#get_profile_ids_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
957
+ @api_client.config.logger.debug "API called: ListsApi#get_tags_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
921
958
  end
922
959
  return data, status_code, headers
923
960
  end
924
961
 
925
- # alias of `get_profile_ids_for_list_with_http_info`
926
- alias get_list_relationships_profiles_with_http_info get_profile_ids_for_list_with_http_info
962
+ # alias of `get_tags_for_list_with_http_info`
963
+ alias get_list_tags_with_http_info get_tags_for_list_with_http_info
927
964
 
928
- # Get Tag IDs for List
929
- # Returns the tag IDs of all tags associated with the given list.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `lists:read` `tags:read`
965
+ # Remove Profiles from List
966
+ # Remove a profile from a list with the given list ID. The provided profile will no longer receive marketing from this particular list once removed. Removing a profile from a list will not impact the profile's [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) status or subscription status in general. To update a profile's subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles). This endpoint accepts a maximum of 1000 profiles per call.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
930
967
  # @param id [String]
968
+ # @param list_members_delete_query [ListMembersDeleteQuery]
931
969
  # @param [Hash] opts the optional parameters
932
- # @return [Hash<String, Object>]
933
- def get_tag_ids_for_list(id, opts = {})
934
- data, _status_code, _headers = get_tag_ids_for_list_with_http_info(id, opts)
935
- data
970
+ # @return [nil]
971
+ def remove_profiles_from_list(id, list_members_delete_query, opts = {})
972
+ remove_profiles_from_list_with_http_info(id, list_members_delete_query, opts)
973
+ nil
936
974
  end
937
975
 
938
- # alias of `get_tag_ids_for_list`
939
- alias get_list_relationships_tags get_tag_ids_for_list
976
+ # alias of `remove_profiles_from_list`
977
+ alias delete_list_relationships remove_profiles_from_list
940
978
 
941
- # Get Tag IDs for List
942
- # Returns the tag IDs of all tags associated with the given list.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;lists:read&#x60; &#x60;tags:read&#x60;
979
+ # alias of `remove_profiles_from_list`
980
+ alias delete_list_relationships_profiles remove_profiles_from_list
981
+
982
+ # Remove Profiles from List
983
+ # Remove a profile from a list with the given list ID. The provided profile will no longer receive marketing from this particular list once removed. Removing a profile from a list will not impact the profile&#39;s [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) status or subscription status in general. To update a profile&#39;s subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles). This endpoint accepts a maximum of 1000 profiles per call.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;10/s&#x60;&lt;br&gt;Steady: &#x60;150/m&#x60; **Scopes:** &#x60;lists:write&#x60; &#x60;profiles:write&#x60;
943
984
  # @param id [String]
985
+ # @param list_members_delete_query [ListMembersDeleteQuery]
944
986
  # @param [Hash] opts the optional parameters
945
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
946
- def get_tag_ids_for_list_with_http_info(id, opts = {})
987
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
988
+ def remove_profiles_from_list_with_http_info(id, list_members_delete_query, opts = {})
947
989
  if @api_client.config.debugging
948
- @api_client.config.logger.debug 'Calling API: ListsApi.get_tag_ids_for_list ...'
990
+ @api_client.config.logger.debug 'Calling API: ListsApi.remove_profiles_from_list ...'
949
991
  end
950
992
  # verify the required parameter 'id' is set
951
993
  if @api_client.config.client_side_validation && id.nil?
952
- fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.get_tag_ids_for_list"
994
+ fail ArgumentError, "Missing the required parameter 'id' when calling ListsApi.remove_profiles_from_list"
995
+ end
996
+ # verify the required parameter 'list_members_delete_query' is set
997
+ if @api_client.config.client_side_validation && list_members_delete_query.nil?
998
+ fail ArgumentError, "Missing the required parameter 'list_members_delete_query' when calling ListsApi.remove_profiles_from_list"
953
999
  end
954
1000
  # resource path
955
- local_var_path = '/api/lists/{id}/relationships/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1001
+ local_var_path = '/api/lists/{id}/relationships/profiles'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
956
1002
 
957
1003
  # query parameters
958
1004
  query_params = opts[:query_params] || {}
@@ -963,21 +1009,26 @@ module KlaviyoAPI
963
1009
  header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
964
1010
  # HTTP header 'Accept' (if needed)
965
1011
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
1012
+ # HTTP header 'Content-Type'
1013
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
1014
+ if !content_type.nil?
1015
+ header_params['Content-Type'] = content_type
1016
+ end
966
1017
 
967
1018
  # form parameters
968
1019
  form_params = opts[:form_params] || {}
969
1020
 
970
1021
  # http body (model)
971
- post_body = opts[:debug_body]
1022
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_members_delete_query)
972
1023
 
973
1024
  # return_type
974
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1025
+ return_type = opts[:debug_return_type]
975
1026
 
976
1027
  # auth_names
977
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1028
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
978
1029
 
979
1030
  new_options = opts.merge(
980
- :operation => :"ListsApi.get_tag_ids_for_list",
1031
+ :operation => :"ListsApi.remove_profiles_from_list",
981
1032
  :header_params => header_params,
982
1033
  :query_params => query_params,
983
1034
  :form_params => form_params,
@@ -986,15 +1037,18 @@ module KlaviyoAPI
986
1037
  :return_type => return_type
987
1038
  )
988
1039
 
989
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1040
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
990
1041
  if @api_client.config.debugging
991
- @api_client.config.logger.debug "API called: ListsApi#get_tag_ids_for_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1042
+ @api_client.config.logger.debug "API called: ListsApi#remove_profiles_from_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
992
1043
  end
993
1044
  return data, status_code, headers
994
1045
  end
995
1046
 
996
- # alias of `get_tag_ids_for_list_with_http_info`
997
- alias get_list_relationships_tags_with_http_info get_tag_ids_for_list_with_http_info
1047
+ # alias of `remove_profiles_from_list_with_http_info`
1048
+ alias delete_list_relationships_with_http_info remove_profiles_from_list_with_http_info
1049
+
1050
+ # alias of `remove_profiles_from_list_with_http_info`
1051
+ alias delete_list_relationships_profiles_with_http_info remove_profiles_from_list_with_http_info
998
1052
 
999
1053
  # Update List
1000
1054
  # Update the name of a list with the given list ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write`
@@ -1053,7 +1107,7 @@ module KlaviyoAPI
1053
1107
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1054
1108
 
1055
1109
  # auth_names
1056
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1110
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1057
1111
 
1058
1112
  new_options = opts.merge(
1059
1113
  :operation => :"ListsApi.update_list",