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,88 @@ module KlaviyoAPI
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Bulk Import Profiles
23
+ # Create a bulk profile import job to create or update a batch of profiles. Accepts up to 10,000 profiles per request. The maximum allowed payload size is 5MB. To learn more, see our [Bulk Profile Import API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
24
+ # @param profile_import_job_create_query [ProfileImportJobCreateQuery]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Hash<String, Object>]
27
+ def bulk_import_profiles(profile_import_job_create_query, opts = {})
28
+ data, _status_code, _headers = bulk_import_profiles_with_http_info(profile_import_job_create_query, opts)
29
+ data
30
+ end
31
+
32
+ # alias of `bulk_import_profiles`
33
+ alias spawn_bulk_profile_import_job bulk_import_profiles
34
+
35
+ # alias of `bulk_import_profiles`
36
+ alias create_profile_bulk_import_job bulk_import_profiles
37
+
38
+ # Bulk Import Profiles
39
+ # Create a bulk profile import job to create or update a batch of profiles. Accepts up to 10,000 profiles per request. The maximum allowed payload size is 5MB. To learn more, see our [Bulk Profile Import API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).&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;
40
+ # @param profile_import_job_create_query [ProfileImportJobCreateQuery]
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
43
+ def bulk_import_profiles_with_http_info(profile_import_job_create_query, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ProfilesApi.bulk_import_profiles ...'
46
+ end
47
+ # verify the required parameter 'profile_import_job_create_query' is set
48
+ if @api_client.config.client_side_validation && profile_import_job_create_query.nil?
49
+ fail ArgumentError, "Missing the required parameter 'profile_import_job_create_query' when calling ProfilesApi.bulk_import_profiles"
50
+ end
51
+ # resource path
52
+ local_var_path = '/api/profile-bulk-import-jobs'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # klaviyo api revision
60
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+
69
+ # form parameters
70
+ form_params = opts[:form_params] || {}
71
+
72
+ # http body (model)
73
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_import_job_create_query)
74
+
75
+ # return_type
76
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
77
+
78
+ # auth_names
79
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
80
+
81
+ new_options = opts.merge(
82
+ :operation => :"ProfilesApi.bulk_import_profiles",
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => return_type
89
+ )
90
+
91
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug "API called: ProfilesApi#bulk_import_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ end
95
+ return data, status_code, headers
96
+ end
97
+
98
+ # alias of `bulk_import_profiles_with_http_info`
99
+ alias spawn_bulk_profile_import_job_with_http_info bulk_import_profiles_with_http_info
100
+
101
+ # alias of `bulk_import_profiles_with_http_info`
102
+ alias create_profile_bulk_import_job_with_http_info bulk_import_profiles_with_http_info
103
+
22
104
  # Bulk Subscribe Profiles
23
105
  # Subscribe one or more profiles to email marketing, SMS marketing, or both. If the provided list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message. Learn more about [consent in this guide](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). If a list is not provided, the opt-in process used will be determined by the [account-level default opt-in setting](https://www.klaviyo.com/settings/account/api-keys). To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/reference/create_list_relationships). This API will remove any `UNSUBSCRIBE`, `SPAM_REPORT` or `USER_SUPPRESSED` suppressions from the provided profiles. Learn more about [suppressed profiles](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1). Maximum number of profiles can be submitted for subscription: 1000 This endpoint now supports a `historical_import` flag. If this flag is set `true`, profiles being subscribed will bypass double opt-in emails and be subscribed immediately. They will also bypass any associated \"Added to list\" flows. This is useful for importing historical data where you have already collected consent. If `historical_import` is set to true, the `consented_at` field is required and must be in the past.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `lists:write` `profiles:write` `subscriptions:write`
24
106
  # @param subscription_create_job_create_query [SubscriptionCreateJobCreateQuery] Subscribes one or more profiles to marketing. Currently, supports email and SMS only. All profiles will be added to the provided list. Either email or phone number is required. Both may be specified to subscribe to both channels. If a profile cannot be found matching the given identifier(s), a new profile will be created and then subscribed.
@@ -76,7 +158,7 @@ module KlaviyoAPI
76
158
  return_type = opts[:debug_return_type]
77
159
 
78
160
  # auth_names
79
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
161
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
80
162
 
81
163
  new_options = opts.merge(
82
164
  :operation => :"ProfilesApi.bulk_subscribe_profiles",
@@ -158,7 +240,7 @@ module KlaviyoAPI
158
240
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
159
241
 
160
242
  # auth_names
161
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
243
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
162
244
 
163
245
  new_options = opts.merge(
164
246
  :operation => :"ProfilesApi.bulk_suppress_profiles",
@@ -240,7 +322,7 @@ module KlaviyoAPI
240
322
  return_type = opts[:debug_return_type]
241
323
 
242
324
  # auth_names
243
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
325
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
244
326
 
245
327
  new_options = opts.merge(
246
328
  :operation => :"ProfilesApi.bulk_unsubscribe_profiles",
@@ -322,7 +404,7 @@ module KlaviyoAPI
322
404
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
323
405
 
324
406
  # auth_names
325
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
407
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
326
408
 
327
409
  new_options = opts.merge(
328
410
  :operation => :"ProfilesApi.bulk_unsuppress_profiles",
@@ -348,9 +430,10 @@ module KlaviyoAPI
348
430
  alias create_profile_suppression_bulk_delete_job_with_http_info bulk_unsuppress_profiles_with_http_info
349
431
 
350
432
  # Create or Update Profile
351
- # Given a set of profile attributes and optionally an ID, create or update a profile. Returns 201 if a new profile was created, 200 if an existing profile was updated. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
433
+ # Given a set of profile attributes and optionally an ID, create or update a profile. Returns 201 if a new profile was created, 200 if an existing profile was updated. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
352
434
  # @param profile_upsert_query [ProfileUpsertQuery]
353
435
  # @param [Hash] opts the optional parameters
436
+ # @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;
354
437
  # @return [Hash<String, Object>]
355
438
  def create_or_update_profile(profile_upsert_query, opts = {})
356
439
  data, _status_code, _headers = create_or_update_profile_with_http_info(profile_upsert_query, opts)
@@ -361,9 +444,10 @@ module KlaviyoAPI
361
444
  alias create_profile_import create_or_update_profile
362
445
 
363
446
  # Create or Update Profile
364
- # Given a set of profile attributes and optionally an ID, create or update a profile. Returns 201 if a new profile was created, 200 if an existing profile was updated. Note that setting a field to &#x60;null&#x60; will clear out the field, whereas not including a field in your request will leave it unchanged.&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;profiles:write&#x60;
447
+ # Given a set of profile attributes and optionally an ID, create or update a profile. Returns 201 if a new profile was created, 200 if an existing profile was updated. Use the &#x60;additional-fields&#x60; parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to &#x60;null&#x60; will clear out the field, whereas not including a field in your request will leave it unchanged.&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;profiles:write&#x60;
365
448
  # @param profile_upsert_query [ProfileUpsertQuery]
366
449
  # @param [Hash] opts the optional parameters
450
+ # @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;
367
451
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
368
452
  def create_or_update_profile_with_http_info(profile_upsert_query, opts = {})
369
453
  if @api_client.config.debugging
@@ -373,11 +457,16 @@ module KlaviyoAPI
373
457
  if @api_client.config.client_side_validation && profile_upsert_query.nil?
374
458
  fail ArgumentError, "Missing the required parameter 'profile_upsert_query' when calling ProfilesApi.create_or_update_profile"
375
459
  end
460
+ allowable_values = ["subscriptions", "predictive_analytics"]
461
+ if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) }
462
+ fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}"
463
+ end
376
464
  # resource path
377
465
  local_var_path = '/api/profile-import'
378
466
 
379
467
  # query parameters
380
468
  query_params = opts[:query_params] || {}
469
+ query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil?
381
470
 
382
471
  # header parameters
383
472
  header_params = opts[:header_params] || {}
@@ -401,7 +490,7 @@ module KlaviyoAPI
401
490
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
402
491
 
403
492
  # auth_names
404
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
493
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
405
494
 
406
495
  new_options = opts.merge(
407
496
  :operation => :"ProfilesApi.create_or_update_profile",
@@ -424,9 +513,10 @@ module KlaviyoAPI
424
513
  alias create_profile_import_with_http_info create_or_update_profile_with_http_info
425
514
 
426
515
  # Create Profile
427
- # Create a new profile.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
516
+ # Create a new profile. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
428
517
  # @param profile_create_query [ProfileCreateQuery]
429
518
  # @param [Hash] opts the optional parameters
519
+ # @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;
430
520
  # @return [Hash<String, Object>]
431
521
  def create_profile(profile_create_query, opts = {})
432
522
  data, _status_code, _headers = create_profile_with_http_info(profile_create_query, opts)
@@ -434,9 +524,10 @@ module KlaviyoAPI
434
524
  end
435
525
 
436
526
  # Create Profile
437
- # Create a new profile.&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;profiles:write&#x60;
527
+ # Create a new profile. Use the &#x60;additional-fields&#x60; parameter to include subscriptions and predictive analytics data in your response.&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;profiles:write&#x60;
438
528
  # @param profile_create_query [ProfileCreateQuery]
439
529
  # @param [Hash] opts the optional parameters
530
+ # @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;
440
531
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
441
532
  def create_profile_with_http_info(profile_create_query, opts = {})
442
533
  if @api_client.config.debugging
@@ -446,11 +537,16 @@ module KlaviyoAPI
446
537
  if @api_client.config.client_side_validation && profile_create_query.nil?
447
538
  fail ArgumentError, "Missing the required parameter 'profile_create_query' when calling ProfilesApi.create_profile"
448
539
  end
540
+ allowable_values = ["subscriptions", "predictive_analytics"]
541
+ if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) }
542
+ fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}"
543
+ end
449
544
  # resource path
450
545
  local_var_path = '/api/profiles'
451
546
 
452
547
  # query parameters
453
548
  query_params = opts[:query_params] || {}
549
+ query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil?
454
550
 
455
551
  # header parameters
456
552
  header_params = opts[:header_params] || {}
@@ -474,7 +570,7 @@ module KlaviyoAPI
474
570
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
475
571
 
476
572
  # auth_names
477
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
573
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
478
574
 
479
575
  new_options = opts.merge(
480
576
  :operation => :"ProfilesApi.create_profile",
@@ -544,7 +640,7 @@ module KlaviyoAPI
544
640
  return_type = opts[:debug_return_type]
545
641
 
546
642
  # auth_names
547
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
643
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
548
644
 
549
645
  new_options = opts.merge(
550
646
  :operation => :"ProfilesApi.create_push_token",
@@ -636,7 +732,7 @@ module KlaviyoAPI
636
732
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
637
733
 
638
734
  # auth_names
639
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
735
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
640
736
 
641
737
  new_options = opts.merge(
642
738
  :operation => :"ProfilesApi.get_bulk_import_profiles_job",
@@ -738,7 +834,7 @@ module KlaviyoAPI
738
834
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
739
835
 
740
836
  # auth_names
741
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
837
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
742
838
 
743
839
  new_options = opts.merge(
744
840
  :operation => :"ProfilesApi.get_bulk_import_profiles_jobs",
@@ -819,7 +915,7 @@ module KlaviyoAPI
819
915
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
820
916
 
821
917
  # auth_names
822
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
918
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
823
919
 
824
920
  new_options = opts.merge(
825
921
  :operation => :"ProfilesApi.get_bulk_suppress_profiles_job",
@@ -904,7 +1000,7 @@ module KlaviyoAPI
904
1000
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
905
1001
 
906
1002
  # auth_names
907
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1003
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
908
1004
 
909
1005
  new_options = opts.merge(
910
1006
  :operation => :"ProfilesApi.get_bulk_suppress_profiles_jobs",
@@ -982,7 +1078,7 @@ module KlaviyoAPI
982
1078
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
983
1079
 
984
1080
  # auth_names
985
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1081
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
986
1082
 
987
1083
  new_options = opts.merge(
988
1084
  :operation => :"ProfilesApi.get_bulk_unsuppress_profiles_job",
@@ -1067,7 +1163,7 @@ module KlaviyoAPI
1067
1163
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1068
1164
 
1069
1165
  # auth_names
1070
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1166
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1071
1167
 
1072
1168
  new_options = opts.merge(
1073
1169
  :operation => :"ProfilesApi.get_bulk_unsuppress_profiles_jobs",
@@ -1105,6 +1201,9 @@ module KlaviyoAPI
1105
1201
  # alias of `get_errors_for_bulk_import_profiles_job`
1106
1202
  alias get_bulk_profile_import_job_import_errors get_errors_for_bulk_import_profiles_job
1107
1203
 
1204
+ # alias of `get_errors_for_bulk_import_profiles_job`
1205
+ alias get_import_errors_for_profile_bulk_import_job get_errors_for_bulk_import_profiles_job
1206
+
1108
1207
  # alias of `get_errors_for_bulk_import_profiles_job`
1109
1208
  alias get_profile_bulk_import_job_import_errors get_errors_for_bulk_import_profiles_job
1110
1209
 
@@ -1162,7 +1261,7 @@ module KlaviyoAPI
1162
1261
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1163
1262
 
1164
1263
  # auth_names
1165
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1264
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1166
1265
 
1167
1266
  new_options = opts.merge(
1168
1267
  :operation => :"ProfilesApi.get_errors_for_bulk_import_profiles_job",
@@ -1184,6 +1283,9 @@ module KlaviyoAPI
1184
1283
  # alias of `get_errors_for_bulk_import_profiles_job_with_http_info`
1185
1284
  alias get_bulk_profile_import_job_import_errors_with_http_info get_errors_for_bulk_import_profiles_job_with_http_info
1186
1285
 
1286
+ # alias of `get_errors_for_bulk_import_profiles_job_with_http_info`
1287
+ alias get_import_errors_for_profile_bulk_import_job_with_http_info get_errors_for_bulk_import_profiles_job_with_http_info
1288
+
1187
1289
  # alias of `get_errors_for_bulk_import_profiles_job_with_http_info`
1188
1290
  alias get_profile_bulk_import_job_import_errors_with_http_info get_errors_for_bulk_import_profiles_job_with_http_info
1189
1291
 
@@ -1201,6 +1303,9 @@ module KlaviyoAPI
1201
1303
  # alias of `get_list_for_bulk_import_profiles_job`
1202
1304
  alias get_bulk_profile_import_job_lists get_list_for_bulk_import_profiles_job
1203
1305
 
1306
+ # alias of `get_list_for_bulk_import_profiles_job`
1307
+ alias get_lists_for_profile_bulk_import_job get_list_for_bulk_import_profiles_job
1308
+
1204
1309
  # alias of `get_list_for_bulk_import_profiles_job`
1205
1310
  alias get_profile_bulk_import_job_lists get_list_for_bulk_import_profiles_job
1206
1311
 
@@ -1246,7 +1351,7 @@ module KlaviyoAPI
1246
1351
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1247
1352
 
1248
1353
  # auth_names
1249
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1354
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1250
1355
 
1251
1356
  new_options = opts.merge(
1252
1357
  :operation => :"ProfilesApi.get_list_for_bulk_import_profiles_job",
@@ -1268,6 +1373,9 @@ module KlaviyoAPI
1268
1373
  # alias of `get_list_for_bulk_import_profiles_job_with_http_info`
1269
1374
  alias get_bulk_profile_import_job_lists_with_http_info get_list_for_bulk_import_profiles_job_with_http_info
1270
1375
 
1376
+ # alias of `get_list_for_bulk_import_profiles_job_with_http_info`
1377
+ alias get_lists_for_profile_bulk_import_job_with_http_info get_list_for_bulk_import_profiles_job_with_http_info
1378
+
1271
1379
  # alias of `get_list_for_bulk_import_profiles_job_with_http_info`
1272
1380
  alias get_profile_bulk_import_job_lists_with_http_info get_list_for_bulk_import_profiles_job_with_http_info
1273
1381
 
@@ -1284,6 +1392,9 @@ module KlaviyoAPI
1284
1392
  # alias of `get_list_ids_for_bulk_import_profiles_job`
1285
1393
  alias get_bulk_profile_import_job_relationships_lists get_list_ids_for_bulk_import_profiles_job
1286
1394
 
1395
+ # alias of `get_list_ids_for_bulk_import_profiles_job`
1396
+ alias get_list_ids_for_profile_bulk_import_job get_list_ids_for_bulk_import_profiles_job
1397
+
1287
1398
  # alias of `get_list_ids_for_bulk_import_profiles_job`
1288
1399
  alias get_profile_bulk_import_job_relationships_lists get_list_ids_for_bulk_import_profiles_job
1289
1400
 
@@ -1323,7 +1434,7 @@ module KlaviyoAPI
1323
1434
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1324
1435
 
1325
1436
  # auth_names
1326
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1437
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1327
1438
 
1328
1439
  new_options = opts.merge(
1329
1440
  :operation => :"ProfilesApi.get_list_ids_for_bulk_import_profiles_job",
@@ -1345,6 +1456,9 @@ module KlaviyoAPI
1345
1456
  # alias of `get_list_ids_for_bulk_import_profiles_job_with_http_info`
1346
1457
  alias get_bulk_profile_import_job_relationships_lists_with_http_info get_list_ids_for_bulk_import_profiles_job_with_http_info
1347
1458
 
1459
+ # alias of `get_list_ids_for_bulk_import_profiles_job_with_http_info`
1460
+ alias get_list_ids_for_profile_bulk_import_job_with_http_info get_list_ids_for_bulk_import_profiles_job_with_http_info
1461
+
1348
1462
  # alias of `get_list_ids_for_bulk_import_profiles_job_with_http_info`
1349
1463
  alias get_profile_bulk_import_job_relationships_lists_with_http_info get_list_ids_for_bulk_import_profiles_job_with_http_info
1350
1464
 
@@ -1397,7 +1511,7 @@ module KlaviyoAPI
1397
1511
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1398
1512
 
1399
1513
  # auth_names
1400
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1514
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1401
1515
 
1402
1516
  new_options = opts.merge(
1403
1517
  :operation => :"ProfilesApi.get_list_ids_for_profile",
@@ -1475,7 +1589,7 @@ module KlaviyoAPI
1475
1589
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1476
1590
 
1477
1591
  # auth_names
1478
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1592
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1479
1593
 
1480
1594
  new_options = opts.merge(
1481
1595
  :operation => :"ProfilesApi.get_lists_for_profile",
@@ -1498,7 +1612,7 @@ module KlaviyoAPI
1498
1612
  alias get_profile_lists_with_http_info get_lists_for_profile_with_http_info
1499
1613
 
1500
1614
  # Get Profile
1501
- # Get the profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:read`
1615
+ # Get the profile with the given profile ID. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m`<br><br>Rate limits when using the `include=list` parameter in your API request:<br>Burst: `1/s`<br>Steady: `15/m`<br><br>Rate limits when using the `include=segment` parameter in your API request:<br>Burst: `1/s`<br>Steady: `15/m`<br><br>To learn more about how the `include` 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:** `profiles:read`
1502
1616
  # @param id [String]
1503
1617
  # @param [Hash] opts the optional parameters
1504
1618
  # @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;
@@ -1513,7 +1627,7 @@ module KlaviyoAPI
1513
1627
  end
1514
1628
 
1515
1629
  # Get Profile
1516
- # Get the profile with the given profile 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;profiles:read&#x60;
1630
+ # Get the profile with the given profile ID. Use the &#x60;additional-fields&#x60; parameter to include subscriptions and predictive analytics data in your response.&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;include&#x3D;list&#x60; parameter in your API request:&lt;br&gt;Burst: &#x60;1/s&#x60;&lt;br&gt;Steady: &#x60;15/m&#x60;&lt;br&gt;&lt;br&gt;Rate limits when using the &#x60;include&#x3D;segment&#x60; parameter in your API request:&lt;br&gt;Burst: &#x60;1/s&#x60;&lt;br&gt;Steady: &#x60;15/m&#x60;&lt;br&gt;&lt;br&gt;To learn more about how the &#x60;include&#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;profiles:read&#x60;
1517
1631
  # @param id [String]
1518
1632
  # @param [Hash] opts the optional parameters
1519
1633
  # @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;
@@ -1578,7 +1692,7 @@ module KlaviyoAPI
1578
1692
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1579
1693
 
1580
1694
  # auth_names
1581
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1695
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1582
1696
 
1583
1697
  new_options = opts.merge(
1584
1698
  :operation => :"ProfilesApi.get_profile",
@@ -1615,6 +1729,9 @@ module KlaviyoAPI
1615
1729
  # alias of `get_profile_ids_for_bulk_import_profiles_job`
1616
1730
  alias get_profile_bulk_import_job_relationships_profiles get_profile_ids_for_bulk_import_profiles_job
1617
1731
 
1732
+ # alias of `get_profile_ids_for_bulk_import_profiles_job`
1733
+ alias get_profile_ids_for_profile_bulk_import_job get_profile_ids_for_bulk_import_profiles_job
1734
+
1618
1735
  # Get Profile IDs for Bulk Import Profiles Job
1619
1736
  # Get profile relationships for the bulk profile import job with the given 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;profiles:read&#x60;
1620
1737
  # @param id [String]
@@ -1663,7 +1780,7 @@ module KlaviyoAPI
1663
1780
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1664
1781
 
1665
1782
  # auth_names
1666
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1783
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1667
1784
 
1668
1785
  new_options = opts.merge(
1669
1786
  :operation => :"ProfilesApi.get_profile_ids_for_bulk_import_profiles_job",
@@ -1688,8 +1805,11 @@ module KlaviyoAPI
1688
1805
  # alias of `get_profile_ids_for_bulk_import_profiles_job_with_http_info`
1689
1806
  alias get_profile_bulk_import_job_relationships_profiles_with_http_info get_profile_ids_for_bulk_import_profiles_job_with_http_info
1690
1807
 
1808
+ # alias of `get_profile_ids_for_bulk_import_profiles_job_with_http_info`
1809
+ alias get_profile_ids_for_profile_bulk_import_job_with_http_info get_profile_ids_for_bulk_import_profiles_job_with_http_info
1810
+
1691
1811
  # Get Profiles
1692
- # Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email`, `subscriptions.email.marketing.suppression.timestamp`, `subscriptions.email.marketing.list_suppressions.timestamp`<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:** `profiles:read`
1812
+ # Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email`, `subscriptions.email.marketing.suppression.timestamp`, `subscriptions.email.marketing.list_suppressions.timestamp` Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response.<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:** `profiles:read`
1693
1813
  # @param [Hash] opts the optional parameters
1694
1814
  # @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;
1695
1815
  # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
@@ -1704,7 +1824,7 @@ module KlaviyoAPI
1704
1824
  end
1705
1825
 
1706
1826
  # Get Profiles
1707
- # Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: &#x60;id&#x60;, &#x60;created&#x60;, &#x60;updated&#x60;, &#x60;email&#x60;, &#x60;subscriptions.email.marketing.suppression.timestamp&#x60;, &#x60;subscriptions.email.marketing.list_suppressions.timestamp&#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;profiles:read&#x60;
1827
+ # Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: &#x60;id&#x60;, &#x60;created&#x60;, &#x60;updated&#x60;, &#x60;email&#x60;, &#x60;subscriptions.email.marketing.suppression.timestamp&#x60;, &#x60;subscriptions.email.marketing.list_suppressions.timestamp&#x60; Use the &#x60;additional-fields&#x60; parameter to include subscriptions and predictive analytics data in your response.&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;profiles:read&#x60;
1708
1828
  # @param [Hash] opts the optional parameters
1709
1829
  # @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;
1710
1830
  # @option opts [Array<String>] :fields_profile For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
@@ -1733,7 +1853,7 @@ module KlaviyoAPI
1733
1853
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_profiles, must be greater than or equal to 1.'
1734
1854
  end
1735
1855
 
1736
- allowable_values = ["created", "-created", "email", "-email", "id", "-id", "updated", "-updated", "subscriptions.email.marketing.list_suppressions.timestamp", "-subscriptions.email.marketing.list_suppressions.timestamp", "subscriptions.email.marketing.suppression.timestamp", "-subscriptions.email.marketing.suppression.timestamp"]
1856
+ allowable_values = ["created", "-created", "email", "-email", "id", "-id", "subscriptions.email.marketing.list_suppressions.timestamp", "-subscriptions.email.marketing.list_suppressions.timestamp", "subscriptions.email.marketing.suppression.timestamp", "-subscriptions.email.marketing.suppression.timestamp", "updated", "-updated"]
1737
1857
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1738
1858
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1739
1859
  end
@@ -1766,7 +1886,7 @@ module KlaviyoAPI
1766
1886
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1767
1887
 
1768
1888
  # auth_names
1769
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1889
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1770
1890
 
1771
1891
  new_options = opts.merge(
1772
1892
  :operation => :"ProfilesApi.get_profiles",
@@ -1805,6 +1925,9 @@ module KlaviyoAPI
1805
1925
  # alias of `get_profiles_for_bulk_import_profiles_job`
1806
1926
  alias get_profile_bulk_import_job_profiles get_profiles_for_bulk_import_profiles_job
1807
1927
 
1928
+ # alias of `get_profiles_for_bulk_import_profiles_job`
1929
+ alias get_profiles_for_profile_bulk_import_job get_profiles_for_bulk_import_profiles_job
1930
+
1808
1931
  # Get Profiles for Bulk Import Profiles Job
1809
1932
  # Get profiles for the bulk profile import job with the given 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;profiles:read&#x60;
1810
1933
  # @param id [String]
@@ -1865,7 +1988,7 @@ module KlaviyoAPI
1865
1988
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1866
1989
 
1867
1990
  # auth_names
1868
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1991
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1869
1992
 
1870
1993
  new_options = opts.merge(
1871
1994
  :operation => :"ProfilesApi.get_profiles_for_bulk_import_profiles_job",
@@ -1890,6 +2013,9 @@ module KlaviyoAPI
1890
2013
  # alias of `get_profiles_for_bulk_import_profiles_job_with_http_info`
1891
2014
  alias get_profile_bulk_import_job_profiles_with_http_info get_profiles_for_bulk_import_profiles_job_with_http_info
1892
2015
 
2016
+ # alias of `get_profiles_for_bulk_import_profiles_job_with_http_info`
2017
+ alias get_profiles_for_profile_bulk_import_job_with_http_info get_profiles_for_bulk_import_profiles_job_with_http_info
2018
+
1893
2019
  # Get Segment IDs for Profile
1894
2020
  # Get segment membership relationships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `profiles:read` `segments:read`
1895
2021
  # @param id [String]
@@ -1939,7 +2065,7 @@ module KlaviyoAPI
1939
2065
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1940
2066
 
1941
2067
  # auth_names
1942
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2068
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1943
2069
 
1944
2070
  new_options = opts.merge(
1945
2071
  :operation => :"ProfilesApi.get_segment_ids_for_profile",
@@ -2017,7 +2143,7 @@ module KlaviyoAPI
2017
2143
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2018
2144
 
2019
2145
  # auth_names
2020
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2146
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
2021
2147
 
2022
2148
  new_options = opts.merge(
2023
2149
  :operation => :"ProfilesApi.get_segments_for_profile",
@@ -2093,7 +2219,7 @@ module KlaviyoAPI
2093
2219
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2094
2220
 
2095
2221
  # auth_names
2096
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2222
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
2097
2223
 
2098
2224
  new_options = opts.merge(
2099
2225
  :operation => :"ProfilesApi.merge_profiles",
@@ -2115,93 +2241,12 @@ module KlaviyoAPI
2115
2241
  # alias of `merge_profiles_with_http_info`
2116
2242
  alias create_profile_merge_with_http_info merge_profiles_with_http_info
2117
2243
 
2118
- # Spawn Bulk Profile Import Job
2119
- # Create a bulk profile import job to create or update a batch of profiles. Accepts up to 10,000 profiles per request. The maximum allowed payload size is 5MB. To learn more, see our [Bulk Profile Import API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
2120
- # @param profile_import_job_create_query [ProfileImportJobCreateQuery]
2121
- # @param [Hash] opts the optional parameters
2122
- # @return [Hash<String, Object>]
2123
- def spawn_bulk_profile_import_job(profile_import_job_create_query, opts = {})
2124
- data, _status_code, _headers = spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts)
2125
- data
2126
- end
2127
-
2128
- # alias of `spawn_bulk_profile_import_job`
2129
- alias bulk_import_profiles spawn_bulk_profile_import_job
2130
-
2131
- # alias of `spawn_bulk_profile_import_job`
2132
- alias create_profile_bulk_import_job spawn_bulk_profile_import_job
2133
-
2134
- # Spawn Bulk Profile Import Job
2135
- # Create a bulk profile import job to create or update a batch of profiles. Accepts up to 10,000 profiles per request. The maximum allowed payload size is 5MB. To learn more, see our [Bulk Profile Import API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).&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;
2136
- # @param profile_import_job_create_query [ProfileImportJobCreateQuery]
2137
- # @param [Hash] opts the optional parameters
2138
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2139
- def spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts = {})
2140
- if @api_client.config.debugging
2141
- @api_client.config.logger.debug 'Calling API: ProfilesApi.spawn_bulk_profile_import_job ...'
2142
- end
2143
- # verify the required parameter 'profile_import_job_create_query' is set
2144
- if @api_client.config.client_side_validation && profile_import_job_create_query.nil?
2145
- fail ArgumentError, "Missing the required parameter 'profile_import_job_create_query' when calling ProfilesApi.spawn_bulk_profile_import_job"
2146
- end
2147
- # resource path
2148
- local_var_path = '/api/profile-bulk-import-jobs'
2149
-
2150
- # query parameters
2151
- query_params = opts[:query_params] || {}
2152
-
2153
- # header parameters
2154
- header_params = opts[:header_params] || {}
2155
- # klaviyo api revision
2156
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
2157
- # HTTP header 'Accept' (if needed)
2158
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
2159
- # HTTP header 'Content-Type'
2160
- content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
2161
- if !content_type.nil?
2162
- header_params['Content-Type'] = content_type
2163
- end
2164
-
2165
- # form parameters
2166
- form_params = opts[:form_params] || {}
2167
-
2168
- # http body (model)
2169
- post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_import_job_create_query)
2170
-
2171
- # return_type
2172
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2173
-
2174
- # auth_names
2175
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2176
-
2177
- new_options = opts.merge(
2178
- :operation => :"ProfilesApi.spawn_bulk_profile_import_job",
2179
- :header_params => header_params,
2180
- :query_params => query_params,
2181
- :form_params => form_params,
2182
- :body => post_body,
2183
- :auth_names => auth_names,
2184
- :return_type => return_type
2185
- )
2186
-
2187
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2188
- if @api_client.config.debugging
2189
- @api_client.config.logger.debug "API called: ProfilesApi#spawn_bulk_profile_import_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2190
- end
2191
- return data, status_code, headers
2192
- end
2193
-
2194
- # alias of `spawn_bulk_profile_import_job_with_http_info`
2195
- alias bulk_import_profiles_with_http_info spawn_bulk_profile_import_job_with_http_info
2196
-
2197
- # alias of `spawn_bulk_profile_import_job_with_http_info`
2198
- alias create_profile_bulk_import_job_with_http_info spawn_bulk_profile_import_job_with_http_info
2199
-
2200
2244
  # Update Profile
2201
- # Update the profile with the given profile ID. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
2245
+ # Update the profile with the given profile ID. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `profiles:write`
2202
2246
  # @param id [String] Primary key that uniquely identifies this profile. Generated by Klaviyo.
2203
2247
  # @param profile_partial_update_query [ProfilePartialUpdateQuery]
2204
2248
  # @param [Hash] opts the optional parameters
2249
+ # @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;
2205
2250
  # @return [Hash<String, Object>]
2206
2251
  def update_profile(id, profile_partial_update_query, opts = {})
2207
2252
  data, _status_code, _headers = update_profile_with_http_info(id, profile_partial_update_query, opts)
@@ -2209,10 +2254,11 @@ module KlaviyoAPI
2209
2254
  end
2210
2255
 
2211
2256
  # Update Profile
2212
- # Update the profile with the given profile ID. Note that setting a field to &#x60;null&#x60; will clear out the field, whereas not including a field in your request will leave it unchanged.&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;profiles:write&#x60;
2257
+ # Update the profile with the given profile ID. Use the &#x60;additional-fields&#x60; parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to &#x60;null&#x60; will clear out the field, whereas not including a field in your request will leave it unchanged.&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;profiles:write&#x60;
2213
2258
  # @param id [String] Primary key that uniquely identifies this profile. Generated by Klaviyo.
2214
2259
  # @param profile_partial_update_query [ProfilePartialUpdateQuery]
2215
2260
  # @param [Hash] opts the optional parameters
2261
+ # @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;
2216
2262
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2217
2263
  def update_profile_with_http_info(id, profile_partial_update_query, opts = {})
2218
2264
  if @api_client.config.debugging
@@ -2226,11 +2272,16 @@ module KlaviyoAPI
2226
2272
  if @api_client.config.client_side_validation && profile_partial_update_query.nil?
2227
2273
  fail ArgumentError, "Missing the required parameter 'profile_partial_update_query' when calling ProfilesApi.update_profile"
2228
2274
  end
2275
+ allowable_values = ["subscriptions", "predictive_analytics"]
2276
+ if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) }
2277
+ fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}"
2278
+ end
2229
2279
  # resource path
2230
2280
  local_var_path = '/api/profiles/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2231
2281
 
2232
2282
  # query parameters
2233
2283
  query_params = opts[:query_params] || {}
2284
+ query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil?
2234
2285
 
2235
2286
  # header parameters
2236
2287
  header_params = opts[:header_params] || {}
@@ -2254,7 +2305,7 @@ module KlaviyoAPI
2254
2305
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2255
2306
 
2256
2307
  # auth_names
2257
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2308
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
2258
2309
 
2259
2310
  new_options = opts.merge(
2260
2311
  :operation => :"ProfilesApi.update_profile",