Class: KlaviyoAPI::ProfilesApi
- Inherits:
-
Object
- Object
- KlaviyoAPI::ProfilesApi
- Defined in:
- lib/klaviyo-api-sdk/api/profiles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_or_update_profile(profile_upsert_query, opts = {}) ⇒ Hash<String, Object>
Create or Update Profile Given a set of profile attributes and optionally an ID, create or update a profile.
-
#create_or_update_profile_with_http_info(profile_upsert_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create or Update Profile Given a set of profile attributes and optionally an ID, create or update a profile.
-
#create_profile(profile_create_query, opts = {}) ⇒ Hash<String, Object>
Create Profile Create a new profile.
-
#create_profile_with_http_info(profile_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Profile Create a new profile.
-
#create_push_token(push_token_create_query, opts = {}) ⇒ nil
Create or Update Push Token Create or update a push token.
-
#create_push_token_with_http_info(push_token_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create or Update Push Token Create or update a push token.
-
#get_bulk_profile_import_job(job_id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Get a bulk profile import job with the given job ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read` `profiles:read`. -
#get_bulk_profile_import_job_import_errors(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Errors Get import errors for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`. -
#get_bulk_profile_import_job_import_errors_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Errors Get import errors for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`.
-
#get_bulk_profile_import_job_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Lists Get list for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read`. -
#get_bulk_profile_import_job_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Lists Get list for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read`.
-
#get_bulk_profile_import_job_profiles(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Profiles Get profiles for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`. -
#get_bulk_profile_import_job_profiles_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Profiles Get profiles for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`.
-
#get_bulk_profile_import_job_relationships_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Relationships Lists Get list relationship for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read`. -
#get_bulk_profile_import_job_relationships_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Relationships Lists Get list relationship for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read`.
-
#get_bulk_profile_import_job_relationships_profiles(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Relationships Profiles Get profile relationships for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`. -
#get_bulk_profile_import_job_relationships_profiles_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Relationships Profiles Get profile relationships for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`.
-
#get_bulk_profile_import_job_with_http_info(job_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Get a bulk profile import job with the given job ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read` `profiles:read`.
-
#get_bulk_profile_import_jobs(opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Jobs Get all bulk profile import jobs.
-
#get_bulk_profile_import_jobs_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Jobs Get all bulk profile import jobs.
-
#get_profile(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Get the profile with the given profile ID.
*Rate limits*:
Burst: ‘75/s`
Steady: `700/m` Scopes: `profiles:read`. -
#get_profile_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Lists Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `lists:read` `profiles:read`. -
#get_profile_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Lists Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `lists:read` `profiles:read`.
-
#get_profile_relationships_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Relationships Lists Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `lists:read` `profiles:read`. -
#get_profile_relationships_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Relationships Lists Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `lists:read` `profiles:read`.
-
#get_profile_relationships_segments(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Relationships Segments Get segment membership relationships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `profiles:read` `segments:read`. -
#get_profile_relationships_segments_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Relationships Segments 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`.
-
#get_profile_segments(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Segments Get segment memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `profiles:read` `segments:read`. -
#get_profile_segments_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Segments Get segment memberships 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`.
-
#get_profile_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Get the profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:read`.
-
#get_profiles(opts = {}) ⇒ Hash<String, Object>
Get Profiles Get all profiles in an account.
-
#get_profiles_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profiles Get all profiles in an account.
-
#initialize(api_client = ApiClient.default) ⇒ ProfilesApi
constructor
A new instance of ProfilesApi.
-
#merge_profiles(profile_merge_query, opts = {}) ⇒ Hash<String, Object>
Merge Profiles Merge a given related profile into a profile with the given profile ID.
-
#merge_profiles_with_http_info(profile_merge_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Merge Profiles Merge a given related profile into a profile with the given profile ID.
-
#spawn_bulk_profile_import_job(profile_import_job_create_query, opts = {}) ⇒ Hash<String, Object>
Spawn Bulk Profile Import Job Create a bulk profile import job to create or update a batch of profiles.
-
#spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Spawn Bulk Profile Import Job Create a bulk profile import job to create or update a batch of profiles.
-
#subscribe_profiles(subscription_create_job_create_query, opts = {}) ⇒ nil
Subscribe Profiles Subscribe one or more profiles to email marketing, SMS marketing, or both.
-
#subscribe_profiles_with_http_info(subscription_create_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Subscribe Profiles Subscribe one or more profiles to email marketing, SMS marketing, or both.
-
#suppress_profiles(suppression_create_job_create_query, opts = {}) ⇒ nil
Suppress Profiles Manually suppress one or more profiles.
-
#suppress_profiles_with_http_info(suppression_create_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Suppress Profiles Manually suppress one or more profiles.
-
#unsubscribe_profiles(subscription_delete_job_create_query, opts = {}) ⇒ nil
Unsubscribe Profiles Unsubscribe one or more profiles to email marketing, SMS marketing, or both.
-
#unsubscribe_profiles_with_http_info(subscription_delete_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Unsubscribe Profiles Unsubscribe one or more profiles to email marketing, SMS marketing, or both.
-
#unsuppress_profiles(suppression_delete_job_create_query, opts = {}) ⇒ nil
Unsuppress Profiles Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles.
-
#unsuppress_profiles_with_http_info(suppression_delete_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Unsuppress Profiles Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles.
-
#update_profile(id, profile_partial_update_query, opts = {}) ⇒ Hash<String, Object>
Update Profile Update the profile with the given profile ID.
-
#update_profile_with_http_info(id, profile_partial_update_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update Profile Update the profile with the given profile ID.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProfilesApi
Returns a new instance of ProfilesApi.
19 20 21 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_or_update_profile(profile_upsert_query, opts = {}) ⇒ Hash<String, Object>
Create or Update Profile 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.
*Rate limits*:
Burst: ‘75/s`
Steady: `700/m` Scopes: `profiles:write`
27 28 29 30 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 27 def create_or_update_profile(profile_upsert_query, opts = {}) data, _status_code, _headers = create_or_update_profile_with_http_info(profile_upsert_query, opts) data end |
#create_or_update_profile_with_http_info(profile_upsert_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create or Update Profile 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.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:write`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 37 def create_or_update_profile_with_http_info(profile_upsert_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.create_or_update_profile ...' end # verify the required parameter 'profile_upsert_query' is set if @api_client.config.client_side_validation && profile_upsert_query.nil? fail ArgumentError, "Missing the required parameter 'profile_upsert_query' when calling ProfilesApi.create_or_update_profile" end # resource path local_var_path = '/api/profile-import/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_upsert_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.create_or_update_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#create_or_update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_profile(profile_create_query, opts = {}) ⇒ Hash<String, Object>
Create Profile Create a new profile. If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you’ll need to include at least one other identifier attribute (‘email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` Scopes: `profiles:write`
97 98 99 100 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 97 def create_profile(profile_create_query, opts = {}) data, _status_code, _headers = create_profile_with_http_info(profile_create_query, opts) data end |
#create_profile_with_http_info(profile_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create Profile Create a new profile. If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:write`
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 107 def create_profile_with_http_info(profile_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.create_profile ...' end # verify the required parameter 'profile_create_query' is set if @api_client.config.client_side_validation && profile_create_query.nil? fail ArgumentError, "Missing the required parameter 'profile_create_query' when calling ProfilesApi.create_profile" end # resource path local_var_path = '/api/profiles/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_create_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.create_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_push_token(push_token_create_query, opts = {}) ⇒ nil
Create or Update Push Token Create or update a push token. This endpoint can be used to migrate push tokens from another platform to Klaviyo. Please use our mobile SDKs ([iOS](github.com/klaviyo/klaviyo-swift-sdk) and [Android](github.com/klaviyo/klaviyo-android-sdk)) to create push tokens from users’ devices.
*Rate limits*:
Burst: ‘75/s`
Steady: `700/m` Scopes: `profiles:write` `push-tokens:write`
167 168 169 170 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 167 def create_push_token(push_token_create_query, opts = {}) create_push_token_with_http_info(push_token_create_query, opts) nil end |
#create_push_token_with_http_info(push_token_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create or Update Push Token Create or update a push token. This endpoint can be used to migrate push tokens from another platform to Klaviyo. Please use our mobile SDKs ([iOS](github.com/klaviyo/klaviyo-swift-sdk) and [Android](github.com/klaviyo/klaviyo-android-sdk)) to create push tokens from users' devices.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:write` `push-tokens:write`
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 177 def create_push_token_with_http_info(push_token_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.create_push_token ...' end # verify the required parameter 'push_token_create_query' is set if @api_client.config.client_side_validation && push_token_create_query.nil? fail ArgumentError, "Missing the required parameter 'push_token_create_query' when calling ProfilesApi.create_push_token" end # resource path local_var_path = '/api/push-tokens/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(push_token_create_query) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.create_push_token", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#create_push_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job(job_id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Get a bulk profile import job with the given job ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read` `profiles:read`
240 241 242 243 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 240 def get_bulk_profile_import_job(job_id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_with_http_info(job_id, opts) data end |
#get_bulk_profile_import_job_import_errors(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Errors Get import errors for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`
326 327 328 329 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 326 def get_bulk_profile_import_job_import_errors(id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_import_errors_with_http_info(id, opts) data end |
#get_bulk_profile_import_job_import_errors_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Errors Get import errors for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 339 def get_bulk_profile_import_job_import_errors_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job_import_errors ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_bulk_profile_import_job_import_errors" end allowable_values = ["code", "title", "detail", "source", "source.pointer", "original_payload"] if @api_client.config.client_side_validation && opts[:'fields_import_error'] && !opts[:'fields_import_error'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_import_error\", must include one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_import_errors, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_import_errors, must be greater than or equal to 1.' end # resource path local_var_path = '/api/profile-bulk-import-jobs/{id}/import-errors/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[import-error]'] = @api_client.build_collection_param(opts[:'fields_import_error'], :csv) if !opts[:'fields_import_error'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job_import_errors", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job_import_errors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Lists Get list for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read`
410 411 412 413 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 410 def get_bulk_profile_import_job_lists(id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_lists_with_http_info(id, opts) data end |
#get_bulk_profile_import_job_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Lists Get list for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read`
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 421 def get_bulk_profile_import_job_lists_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job_lists ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_bulk_profile_import_job_lists" end allowable_values = ["name", "created", "updated", "opt_in_process"] if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/profile-bulk-import-jobs/{id}/lists/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job_lists", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job_profiles(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Profiles Get profiles for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`
485 486 487 488 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 485 def get_bulk_profile_import_job_profiles(id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_profiles_with_http_info(id, opts) data end |
#get_bulk_profile_import_job_profiles_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Profiles Get profiles for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 499 def get_bulk_profile_import_job_profiles_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job_profiles ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_bulk_profile_import_job_profiles" end allowable_values = ["subscriptions", "predictive_analytics"] if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}" end allowable_values = ["email", "phone_number", "external_id", "first_name", "last_name", "organization", "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", "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", "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"] if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_profiles, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_profiles, must be greater than or equal to 1.' end # resource path local_var_path = '/api/profile-bulk-import-jobs/{id}/profiles/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil? query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job_relationships_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Relationships Lists Get list relationship for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read`
574 575 576 577 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 574 def get_bulk_profile_import_job_relationships_lists(id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_relationships_lists_with_http_info(id, opts) data end |
#get_bulk_profile_import_job_relationships_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Relationships Lists Get list relationship for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read`
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 584 def get_bulk_profile_import_job_relationships_lists_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job_relationships_lists ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_bulk_profile_import_job_relationships_lists" end # resource path local_var_path = '/api/profile-bulk-import-jobs/{id}/relationships/lists/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job_relationships_lists", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job_relationships_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job_relationships_profiles(id, opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Job Relationships Profiles Get profile relationships for the bulk profile import job with the given ID.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `profiles:read`
641 642 643 644 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 641 def get_bulk_profile_import_job_relationships_profiles(id, opts = {}) data, _status_code, _headers = get_bulk_profile_import_job_relationships_profiles_with_http_info(id, opts) data end |
#get_bulk_profile_import_job_relationships_profiles_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Relationships Profiles Get profile relationships for the bulk profile import job with the given ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:read`
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 653 def get_bulk_profile_import_job_relationships_profiles_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job_relationships_profiles ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_bulk_profile_import_job_relationships_profiles" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_relationships_profiles, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_job_relationships_profiles, must be greater than or equal to 1.' end # resource path local_var_path = '/api/profile-bulk-import-jobs/{id}/relationships/profiles/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job_relationships_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job_relationships_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_job_with_http_info(job_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Job Get a bulk profile import job with the given job ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read` `profiles:read`
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 253 def get_bulk_profile_import_job_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_job ...' end # verify the required parameter 'job_id' is set if @api_client.config.client_side_validation && job_id.nil? fail ArgumentError, "Missing the required parameter 'job_id' when calling ProfilesApi.get_bulk_profile_import_job" end allowable_values = ["name", "created", "updated", "opt_in_process"] if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}" end allowable_values = ["status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "started_at"] if @api_client.config.client_side_validation && opts[:'fields_profile_bulk_import_job'] && !opts[:'fields_profile_bulk_import_job'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_profile_bulk_import_job\", must include one of #{allowable_values}" end allowable_values = ["lists"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/profile-bulk-import-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil? query_params[:'fields[profile-bulk-import-job]'] = @api_client.build_collection_param(opts[:'fields_profile_bulk_import_job'], :csv) if !opts[:'fields_profile_bulk_import_job'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_job", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bulk_profile_import_jobs(opts = {}) ⇒ Hash<String, Object>
Get Bulk Profile Import Jobs Get all bulk profile import jobs. Returns a maximum of 100 jobs per request.
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:read` `profiles:read`
722 723 724 725 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 722 def get_bulk_profile_import_jobs(opts = {}) data, _status_code, _headers = get_bulk_profile_import_jobs_with_http_info(opts) data end |
#get_bulk_profile_import_jobs_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Bulk Profile Import Jobs Get all bulk profile import jobs. Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `lists:read` `profiles:read`
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 736 def get_bulk_profile_import_jobs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_bulk_profile_import_jobs ...' end allowable_values = ["status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "started_at"] if @api_client.config.client_side_validation && opts[:'fields_profile_bulk_import_job'] && !opts[:'fields_profile_bulk_import_job'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_profile_bulk_import_job\", must include one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_jobs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_bulk_profile_import_jobs, must be greater than or equal to 1.' end allowable_values = ["created_at", "-created_at"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/profile-bulk-import-jobs/' # query parameters query_params = opts[:query_params] || {} query_params[:'fields[profile-bulk-import-job]'] = @api_client.build_collection_param(opts[:'fields_profile_bulk_import_job'], :csv) if !opts[:'fields_profile_bulk_import_job'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_bulk_profile_import_jobs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_bulk_profile_import_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Get the profile with the given profile ID.
*Rate limits*:
Burst: ‘75/s`
Steady: `700/m` Scopes: `profiles:read`
813 814 815 816 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 813 def get_profile(id, opts = {}) data, _status_code, _headers = get_profile_with_http_info(id, opts) data end |
#get_profile_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Lists Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `lists:read` `profiles:read`
909 910 911 912 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 909 def get_profile_lists(id, opts = {}) data, _status_code, _headers = get_profile_lists_with_http_info(id, opts) data end |
#get_profile_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Lists Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `lists:read` `profiles:read`
920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 920 def get_profile_lists_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_lists ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile_lists" end allowable_values = ["name", "created", "updated", "opt_in_process"] if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/profiles/{id}/lists/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profile_lists", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_relationships_lists(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Relationships Lists Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `lists:read` `profiles:read`
980 981 982 983 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 980 def get_profile_relationships_lists(id, opts = {}) data, _status_code, _headers = get_profile_relationships_lists_with_http_info(id, opts) data end |
#get_profile_relationships_lists_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Relationships Lists Get list memberships for a profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` Scopes: `lists:read` `profiles:read`
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 990 def get_profile_relationships_lists_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_relationships_lists ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile_relationships_lists" end # resource path local_var_path = '/api/profiles/{id}/relationships/lists/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profile_relationships_lists", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile_relationships_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_relationships_segments(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Relationships Segments Get segment membership relationships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `profiles:read` `segments:read`
1045 1046 1047 1048 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1045 def get_profile_relationships_segments(id, opts = {}) data, _status_code, _headers = get_profile_relationships_segments_with_http_info(id, opts) data end |
#get_profile_relationships_segments_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Relationships Segments 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`
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1055 def get_profile_relationships_segments_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_relationships_segments ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile_relationships_segments" end # resource path local_var_path = '/api/profiles/{id}/relationships/segments/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profile_relationships_segments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile_relationships_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_segments(id, opts = {}) ⇒ Hash<String, Object>
Get Profile Segments Get segment memberships for a profile with the given profile ID.
*Rate limits*:
Burst: ‘3/s`
Steady: `60/m` Scopes: `profiles:read` `segments:read`
1111 1112 1113 1114 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1111 def get_profile_segments(id, opts = {}) data, _status_code, _headers = get_profile_segments_with_http_info(id, opts) data end |
#get_profile_segments_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Segments Get segment memberships 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`
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1122 def get_profile_segments_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile_segments ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile_segments" end allowable_values = ["name", "created", "updated"] if @api_client.config.client_side_validation && opts[:'fields_segment'] && !opts[:'fields_segment'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_segment\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/profiles/{id}/segments/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'fields[segment]'] = @api_client.build_collection_param(opts[:'fields_segment'], :csv) if !opts[:'fields_segment'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profile_segments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profile Get the profile with the given profile ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:read`
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 828 def get_profile_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profile ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.get_profile" end allowable_values = ["subscriptions", "predictive_analytics"] if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}" end allowable_values = ["name", "created", "updated", "opt_in_process"] if @api_client.config.client_side_validation && opts[:'fields_list'] && !opts[:'fields_list'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_list\", must include one of #{allowable_values}" end allowable_values = ["email", "phone_number", "external_id", "first_name", "last_name", "organization", "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", "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", "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"] if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}" end allowable_values = ["name", "created", "updated"] if @api_client.config.client_side_validation && opts[:'fields_segment'] && !opts[:'fields_segment'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_segment\", must include one of #{allowable_values}" end allowable_values = ["lists", "segments"] if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}" end # resource path local_var_path = '/api/profiles/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil? query_params[:'fields[list]'] = @api_client.build_collection_param(opts[:'fields_list'], :csv) if !opts[:'fields_list'].nil? query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil? query_params[:'fields[segment]'] = @api_client.build_collection_param(opts[:'fields_segment'], :csv) if !opts[:'fields_segment'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profiles(opts = {}) ⇒ Hash<String, Object>
Get Profiles 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`
*Rate limits*:
Burst: `75/s`
Steady: `700/m`
Rate limits when using the `additional-fields=predictive_analytics` parameter in your API request:
Burst: `10/s`
Steady: `150/m`
To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](developers.klaviyo.com/en/v2024-02-15/docs/rate_limits_and_error_handling) guide. Scopes: `profiles:read`
1187 1188 1189 1190 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1187 def get_profiles(opts = {}) data, _status_code, _headers = get_profiles_with_http_info(opts) data end |
#get_profiles_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Profiles 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=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](developers.klaviyo.com/en/v2024-02-15/docs/rate_limits_and_error_handling) guide. Scopes: `profiles:read`
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1202 def get_profiles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.get_profiles ...' end allowable_values = ["subscriptions", "predictive_analytics"] if @api_client.config.client_side_validation && opts[:'additional_fields_profile'] && !opts[:'additional_fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"additional_fields_profile\", must include one of #{allowable_values}" end allowable_values = ["email", "phone_number", "external_id", "first_name", "last_name", "organization", "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", "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", "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"] if @api_client.config.client_side_validation && opts[:'fields_profile'] && !opts[:'fields_profile'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"fields_profile\", must include one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_profiles, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ProfilesApi.get_profiles, must be greater than or equal to 1.' end 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"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/profiles/' # query parameters query_params = opts[:query_params] || {} query_params[:'additional-fields[profile]'] = @api_client.build_collection_param(opts[:'additional_fields_profile'], :csv) if !opts[:'additional_fields_profile'].nil? query_params[:'fields[profile]'] = @api_client.build_collection_param(opts[:'fields_profile'], :csv) if !opts[:'fields_profile'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.get_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#get_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#merge_profiles(profile_merge_query, opts = {}) ⇒ Hash<String, Object>
Merge Profiles Merge a given related profile into a profile with the given profile ID. The profile provided under ‘relationships` (the "source" profile) will be merged into the profile provided by the ID in the base data object (the "destination" profile). This endpoint queues an asynchronous task which will merge data from the source profile into the destination profile, deleting the source profile in the process. This endpoint accepts only one source profile. To learn more about how profile data is preserved or overwritten during a merge, please [visit our Help Center](help.klaviyo.com/hc/en-us/articles/115005073847#merge-2-profiles3).
*Rate limits*:
Burst: `10/s`
Steady: `150/m` Scopes: `profiles:write`
1279 1280 1281 1282 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1279 def merge_profiles(profile_merge_query, opts = {}) data, _status_code, _headers = merge_profiles_with_http_info(profile_merge_query, opts) data end |
#merge_profiles_with_http_info(profile_merge_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Merge Profiles Merge a given related profile into a profile with the given profile ID. The profile provided under `relationships` (the "source" profile) will be merged into the profile provided by the ID in the base data object (the "destination" profile). This endpoint queues an asynchronous task which will merge data from the source profile into the destination profile, deleting the source profile in the process. This endpoint accepts only one source profile. To learn more about how profile data is preserved or overwritten during a merge, please [visit our Help Center](help.klaviyo.com/hc/en-us/articles/115005073847#merge-2-profiles3).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` Scopes: `profiles:write`
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1289 def merge_profiles_with_http_info(profile_merge_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.merge_profiles ...' end # verify the required parameter 'profile_merge_query' is set if @api_client.config.client_side_validation && profile_merge_query.nil? fail ArgumentError, "Missing the required parameter 'profile_merge_query' when calling ProfilesApi.merge_profiles" end # resource path local_var_path = '/api/profile-merge/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_merge_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.merge_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#merge_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#spawn_bulk_profile_import_job(profile_import_job_create_query, opts = {}) ⇒ Hash<String, Object>
Spawn Bulk Profile Import Job 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](developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).
*Rate limits*:
Burst: ‘10/s`
Steady: `150/m` Scopes: `lists:write` `profiles:write`
1349 1350 1351 1352 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1349 def spawn_bulk_profile_import_job(profile_import_job_create_query, opts = {}) data, _status_code, _headers = spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts) data end |
#spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Spawn Bulk Profile Import Job 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](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`
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1359 def spawn_bulk_profile_import_job_with_http_info(profile_import_job_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.spawn_bulk_profile_import_job ...' end # verify the required parameter 'profile_import_job_create_query' is set if @api_client.config.client_side_validation && profile_import_job_create_query.nil? fail ArgumentError, "Missing the required parameter 'profile_import_job_create_query' when calling ProfilesApi.spawn_bulk_profile_import_job" end # resource path local_var_path = '/api/profile-bulk-import-jobs/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_import_job_create_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.spawn_bulk_profile_import_job", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#spawn_bulk_profile_import_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#subscribe_profiles(subscription_create_job_create_query, opts = {}) ⇒ nil
Subscribe Profiles 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](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](www.klaviyo.com/settings/account/api-keys). To add someone to a list without changing their subscription status, use [Add Profile to List](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](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: 100
*Rate limits*:
Burst: `75/s`
Steady: `700/m` Scopes: `lists:write` `profiles:write` `subscriptions:write`
1419 1420 1421 1422 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1419 def subscribe_profiles(subscription_create_job_create_query, opts = {}) subscribe_profiles_with_http_info(subscription_create_job_create_query, opts) nil end |
#subscribe_profiles_with_http_info(subscription_create_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Subscribe Profiles 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](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](www.klaviyo.com/settings/account/api-keys). To add someone to a list without changing their subscription status, use [Add Profile to List](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](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: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `lists:write` `profiles:write` `subscriptions:write`
1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1429 def subscribe_profiles_with_http_info(subscription_create_job_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.subscribe_profiles ...' end # verify the required parameter 'subscription_create_job_create_query' is set if @api_client.config.client_side_validation && subscription_create_job_create_query.nil? fail ArgumentError, "Missing the required parameter 'subscription_create_job_create_query' when calling ProfilesApi.subscribe_profiles" end # resource path local_var_path = '/api/profile-subscription-bulk-create-jobs/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_create_job_create_query) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.subscribe_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#subscribe_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#suppress_profiles(suppression_create_job_create_query, opts = {}) ⇒ nil
Suppress Profiles Manually suppress one or more profiles. Such profiles will have ‘USER_SUPPRESSED` as their suppression reason. Manually suppressed profiles _will not_ receive email marketing. Learn more about [suppressed profiles](help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1). Learn about [collecting consent and best practices](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). Not supported for SMS marketing. Maximum number of profile can be submitted for suppression: 100
*Rate limits*:
Burst: `75/s`
Steady: `700/m` Scopes: `profiles:write` `subscriptions:write`
1489 1490 1491 1492 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1489 def suppress_profiles(suppression_create_job_create_query, opts = {}) suppress_profiles_with_http_info(suppression_create_job_create_query, opts) nil end |
#suppress_profiles_with_http_info(suppression_create_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Suppress Profiles Manually suppress one or more profiles. Such profiles will have `USER_SUPPRESSED` as their suppression reason. Manually suppressed profiles _will not_ receive email marketing. Learn more about [suppressed profiles](help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1). Learn about [collecting consent and best practices](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). Not supported for SMS marketing. Maximum number of profile can be submitted for suppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:write` `subscriptions:write`
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1499 def suppress_profiles_with_http_info(suppression_create_job_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.suppress_profiles ...' end # verify the required parameter 'suppression_create_job_create_query' is set if @api_client.config.client_side_validation && suppression_create_job_create_query.nil? fail ArgumentError, "Missing the required parameter 'suppression_create_job_create_query' when calling ProfilesApi.suppress_profiles" end # resource path local_var_path = '/api/profile-suppression-bulk-create-jobs/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(suppression_create_job_create_query) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.suppress_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#suppress_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unsubscribe_profiles(subscription_delete_job_create_query, opts = {}) ⇒ nil
Unsubscribe Profiles Unsubscribe one or more profiles to email marketing, SMS marketing, or both. Learn more about [consent in this guide](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). To remove someone from a list without changing their subscription status, use [Remove Profile from List](developers.klaviyo.com/en/reference/delete_list_relationships). Maximum number of profile can be submitted for unsubscription: 100
*Rate limits*:
Burst: ‘75/s`
Steady: `700/m` Scopes: `lists:write` `profiles:write` `subscriptions:write`
1559 1560 1561 1562 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1559 def unsubscribe_profiles(subscription_delete_job_create_query, opts = {}) unsubscribe_profiles_with_http_info(subscription_delete_job_create_query, opts) nil end |
#unsubscribe_profiles_with_http_info(subscription_delete_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Unsubscribe Profiles Unsubscribe one or more profiles to email marketing, SMS marketing, or both. Learn more about [consent in this guide](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). To remove someone from a list without changing their subscription status, use [Remove Profile from List](developers.klaviyo.com/en/reference/delete_list_relationships). Maximum number of profile can be submitted for unsubscription: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `lists:write` `profiles:write` `subscriptions:write`
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1569 def unsubscribe_profiles_with_http_info(subscription_delete_job_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.unsubscribe_profiles ...' end # verify the required parameter 'subscription_delete_job_create_query' is set if @api_client.config.client_side_validation && subscription_delete_job_create_query.nil? fail ArgumentError, "Missing the required parameter 'subscription_delete_job_create_query' when calling ProfilesApi.unsubscribe_profiles" end # resource path local_var_path = '/api/profile-subscription-bulk-delete-jobs/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_delete_job_create_query) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.unsubscribe_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#unsubscribe_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unsuppress_profiles(suppression_delete_job_create_query, opts = {}) ⇒ nil
Unsuppress Profiles Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles. A profile may receive email marketing after a manual suppression is removed so long as they have not revoked [consent](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api), i.e. unsubscribed. Not supported for SMS marketing. Only manual suppressions (USER_SUPPRESSED) will be removed. ‘UNSUBSCRIBE` and `SPAM_REPORT` suppressions are removed whenever a [profile resubscribes](developers.klaviyo.com/en/reference/subscribe_profiles). `INVALID_EMAIL` and `HARD_BOUNCE` suppressions cannot be removed by the API. Maximum number of profile can be submitted for unsuppression: 100
*Rate limits*:
Burst: `75/s`
Steady: `700/m` Scopes: `subscriptions:write`
1629 1630 1631 1632 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1629 def unsuppress_profiles(suppression_delete_job_create_query, opts = {}) unsuppress_profiles_with_http_info(suppression_delete_job_create_query, opts) nil end |
#unsuppress_profiles_with_http_info(suppression_delete_job_create_query, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Unsuppress Profiles Unsuppress one or more profiles, this will remove any Manual Suppressions (USER_SUPPRESSED) on these profiles. A profile may receive email marketing after a manual suppression is removed so long as they have not revoked [consent](developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api), i.e. unsubscribed. Not supported for SMS marketing. Only manual suppressions (USER_SUPPRESSED) will be removed. `UNSUBSCRIBE` and `SPAM_REPORT` suppressions are removed whenever a [profile resubscribes](developers.klaviyo.com/en/reference/subscribe_profiles). `INVALID_EMAIL` and `HARD_BOUNCE` suppressions cannot be removed by the API. Maximum number of profile can be submitted for unsuppression: 100<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `subscriptions:write`
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1639 def unsuppress_profiles_with_http_info(suppression_delete_job_create_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.unsuppress_profiles ...' end # verify the required parameter 'suppression_delete_job_create_query' is set if @api_client.config.client_side_validation && suppression_delete_job_create_query.nil? fail ArgumentError, "Missing the required parameter 'suppression_delete_job_create_query' when calling ProfilesApi.unsuppress_profiles" end # resource path local_var_path = '/api/profile-suppression-bulk-delete-jobs/' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(suppression_delete_job_create_query) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.unsuppress_profiles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#unsuppress_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile(id, profile_partial_update_query, opts = {}) ⇒ Hash<String, Object>
Update Profile Update the profile with the given profile ID. If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you’ll need to include at least one other identifier attribute (‘email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` Scopes: `profiles:write`
1700 1701 1702 1703 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1700 def update_profile(id, profile_partial_update_query, opts = {}) data, _status_code, _headers = update_profile_with_http_info(id, profile_partial_update_query, opts) data end |
#update_profile_with_http_info(id, profile_partial_update_query, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update Profile Update the profile with the given profile ID. If you use a phone number as the profile identifier and SMS is not set up in the Klaviyo account, you'll need to include at least one other identifier attribute (`email` or `external_id`) in addition to the `phone_number` attribute for the API call to work.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` Scopes: `profiles:write`
1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 |
# File 'lib/klaviyo-api-sdk/api/profiles_api.rb', line 1711 def update_profile_with_http_info(id, profile_partial_update_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProfilesApi.update_profile ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ProfilesApi.update_profile" end # verify the required parameter 'profile_partial_update_query' is set if @api_client.config.client_side_validation && profile_partial_update_query.nil? fail ArgumentError, "Missing the required parameter 'profile_partial_update_query' when calling ProfilesApi.update_profile" end # resource path local_var_path = '/api/profiles/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # klaviyo api revision header_params['revision'] = ENV['API_REVISION'] || "2024-02-15" # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_partial_update_query) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key'] = opts.merge( :operation => :"ProfilesApi.update_profile", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |