diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa29ee8..40ca303 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [10.0.0] - 2024-10-15
+### Added
+- Sample Change
+
## [9.0.0] - revision 2024-07-15
### Added
- Added several method aliases based on previous operation IDs
diff --git a/README.md b/README.md
index 6d5ff83..6c38df1 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Klaviyo Ruby SDK
-- SDK version: 9.0.0
-- API revision: 2024-07-15
+- SDK version: 10.0.0
+- API revision: 2024-10-15
## Helpful Resources
-- [API Reference](https://developers.klaviyo.com/en/v2024-07-15/reference)
-- [API Guides](https://developers.klaviyo.com/en/v2024-07-15/docs)
+- [API Reference](https://developers.klaviyo.com/en/v2024-10-15/reference)
+- [API Guides](https://developers.klaviyo.com/en/v2024-10-15/docs)
- [Postman Workspace](https://www.postman.com/klaviyo/workspace/klaviyo-developers)
## Design & Approach
@@ -71,6 +71,10 @@ This SDK is organized into the following resources:
+- Reviews
+
+
+
- Segments
@@ -83,6 +87,10 @@ This SDK is organized into the following resources:
+- Tracking Settings
+
+
+
- Webhooks
@@ -102,13 +110,13 @@ gem build klaviyo-api-sdk.gemspec
Then install the gem locally:
```shell
-gem install ./klaviyo-api-sdk-9.0.0.gem
+gem install ./klaviyo-api-sdk-10.0.0.gem
```
Finally add this to the Gemfile:
- gem 'klaviyo-api-sdk', '~> 9.0.0'
+ gem 'klaviyo-api-sdk', '~> 10.0.0'
To install directly from rubygems:
@@ -488,7 +496,7 @@ response = KlaviyoAPI::Events.get_events(opts)
## Comprehensive list of Operations & Parameters
_**NOTE:**_
-- Organization: Resource groups and operation_ids are listed in alphabetical order, first by Resource name, then by **OpenAPI Summary**. Operation summaries are those listed in the right side bar of the [API Reference](https://developers.klaviyo.com/en/v2024-07-15/reference/get_events).
+- Organization: Resource groups and operation_ids are listed in alphabetical order, first by Resource name, then by **OpenAPI Summary**. Operation summaries are those listed in the right side bar of the [API Reference](https://developers.klaviyo.com/en/v2024-10-15/reference/get_events).
- For example values / data types, as well as whether parameters are required/optional, please reference the corresponding API Reference link.
- Some args are required for the API call to succeed, the API docs above are the source of truth regarding which params are required.
@@ -500,7 +508,7 @@ _**NOTE:**_
## Accounts
-#### [Get Account](https://developers.klaviyo.com/en/v2024-07-15/reference/get_account)
+#### [Get Account](https://developers.klaviyo.com/en/v2024-10-15/reference/get_account)
```ruby
KlaviyoAPI::Accounts.get_account(id, opts)
@@ -510,7 +518,7 @@ KlaviyoAPI::Accounts.get_account(id, opts)
-#### [Get Accounts](https://developers.klaviyo.com/en/v2024-07-15/reference/get_accounts)
+#### [Get Accounts](https://developers.klaviyo.com/en/v2024-10-15/reference/get_accounts)
```ruby
KlaviyoAPI::Accounts.get_accounts(opts)
@@ -524,87 +532,107 @@ KlaviyoAPI::Accounts.get_accounts(opts)
## Campaigns
-#### [Create Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/create_campaign)
+#### [Assign Template to Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/assign_template_to_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.create_campaign(body)
+KlaviyoAPI::Campaigns.assign_template_to_campaign_message(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.create_campaign_message_assign_template(body)
```
-#### [Create Campaign Clone](https://developers.klaviyo.com/en/v2024-07-15/reference/create_campaign_clone)
+#### [Cancel Campaign Send](https://developers.klaviyo.com/en/v2024-10-15/reference/cancel_campaign_send)
```ruby
-KlaviyoAPI::Campaigns.create_campaign_clone(body)
+KlaviyoAPI::Campaigns.cancel_campaign_send(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.update_campaign_send_job(id, body)
```
-#### [Assign Campaign Message Template](https://developers.klaviyo.com/en/v2024-07-15/reference/create_campaign_message_assign_template)
+#### [Create Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/create_campaign)
```ruby
-KlaviyoAPI::Campaigns.create_campaign_message_assign_template(body)
+KlaviyoAPI::Campaigns.create_campaign(body)
```
-#### [Create Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2024-07-15/reference/create_campaign_recipient_estimation_job)
+#### [Create Campaign Clone](https://developers.klaviyo.com/en/v2024-10-15/reference/create_campaign_clone)
```ruby
-KlaviyoAPI::Campaigns.create_campaign_recipient_estimation_job(body)
+KlaviyoAPI::Campaigns.create_campaign_clone(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.clone_campaign(body)
```
-#### [Create Campaign Send Job](https://developers.klaviyo.com/en/v2024-07-15/reference/create_campaign_send_job)
+#### [Delete Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_campaign)
```ruby
-KlaviyoAPI::Campaigns.create_campaign_send_job(body)
+KlaviyoAPI::Campaigns.delete_campaign(id)
```
-#### [Delete Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_campaign)
+#### [Get Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign)
```ruby
-KlaviyoAPI::Campaigns.delete_campaign(id)
+KlaviyoAPI::Campaigns.get_campaign(id, opts)
```
-#### [Get Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign)
+#### [Get Campaign for Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_for_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.get_campaign(id, opts)
+KlaviyoAPI::Campaigns.get_campaign_for_campaign_message(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_message_campaign(id, opts)
```
-#### [Get Campaign Campaign Messages](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_campaign_messages)
+#### [Get Campaign ID for Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_id_for_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_campaign_messages(id, opts)
+KlaviyoAPI::Campaigns.get_campaign_id_for_campaign_message(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_message_relationships_campaign(id)
```
-#### [Get Campaign Message](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_message)
+#### [Get Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_message)
```ruby
KlaviyoAPI::Campaigns.get_campaign_message(id, opts)
@@ -614,78 +642,90 @@ KlaviyoAPI::Campaigns.get_campaign_message(id, opts)
-#### [Get Campaign Message Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_message_campaign)
+#### [Get Campaign Recipient Estimation](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_recipient_estimation)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_message_campaign(id, opts)
+KlaviyoAPI::Campaigns.get_campaign_recipient_estimation(id, opts)
```
-#### [Get Campaign Message Relationships Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_message_relationships_campaign)
+#### [Get Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_recipient_estimation_job)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_message_relationships_campaign(id)
+KlaviyoAPI::Campaigns.get_campaign_recipient_estimation_job(id, opts)
```
-#### [Get Campaign Message Relationships Template](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_message_relationships_template)
+#### [Get Campaign Send Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_send_job)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_message_relationships_template(id)
+KlaviyoAPI::Campaigns.get_campaign_send_job(id, opts)
```
-#### [Get Campaign Message Template](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_message_template)
+#### [Get Campaign Tags](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_tags)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_message_template(id, opts)
+KlaviyoAPI::Campaigns.get_campaign_tags(id, opts)
```
-#### [Get Campaign Recipient Estimation](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_recipient_estimation)
+#### [Get Campaigns](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaigns)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_recipient_estimation(id, opts)
+KlaviyoAPI::Campaigns.get_campaigns(filter, opts)
```
-#### [Get Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_recipient_estimation_job)
+#### [Get Message IDs for Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/get_message_ids_for_campaign)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_recipient_estimation_job(id, opts)
+KlaviyoAPI::Campaigns.get_message_ids_for_campaign(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_relationships_campaign_messages(id)
```
-#### [Get Campaign Relationships Campaign Messages](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_relationships_campaign_messages)
+#### [Get Messages for Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/get_messages_for_campaign)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_relationships_campaign_messages(id)
+KlaviyoAPI::Campaigns.get_messages_for_campaign(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_campaign_messages(id, opts)
```
-#### [Get Campaign Relationships Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_relationships_tags)
+#### [Get Tag IDs for Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_ids_for_campaign)
+```ruby
+KlaviyoAPI::Campaigns.get_tag_ids_for_campaign(id)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Campaigns.get_campaign_relationships_tags(id)
```
@@ -694,60 +734,76 @@ KlaviyoAPI::Campaigns.get_campaign_relationships_tags(id)
-#### [Get Campaign Send Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_send_job)
+#### [Get Template for Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_template_for_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_send_job(id, opts)
+KlaviyoAPI::Campaigns.get_template_for_campaign_message(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_message_template(id, opts)
```
-#### [Get Campaign Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaign_tags)
+#### [Get Template ID for Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_template_id_for_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.get_campaign_tags(id, opts)
+KlaviyoAPI::Campaigns.get_template_id_for_campaign_message(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.get_campaign_message_relationships_template(id)
```
-#### [Get Campaigns](https://developers.klaviyo.com/en/v2024-07-15/reference/get_campaigns)
+#### [Refresh Campaign Recipient Estimation](https://developers.klaviyo.com/en/v2024-10-15/reference/refresh_campaign_recipient_estimation)
```ruby
-KlaviyoAPI::Campaigns.get_campaigns(filter, opts)
+KlaviyoAPI::Campaigns.refresh_campaign_recipient_estimation(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.create_campaign_recipient_estimation_job(body)
```
-#### [Update Campaign](https://developers.klaviyo.com/en/v2024-07-15/reference/update_campaign)
+#### [Send Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/send_campaign)
```ruby
-KlaviyoAPI::Campaigns.update_campaign(id, body)
+KlaviyoAPI::Campaigns.send_campaign(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Campaigns.create_campaign_send_job(body)
```
-#### [Update Campaign Message](https://developers.klaviyo.com/en/v2024-07-15/reference/update_campaign_message)
+#### [Update Campaign](https://developers.klaviyo.com/en/v2024-10-15/reference/update_campaign)
```ruby
-KlaviyoAPI::Campaigns.update_campaign_message(id, body)
+KlaviyoAPI::Campaigns.update_campaign(id, body)
```
-#### [Update Campaign Send Job](https://developers.klaviyo.com/en/v2024-07-15/reference/update_campaign_send_job)
+#### [Update Campaign Message](https://developers.klaviyo.com/en/v2024-10-15/reference/update_campaign_message)
```ruby
-KlaviyoAPI::Campaigns.update_campaign_send_job(id, body)
+KlaviyoAPI::Campaigns.update_campaign_message(id, body)
```
@@ -758,28 +814,30 @@ KlaviyoAPI::Campaigns.update_campaign_send_job(id, body)
## Catalogs
-#### [Create Back In Stock Subscription](https://developers.klaviyo.com/en/v2024-07-15/reference/create_back_in_stock_subscription)
+#### [Add Category to Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/add_category_to_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.create_back_in_stock_subscription(body)
+KlaviyoAPI::Catalogs.add_category_to_catalog_item(id, body)
```
-
-
-
-
-
-#### [Create Catalog Category](https://developers.klaviyo.com/en/v2024-07-15/reference/create_catalog_category)
-
+##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_category(body)
+KlaviyoAPI::Catalogs.create_catalog_item_relationships_categories(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_item_relationships_category(id, body)
```
-#### [Create Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2024-07-15/reference/create_catalog_category_relationships_items)
+#### [Add Items to Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/add_items_to_catalog_category)
+```ruby
+KlaviyoAPI::Catalogs.add_items_to_catalog_category(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Catalogs.create_catalog_category_relationships_items(id, body)
```
@@ -792,579 +850,673 @@ KlaviyoAPI::Catalogs.create_catalog_category_relationships_item(id, body)
-#### [Create Catalog Item](https://developers.klaviyo.com/en/v2024-07-15/reference/create_catalog_item)
+#### [Bulk Create Catalog Categories](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_create_catalog_categories)
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item(body)
+KlaviyoAPI::Catalogs.bulk_create_catalog_categories(body)
```
-
-
-
-
-
-#### [Create Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/create_catalog_item_relationships_categories)
-
+##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item_relationships_categories(id, body)
+KlaviyoAPI::Catalogs.spawn_create_categories_job(body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item_relationships_category(id, body)
+KlaviyoAPI::Catalogs.create_catalog_category_bulk_create_job(body)
```
-#### [Create Catalog Variant](https://developers.klaviyo.com/en/v2024-07-15/reference/create_catalog_variant)
+#### [Bulk Create Catalog Items](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_create_catalog_items)
```ruby
-KlaviyoAPI::Catalogs.create_catalog_variant(body)
+KlaviyoAPI::Catalogs.bulk_create_catalog_items(body)
```
-
-
-
-
-
-#### [Delete Catalog Category](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_catalog_category)
-
+##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.delete_catalog_category(id)
+KlaviyoAPI::Catalogs.spawn_create_items_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_item_bulk_create_job(body)
```
-#### [Delete Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_catalog_category_relationships_items)
+#### [Bulk Create Catalog Variants](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_create_catalog_variants)
```ruby
-KlaviyoAPI::Catalogs.delete_catalog_category_relationships_items(id, body)
+KlaviyoAPI::Catalogs.bulk_create_catalog_variants(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_create_variants_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_variant_bulk_create_job(body)
```
-#### [Delete Catalog Item](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_catalog_item)
+#### [Bulk Delete Catalog Categories](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_delete_catalog_categories)
```ruby
-KlaviyoAPI::Catalogs.delete_catalog_item(id)
+KlaviyoAPI::Catalogs.bulk_delete_catalog_categories(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_delete_categories_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_category_bulk_delete_job(body)
```
-#### [Delete Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_catalog_item_relationships_categories)
+#### [Bulk Delete Catalog Items](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_delete_catalog_items)
```ruby
-KlaviyoAPI::Catalogs.delete_catalog_item_relationships_categories(id, body)
+KlaviyoAPI::Catalogs.bulk_delete_catalog_items(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_delete_items_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_item_bulk_delete_job(body)
```
-#### [Delete Catalog Variant](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_catalog_variant)
+#### [Bulk Delete Catalog Variants](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_delete_catalog_variants)
```ruby
-KlaviyoAPI::Catalogs.delete_catalog_variant(id)
+KlaviyoAPI::Catalogs.bulk_delete_catalog_variants(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_delete_variants_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_variant_bulk_delete_job(body)
```
-#### [Get Catalog Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_categories)
+#### [Bulk Update Catalog Categories](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_update_catalog_categories)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_categories(opts)
+KlaviyoAPI::Catalogs.bulk_update_catalog_categories(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_update_categories_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_category_bulk_update_job(body)
```
-#### [Get Catalog Category](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_category)
+#### [Bulk Update Catalog Items](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_update_catalog_items)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category(id, opts)
+KlaviyoAPI::Catalogs.bulk_update_catalog_items(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_update_items_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_item_bulk_update_job(body)
```
-#### [Get Catalog Category Items](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_category_items)
+#### [Bulk Update Catalog Variants](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_update_catalog_variants)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_items(id, opts)
+KlaviyoAPI::Catalogs.bulk_update_catalog_variants(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.spawn_update_variants_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.create_catalog_variant_bulk_update_job(body)
```
-#### [Get Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_category_relationships_items)
+#### [Create Back In Stock Subscription](https://developers.klaviyo.com/en/v2024-10-15/reference/create_back_in_stock_subscription)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_relationships_items(id, opts)
+KlaviyoAPI::Catalogs.create_back_in_stock_subscription(body)
```
-#### [Get Catalog Item](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_item)
+#### [Create Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/create_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item(id, opts)
+KlaviyoAPI::Catalogs.create_catalog_category(body)
```
-#### [Get Catalog Item Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_item_categories)
+#### [Create Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/create_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_categories(id, opts)
+KlaviyoAPI::Catalogs.create_catalog_item(body)
```
-#### [Get Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_item_relationships_categories)
+#### [Create Catalog Variant](https://developers.klaviyo.com/en/v2024-10-15/reference/create_catalog_variant)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_relationships_categories(id, opts)
+KlaviyoAPI::Catalogs.create_catalog_variant(body)
```
-#### [Get Catalog Item Variants](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_item_variants)
+#### [Delete Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_variants(id, opts)
+KlaviyoAPI::Catalogs.delete_catalog_category(id)
```
-#### [Get Catalog Items](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_items)
+#### [Delete Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_items(opts)
+KlaviyoAPI::Catalogs.delete_catalog_item(id)
```
-#### [Get Catalog Variant](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_variant)
+#### [Delete Catalog Variant](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_catalog_variant)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant(id, opts)
+KlaviyoAPI::Catalogs.delete_catalog_variant(id)
```
-#### [Get Catalog Variants](https://developers.klaviyo.com/en/v2024-07-15/reference/get_catalog_variants)
+#### [Get Bulk Create Catalog Items Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_create_catalog_items_job)
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variants(opts)
+KlaviyoAPI::Catalogs.get_bulk_create_catalog_items_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_create_items_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_create_job(job_id, opts)
```
-#### [Get Create Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_categories_job)
+#### [Get Bulk Create Catalog Items Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_create_catalog_items_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_create_categories_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_bulk_create_catalog_items_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_create_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_create_items_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_create_jobs(opts)
```
-#### [Get Create Categories Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_categories_jobs)
+#### [Get Bulk Delete Catalog Items Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_delete_catalog_items_job)
```ruby
-KlaviyoAPI::Catalogs.get_create_categories_jobs(opts)
+KlaviyoAPI::Catalogs.get_bulk_delete_catalog_items_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_create_jobs(opts)
+KlaviyoAPI::Catalogs.get_delete_items_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_delete_job(job_id, opts)
```
-#### [Get Create Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_items_job)
+#### [Get Bulk Delete Catalog Items Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_delete_catalog_items_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_create_items_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_bulk_delete_catalog_items_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_create_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_delete_items_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_delete_jobs(opts)
```
-#### [Get Create Items Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_items_jobs)
+#### [Get Bulk Update Catalog Items Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_update_catalog_items_job)
```ruby
-KlaviyoAPI::Catalogs.get_create_items_jobs(opts)
+KlaviyoAPI::Catalogs.get_bulk_update_catalog_items_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_create_jobs(opts)
+KlaviyoAPI::Catalogs.get_update_items_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_update_job(job_id, opts)
```
-#### [Get Create Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_variants_job)
+#### [Get Bulk Update Catalog Items Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_update_catalog_items_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_create_variants_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_bulk_update_catalog_items_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_create_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_update_items_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.get_catalog_item_bulk_update_jobs(opts)
```
-#### [Get Create Variants Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_create_variants_jobs)
+#### [Get Catalog Categories](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_categories)
```ruby
-KlaviyoAPI::Catalogs.get_create_variants_jobs(opts)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_create_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_categories(opts)
```
-#### [Get Delete Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_categories_job)
+#### [Get Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.get_delete_categories_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_category(id, opts)
```
-##### Method alias:
+
+
+
+
+
+#### [Get Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_item)
+
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_delete_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_item(id, opts)
```
-#### [Get Delete Categories Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_categories_jobs)
+#### [Get Catalog Items](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_items)
```ruby
-KlaviyoAPI::Catalogs.get_delete_categories_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_items(opts)
```
-##### Method alias:
+
+
+
+
+
+#### [Get Catalog Variant](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_variant)
+
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_delete_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_variant(id, opts)
```
-#### [Get Delete Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_items_job)
+#### [Get Catalog Variants](https://developers.klaviyo.com/en/v2024-10-15/reference/get_catalog_variants)
```ruby
-KlaviyoAPI::Catalogs.get_delete_items_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_variants(opts)
+```
+
+
+
+
+
+#### [Get Categories for Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/get_categories_for_catalog_item)
+
+```ruby
+KlaviyoAPI::Catalogs.get_categories_for_catalog_item(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_delete_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_item_categories(id, opts)
```
-#### [Get Delete Items Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_items_jobs)
+#### [Get Category IDs for Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/get_category_ids_for_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.get_delete_items_jobs(opts)
+KlaviyoAPI::Catalogs.get_category_ids_for_catalog_item(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_delete_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_item_relationships_categories(id, opts)
```
-#### [Get Delete Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_variants_job)
+#### [Get Create Categories Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_create_categories_job)
```ruby
-KlaviyoAPI::Catalogs.get_delete_variants_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_create_categories_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_delete_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_create_job(job_id, opts)
```
-#### [Get Delete Variants Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_delete_variants_jobs)
+#### [Get Create Categories Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_create_categories_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_delete_variants_jobs(opts)
+KlaviyoAPI::Catalogs.get_create_categories_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_delete_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_create_jobs(opts)
```
-#### [Get Update Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_categories_job)
+#### [Get Create Variants Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_create_variants_job)
```ruby
-KlaviyoAPI::Catalogs.get_update_categories_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_create_variants_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_update_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_create_job(job_id, opts)
```
-#### [Get Update Categories Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_categories_jobs)
+#### [Get Create Variants Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_create_variants_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_update_categories_jobs(opts)
+KlaviyoAPI::Catalogs.get_create_variants_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_category_bulk_update_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_create_jobs(opts)
```
-#### [Get Update Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_items_job)
+#### [Get Delete Categories Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_delete_categories_job)
```ruby
-KlaviyoAPI::Catalogs.get_update_items_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_delete_categories_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_update_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_delete_job(job_id, opts)
```
-#### [Get Update Items Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_items_jobs)
+#### [Get Delete Categories Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_delete_categories_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_update_items_jobs(opts)
+KlaviyoAPI::Catalogs.get_delete_categories_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_item_bulk_update_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_delete_jobs(opts)
```
-#### [Get Update Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_variants_job)
+#### [Get Delete Variants Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_delete_variants_job)
```ruby
-KlaviyoAPI::Catalogs.get_update_variants_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_delete_variants_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_update_job(job_id, opts)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_delete_job(job_id, opts)
```
-#### [Get Update Variants Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_update_variants_jobs)
+#### [Get Delete Variants Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_delete_variants_jobs)
```ruby
-KlaviyoAPI::Catalogs.get_update_variants_jobs(opts)
+KlaviyoAPI::Catalogs.get_delete_variants_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.get_catalog_variant_bulk_update_jobs(opts)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_delete_jobs(opts)
```
-#### [Spawn Create Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_create_categories_job)
+#### [Get Item IDs for Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/get_item_ids_for_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.spawn_create_categories_job(body)
+KlaviyoAPI::Catalogs.get_item_ids_for_catalog_category(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_category_bulk_create_job(body)
+KlaviyoAPI::Catalogs.get_catalog_category_relationships_items(id, opts)
```
-#### [Spawn Create Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_create_items_job)
+#### [Get Items for Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/get_items_for_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.spawn_create_items_job(body)
+KlaviyoAPI::Catalogs.get_items_for_catalog_category(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item_bulk_create_job(body)
+KlaviyoAPI::Catalogs.get_catalog_category_items(id, opts)
```
-#### [Spawn Create Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_create_variants_job)
+#### [Get Update Categories Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_update_categories_job)
```ruby
-KlaviyoAPI::Catalogs.spawn_create_variants_job(body)
+KlaviyoAPI::Catalogs.get_update_categories_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_variant_bulk_create_job(body)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_update_job(job_id, opts)
```
-#### [Spawn Delete Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_delete_categories_job)
+#### [Get Update Categories Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_update_categories_jobs)
```ruby
-KlaviyoAPI::Catalogs.spawn_delete_categories_job(body)
+KlaviyoAPI::Catalogs.get_update_categories_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_category_bulk_delete_job(body)
+KlaviyoAPI::Catalogs.get_catalog_category_bulk_update_jobs(opts)
```
-#### [Spawn Delete Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_delete_items_job)
+#### [Get Update Variants Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_update_variants_job)
```ruby
-KlaviyoAPI::Catalogs.spawn_delete_items_job(body)
+KlaviyoAPI::Catalogs.get_update_variants_job(job_id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item_bulk_delete_job(body)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_update_job(job_id, opts)
```
-#### [Spawn Delete Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_delete_variants_job)
+#### [Get Update Variants Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_update_variants_jobs)
```ruby
-KlaviyoAPI::Catalogs.spawn_delete_variants_job(body)
+KlaviyoAPI::Catalogs.get_update_variants_jobs(opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_variant_bulk_delete_job(body)
+KlaviyoAPI::Catalogs.get_catalog_variant_bulk_update_jobs(opts)
```
-#### [Spawn Update Categories Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_update_categories_job)
+#### [Get Variants for Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/get_variants_for_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.spawn_update_categories_job(body)
+KlaviyoAPI::Catalogs.get_variants_for_catalog_item(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_category_bulk_update_job(body)
+KlaviyoAPI::Catalogs.get_catalog_item_variants(id, opts)
```
-#### [Spawn Update Items Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_update_items_job)
+#### [Remove Categories from Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_categories_from_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.spawn_update_items_job(body)
+KlaviyoAPI::Catalogs.remove_categories_from_catalog_item(id, body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_item_bulk_update_job(body)
+KlaviyoAPI::Catalogs.delete_catalog_item_relationships_categories(id, body)
```
-#### [Spawn Update Variants Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_update_variants_job)
+#### [Remove Items from Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_items_from_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.spawn_update_variants_job(body)
+KlaviyoAPI::Catalogs.remove_items_from_catalog_category(id, body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Catalogs.create_catalog_variant_bulk_update_job(body)
+KlaviyoAPI::Catalogs.delete_catalog_category_relationships_items(id, body)
```
-#### [Update Catalog Category](https://developers.klaviyo.com/en/v2024-07-15/reference/update_catalog_category)
+#### [Update Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/update_catalog_category)
```ruby
KlaviyoAPI::Catalogs.update_catalog_category(id, body)
@@ -1374,28 +1526,32 @@ KlaviyoAPI::Catalogs.update_catalog_category(id, body)
-#### [Update Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2024-07-15/reference/update_catalog_category_relationships_items)
+#### [Update Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/update_catalog_item)
```ruby
-KlaviyoAPI::Catalogs.update_catalog_category_relationships_items(id, body)
+KlaviyoAPI::Catalogs.update_catalog_item(id, body)
```
-#### [Update Catalog Item](https://developers.klaviyo.com/en/v2024-07-15/reference/update_catalog_item)
+#### [Update Catalog Variant](https://developers.klaviyo.com/en/v2024-10-15/reference/update_catalog_variant)
```ruby
-KlaviyoAPI::Catalogs.update_catalog_item(id, body)
+KlaviyoAPI::Catalogs.update_catalog_variant(id, body)
```
-#### [Update Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2024-07-15/reference/update_catalog_item_relationships_categories)
+#### [Update Categories for Catalog Item](https://developers.klaviyo.com/en/v2024-10-15/reference/update_categories_for_catalog_item)
+```ruby
+KlaviyoAPI::Catalogs.update_categories_for_catalog_item(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Catalogs.update_catalog_item_relationships_categories(id, body)
```
@@ -1404,10 +1560,14 @@ KlaviyoAPI::Catalogs.update_catalog_item_relationships_categories(id, body)
-#### [Update Catalog Variant](https://developers.klaviyo.com/en/v2024-07-15/reference/update_catalog_variant)
+#### [Update Items for Catalog Category](https://developers.klaviyo.com/en/v2024-10-15/reference/update_items_for_catalog_category)
```ruby
-KlaviyoAPI::Catalogs.update_catalog_variant(id, body)
+KlaviyoAPI::Catalogs.update_items_for_catalog_category(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Catalogs.update_catalog_category_relationships_items(id, body)
```
@@ -1418,7 +1578,25 @@ KlaviyoAPI::Catalogs.update_catalog_variant(id, body)
## Coupons
-#### [Create Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/create_coupon)
+#### [Bulk Create Coupon Codes](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_create_coupon_codes)
+
+```ruby
+KlaviyoAPI::Coupons.bulk_create_coupon_codes(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Coupons.spawn_coupon_code_bulk_create_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Coupons.create_coupon_code_bulk_create_job(body)
+```
+
+
+
+
+
+#### [Create Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/create_coupon)
```ruby
KlaviyoAPI::Coupons.create_coupon(body)
@@ -1428,7 +1606,7 @@ KlaviyoAPI::Coupons.create_coupon(body)
-#### [Create Coupon Code](https://developers.klaviyo.com/en/v2024-07-15/reference/create_coupon_code)
+#### [Create Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/create_coupon_code)
```ruby
KlaviyoAPI::Coupons.create_coupon_code(body)
@@ -1438,7 +1616,7 @@ KlaviyoAPI::Coupons.create_coupon_code(body)
-#### [Delete Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_coupon)
+#### [Delete Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_coupon)
```ruby
KlaviyoAPI::Coupons.delete_coupon(id)
@@ -1448,7 +1626,7 @@ KlaviyoAPI::Coupons.delete_coupon(id)
-#### [Delete Coupon Code](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_coupon_code)
+#### [Delete Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_coupon_code)
```ruby
KlaviyoAPI::Coupons.delete_coupon_code(id)
@@ -1458,57 +1636,69 @@ KlaviyoAPI::Coupons.delete_coupon_code(id)
-#### [Get Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon)
+#### [Get Bulk Create Coupon Code Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_create_coupon_code_jobs)
```ruby
-KlaviyoAPI::Coupons.get_coupon(id, opts)
+KlaviyoAPI::Coupons.get_bulk_create_coupon_code_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Coupons.get_coupon_code_bulk_create_jobs(opts)
```
-#### [Get Coupon Code](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_code)
+#### [Get Bulk Create Coupon Codes Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_create_coupon_codes_job)
```ruby
-KlaviyoAPI::Coupons.get_coupon_code(id, opts)
+KlaviyoAPI::Coupons.get_bulk_create_coupon_codes_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Coupons.get_coupon_code_bulk_create_job(job_id, opts)
```
-#### [Get Coupon Code Bulk Create Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_code_bulk_create_job)
+#### [Get Code IDs for Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/get_code_ids_for_coupon)
```ruby
-KlaviyoAPI::Coupons.get_coupon_code_bulk_create_job(job_id, opts)
+KlaviyoAPI::Coupons.get_code_ids_for_coupon(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Coupons.get_coupon_code_relationships_coupon(id, opts)
```
-#### [Get Coupon Code Bulk Create Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_code_bulk_create_jobs)
+#### [Get Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon)
```ruby
-KlaviyoAPI::Coupons.get_coupon_code_bulk_create_jobs(opts)
+KlaviyoAPI::Coupons.get_coupon(id, opts)
```
-#### [Get Coupon Code Relationships Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_code_relationships_coupon)
+#### [Get Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon_code)
```ruby
-KlaviyoAPI::Coupons.get_coupon_code_relationships_coupon(id, opts)
+KlaviyoAPI::Coupons.get_coupon_code(id, opts)
```
-#### [Get Coupon Codes](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_codes)
+#### [Get Coupon Codes](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon_codes)
```ruby
KlaviyoAPI::Coupons.get_coupon_codes(opts)
@@ -1518,7 +1708,7 @@ KlaviyoAPI::Coupons.get_coupon_codes(opts)
-#### [Get Coupon Codes For Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_codes_for_coupon)
+#### [Get Coupon Codes For Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon_codes_for_coupon)
```ruby
KlaviyoAPI::Coupons.get_coupon_codes_for_coupon(id, opts)
@@ -1532,7 +1722,7 @@ KlaviyoAPI::Coupons.get_coupon_coupon_codes(id, opts)
-#### [Get Coupon For Coupon Code](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_for_coupon_code)
+#### [Get Coupon For Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon_for_coupon_code)
```ruby
KlaviyoAPI::Coupons.get_coupon_for_coupon_code(id, opts)
@@ -1546,41 +1736,31 @@ KlaviyoAPI::Coupons.get_coupon_code_coupon(id, opts)
-#### [Get Coupon Relationships Coupon Codes](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupon_relationships_coupon_codes)
+#### [Get Coupon ID for Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupon_id_for_coupon_code)
```ruby
-KlaviyoAPI::Coupons.get_coupon_relationships_coupon_codes(id)
+KlaviyoAPI::Coupons.get_coupon_id_for_coupon_code(id)
```
-
-
-
-
-
-#### [Get Coupons](https://developers.klaviyo.com/en/v2024-07-15/reference/get_coupons)
-
+##### Method alias:
```ruby
-KlaviyoAPI::Coupons.get_coupons(opts)
+KlaviyoAPI::Coupons.get_coupon_relationships_coupon_codes(id)
```
-#### [Spawn Coupon Code Bulk Create Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_coupon_code_bulk_create_job)
+#### [Get Coupons](https://developers.klaviyo.com/en/v2024-10-15/reference/get_coupons)
```ruby
-KlaviyoAPI::Coupons.spawn_coupon_code_bulk_create_job(body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Coupons.create_coupon_code_bulk_create_job(body)
+KlaviyoAPI::Coupons.get_coupons(opts)
```
-#### [Update Coupon](https://developers.klaviyo.com/en/v2024-07-15/reference/update_coupon)
+#### [Update Coupon](https://developers.klaviyo.com/en/v2024-10-15/reference/update_coupon)
```ruby
KlaviyoAPI::Coupons.update_coupon(id, body)
@@ -1590,7 +1770,7 @@ KlaviyoAPI::Coupons.update_coupon(id, body)
-#### [Update Coupon Code](https://developers.klaviyo.com/en/v2024-07-15/reference/update_coupon_code)
+#### [Update Coupon Code](https://developers.klaviyo.com/en/v2024-10-15/reference/update_coupon_code)
```ruby
KlaviyoAPI::Coupons.update_coupon_code(id, body)
@@ -1604,7 +1784,7 @@ KlaviyoAPI::Coupons.update_coupon_code(id, body)
## Data Privacy
-#### [Request Profile Deletion](https://developers.klaviyo.com/en/v2024-07-15/reference/request_profile_deletion)
+#### [Request Profile Deletion](https://developers.klaviyo.com/en/v2024-10-15/reference/request_profile_deletion)
```ruby
KlaviyoAPI::DataPrivacy.request_profile_deletion(body)
@@ -1622,7 +1802,7 @@ KlaviyoAPI::DataPrivacy.create_data_privacy_deletion_job(body)
## Events
-#### [Bulk Create Events](https://developers.klaviyo.com/en/v2024-07-15/reference/bulk_create_events)
+#### [Bulk Create Events](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_create_events)
```ruby
KlaviyoAPI::Events.bulk_create_events(body)
@@ -1636,7 +1816,7 @@ KlaviyoAPI::Events.create_event_bulk_create_job(body)
-#### [Create Event](https://developers.klaviyo.com/en/v2024-07-15/reference/create_event)
+#### [Create Event](https://developers.klaviyo.com/en/v2024-10-15/reference/create_event)
```ruby
KlaviyoAPI::Events.create_event(body)
@@ -1646,7 +1826,7 @@ KlaviyoAPI::Events.create_event(body)
-#### [Get Event](https://developers.klaviyo.com/en/v2024-07-15/reference/get_event)
+#### [Get Event](https://developers.klaviyo.com/en/v2024-10-15/reference/get_event)
```ruby
KlaviyoAPI::Events.get_event(id, opts)
@@ -1656,7 +1836,7 @@ KlaviyoAPI::Events.get_event(id, opts)
-#### [Get Event Metric](https://developers.klaviyo.com/en/v2024-07-15/reference/get_event_metric)
+#### [Get Event Metric](https://developers.klaviyo.com/en/v2024-10-15/reference/get_event_metric)
```ruby
KlaviyoAPI::Events.get_event_metric(id, opts)
@@ -1666,7 +1846,7 @@ KlaviyoAPI::Events.get_event_metric(id, opts)
-#### [Get Event Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/get_event_profile)
+#### [Get Event Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_event_profile)
```ruby
KlaviyoAPI::Events.get_event_profile(id, opts)
@@ -1676,30 +1856,38 @@ KlaviyoAPI::Events.get_event_profile(id, opts)
-#### [Get Event Relationships Metric](https://developers.klaviyo.com/en/v2024-07-15/reference/get_event_relationships_metric)
+#### [Get Events](https://developers.klaviyo.com/en/v2024-10-15/reference/get_events)
```ruby
-KlaviyoAPI::Events.get_event_relationships_metric(id)
+KlaviyoAPI::Events.get_events(opts)
```
-#### [Get Event Relationships Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/get_event_relationships_profile)
+#### [Get Metric ID for Event](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_id_for_event)
```ruby
-KlaviyoAPI::Events.get_event_relationships_profile(id)
+KlaviyoAPI::Events.get_metric_id_for_event(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Events.get_event_relationships_metric(id)
```
-#### [Get Events](https://developers.klaviyo.com/en/v2024-07-15/reference/get_events)
+#### [Get Profile ID for Event](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profile_id_for_event)
```ruby
-KlaviyoAPI::Events.get_events(opts)
+KlaviyoAPI::Events.get_profile_id_for_event(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Events.get_event_relationships_profile(id)
```
@@ -1710,7 +1898,7 @@ KlaviyoAPI::Events.get_events(opts)
## Flows
-#### [Delete Flow](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_flow)
+#### [Delete Flow](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_flow)
```ruby
KlaviyoAPI::Flows.delete_flow(id)
@@ -1720,77 +1908,93 @@ KlaviyoAPI::Flows.delete_flow(id)
-#### [Get Flow](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow)
+#### [Get Action ID for Flow Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_action_id_for_flow_message)
```ruby
-KlaviyoAPI::Flows.get_flow(id, opts)
+KlaviyoAPI::Flows.get_action_id_for_flow_message(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_message_relationships_action(id)
```
-#### [Get Flow Action](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_action)
+#### [Get Action IDs for Flow](https://developers.klaviyo.com/en/v2024-10-15/reference/get_action_ids_for_flow)
```ruby
-KlaviyoAPI::Flows.get_flow_action(id, opts)
+KlaviyoAPI::Flows.get_action_ids_for_flow(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_relationships_flow_actions(id, opts)
```
-#### [Get Flow For Flow Action](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_action_flow)
+#### [Get Actions for Flow](https://developers.klaviyo.com/en/v2024-10-15/reference/get_actions_for_flow)
```ruby
-KlaviyoAPI::Flows.get_flow_action_flow(id, opts)
+KlaviyoAPI::Flows.get_actions_for_flow(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_flow_actions(id, opts)
```
-#### [Get Flow Action Messages](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_action_messages)
+#### [Get Flow](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow)
```ruby
-KlaviyoAPI::Flows.get_flow_action_messages(id, opts)
+KlaviyoAPI::Flows.get_flow(id, opts)
```
-#### [Get Flow Action Relationships Flow](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_action_relationships_flow)
+#### [Get Flow Action](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_action)
```ruby
-KlaviyoAPI::Flows.get_flow_action_relationships_flow(id)
+KlaviyoAPI::Flows.get_flow_action(id, opts)
```
-#### [Get Flow Action Relationships Messages](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_action_relationships_messages)
+#### [Get Flow For Flow Action](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_action_flow)
```ruby
-KlaviyoAPI::Flows.get_flow_action_relationships_messages(id, opts)
+KlaviyoAPI::Flows.get_flow_action_flow(id, opts)
```
-#### [Get Flow Flow Actions](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_flow_actions)
+#### [Get Flow ID for Flow Action](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_id_for_flow_action)
```ruby
-KlaviyoAPI::Flows.get_flow_flow_actions(id, opts)
+KlaviyoAPI::Flows.get_flow_id_for_flow_action(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_action_relationships_flow(id)
```
-#### [Get Flow Message](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_message)
+#### [Get Flow Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_message)
```ruby
KlaviyoAPI::Flows.get_flow_message(id, opts)
@@ -1800,7 +2004,7 @@ KlaviyoAPI::Flows.get_flow_message(id, opts)
-#### [Get Flow Action For Message](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_message_action)
+#### [Get Flow Action For Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_message_action)
```ruby
KlaviyoAPI::Flows.get_flow_message_action(id, opts)
@@ -1810,48 +2014,60 @@ KlaviyoAPI::Flows.get_flow_message_action(id, opts)
-#### [Get Flow Message Relationships Action](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_message_relationships_action)
+#### [Get Flow Tags](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_tags)
```ruby
-KlaviyoAPI::Flows.get_flow_message_relationships_action(id)
+KlaviyoAPI::Flows.get_flow_tags(id, opts)
```
-#### [Get Flow Message Relationships Template](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_message_relationships_template)
+#### [Get Flows](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flows)
```ruby
-KlaviyoAPI::Flows.get_flow_message_relationships_template(id)
+KlaviyoAPI::Flows.get_flows(opts)
```
-#### [Get Flow Message Template](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_message_template)
+#### [Get Message IDs for Flow Action](https://developers.klaviyo.com/en/v2024-10-15/reference/get_message_ids_for_flow_action)
```ruby
-KlaviyoAPI::Flows.get_flow_message_template(id, opts)
+KlaviyoAPI::Flows.get_message_ids_for_flow_action(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_action_relationships_messages(id, opts)
```
-#### [Get Flow Relationships Flow Actions](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_relationships_flow_actions)
+#### [Get Messages for Flow Action](https://developers.klaviyo.com/en/v2024-10-15/reference/get_messages_for_flow_action)
```ruby
-KlaviyoAPI::Flows.get_flow_relationships_flow_actions(id, opts)
+KlaviyoAPI::Flows.get_messages_for_flow_action(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_action_messages(id, opts)
```
-#### [Get Flow Relationships Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_relationships_tags)
+#### [Get Tag IDs for Flow](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_ids_for_flow)
+```ruby
+KlaviyoAPI::Flows.get_tag_ids_for_flow(id)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Flows.get_flow_relationships_tags(id)
```
@@ -1860,27 +2076,35 @@ KlaviyoAPI::Flows.get_flow_relationships_tags(id)
-#### [Get Flow Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flow_tags)
+#### [Get Template for Flow Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_template_for_flow_message)
```ruby
-KlaviyoAPI::Flows.get_flow_tags(id, opts)
+KlaviyoAPI::Flows.get_template_for_flow_message(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_message_template(id, opts)
```
-#### [Get Flows](https://developers.klaviyo.com/en/v2024-07-15/reference/get_flows)
+#### [Get Template ID for Flow Message](https://developers.klaviyo.com/en/v2024-10-15/reference/get_template_id_for_flow_message)
```ruby
-KlaviyoAPI::Flows.get_flows(opts)
+KlaviyoAPI::Flows.get_template_id_for_flow_message(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Flows.get_flow_message_relationships_template(id)
```
-#### [Update Flow Status](https://developers.klaviyo.com/en/v2024-07-15/reference/update_flow)
+#### [Update Flow Status](https://developers.klaviyo.com/en/v2024-10-15/reference/update_flow)
```ruby
KlaviyoAPI::Flows.update_flow(id, body)
@@ -1894,7 +2118,7 @@ KlaviyoAPI::Flows.update_flow(id, body)
## Forms
-#### [Get Form](https://developers.klaviyo.com/en/v2024-07-15/reference/get_form)
+#### [Get Form](https://developers.klaviyo.com/en/v2024-10-15/reference/get_form)
```ruby
KlaviyoAPI::Forms.get_form(id, opts)
@@ -1904,7 +2128,7 @@ KlaviyoAPI::Forms.get_form(id, opts)
-#### [Get Form for Form Version](https://developers.klaviyo.com/en/v2024-07-15/reference/get_form_for_form_version)
+#### [Get Form for Form Version](https://developers.klaviyo.com/en/v2024-10-15/reference/get_form_for_form_version)
```ruby
KlaviyoAPI::Forms.get_form_for_form_version(id, opts)
@@ -1918,7 +2142,7 @@ KlaviyoAPI::Forms.get_form_version_form(id, opts)
-#### [Get Form ID for Form Version](https://developers.klaviyo.com/en/v2024-07-15/reference/get_form_id_for_form_version)
+#### [Get Form ID for Form Version](https://developers.klaviyo.com/en/v2024-10-15/reference/get_form_id_for_form_version)
```ruby
KlaviyoAPI::Forms.get_form_id_for_form_version(id)
@@ -1932,7 +2156,7 @@ KlaviyoAPI::Forms.get_form_version_relationships_form(id)
-#### [Get Form Version](https://developers.klaviyo.com/en/v2024-07-15/reference/get_form_version)
+#### [Get Form Version](https://developers.klaviyo.com/en/v2024-10-15/reference/get_form_version)
```ruby
KlaviyoAPI::Forms.get_form_version(id, opts)
@@ -1942,7 +2166,7 @@ KlaviyoAPI::Forms.get_form_version(id, opts)
-#### [Get Forms](https://developers.klaviyo.com/en/v2024-07-15/reference/get_forms)
+#### [Get Forms](https://developers.klaviyo.com/en/v2024-10-15/reference/get_forms)
```ruby
KlaviyoAPI::Forms.get_forms(opts)
@@ -1952,7 +2176,7 @@ KlaviyoAPI::Forms.get_forms(opts)
-#### [Get Version IDs for Form](https://developers.klaviyo.com/en/v2024-07-15/reference/get_version_ids_for_form)
+#### [Get Version IDs for Form](https://developers.klaviyo.com/en/v2024-10-15/reference/get_version_ids_for_form)
```ruby
KlaviyoAPI::Forms.get_version_ids_for_form(id)
@@ -1966,7 +2190,7 @@ KlaviyoAPI::Forms.get_form_relationships_form_versions(id)
-#### [Get Versions for Form](https://developers.klaviyo.com/en/v2024-07-15/reference/get_versions_for_form)
+#### [Get Versions for Form](https://developers.klaviyo.com/en/v2024-10-15/reference/get_versions_for_form)
```ruby
KlaviyoAPI::Forms.get_versions_for_form(id, opts)
@@ -1984,7 +2208,7 @@ KlaviyoAPI::Forms.get_form_form_versions(id, opts)
## Images
-#### [Get Image](https://developers.klaviyo.com/en/v2024-07-15/reference/get_image)
+#### [Get Image](https://developers.klaviyo.com/en/v2024-10-15/reference/get_image)
```ruby
KlaviyoAPI::Images.get_image(id, opts)
@@ -1994,7 +2218,7 @@ KlaviyoAPI::Images.get_image(id, opts)
-#### [Get Images](https://developers.klaviyo.com/en/v2024-07-15/reference/get_images)
+#### [Get Images](https://developers.klaviyo.com/en/v2024-10-15/reference/get_images)
```ruby
KlaviyoAPI::Images.get_images(opts)
@@ -2004,7 +2228,7 @@ KlaviyoAPI::Images.get_images(opts)
-#### [Update Image](https://developers.klaviyo.com/en/v2024-07-15/reference/update_image)
+#### [Update Image](https://developers.klaviyo.com/en/v2024-10-15/reference/update_image)
```ruby
KlaviyoAPI::Images.update_image(id, body)
@@ -2014,7 +2238,7 @@ KlaviyoAPI::Images.update_image(id, body)
-#### [Upload Image From File](https://developers.klaviyo.com/en/v2024-07-15/reference/upload_image_from_file)
+#### [Upload Image From File](https://developers.klaviyo.com/en/v2024-10-15/reference/upload_image_from_file)
```ruby
KlaviyoAPI::Images.upload_image_from_file(file, opts)
@@ -2028,7 +2252,7 @@ KlaviyoAPI::Images.create_image_upload(file, opts)
-#### [Upload Image From URL](https://developers.klaviyo.com/en/v2024-07-15/reference/upload_image_from_url)
+#### [Upload Image From URL](https://developers.klaviyo.com/en/v2024-10-15/reference/upload_image_from_url)
```ruby
KlaviyoAPI::Images.upload_image_from_url(body)
@@ -2046,7 +2270,7 @@ KlaviyoAPI::Images.create_image(body)
## Lists
-#### [Create List](https://developers.klaviyo.com/en/v2024-07-15/reference/create_list)
+#### [Create List](https://developers.klaviyo.com/en/v2024-10-15/reference/create_list)
```ruby
KlaviyoAPI::Lists.create_list(body)
@@ -2056,7 +2280,7 @@ KlaviyoAPI::Lists.create_list(body)
-#### [Add Profile To List](https://developers.klaviyo.com/en/v2024-07-15/reference/create_list_relationships)
+#### [Add Profile To List](https://developers.klaviyo.com/en/v2024-10-15/reference/create_list_relationships)
```ruby
KlaviyoAPI::Lists.create_list_relationships(id, body)
@@ -2070,7 +2294,7 @@ KlaviyoAPI::Lists.create_list_relationships_profile(id, body)
-#### [Delete List](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_list)
+#### [Delete List](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_list)
```ruby
KlaviyoAPI::Lists.delete_list(id)
@@ -2080,7 +2304,7 @@ KlaviyoAPI::Lists.delete_list(id)
-#### [Remove Profile From List](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_list_relationships)
+#### [Remove Profile From List](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_list_relationships)
```ruby
KlaviyoAPI::Lists.delete_list_relationships(id, body)
@@ -2094,7 +2318,7 @@ KlaviyoAPI::Lists.delete_list_relationships_profiles(id, body)
-#### [Get List](https://developers.klaviyo.com/en/v2024-07-15/reference/get_list)
+#### [Get List](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list)
```ruby
KlaviyoAPI::Lists.get_list(id, opts)
@@ -2104,37 +2328,37 @@ KlaviyoAPI::Lists.get_list(id, opts)
-#### [Get List Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_list_profiles)
+#### [Get List Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_flow_triggers)
```ruby
-KlaviyoAPI::Lists.get_list_profiles(id, opts)
+KlaviyoAPI::Lists.get_list_flow_triggers(id, opts)
```
-#### [Get List Relationships Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_list_relationships_profiles)
+#### [Get List Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_profiles)
```ruby
-KlaviyoAPI::Lists.get_list_relationships_profiles(id, opts)
+KlaviyoAPI::Lists.get_list_profiles(id, opts)
```
-#### [Get List Relationships Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_list_relationships_tags)
+#### [Get List Relationships Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_relationships_flow_triggers)
```ruby
-KlaviyoAPI::Lists.get_list_relationships_tags(id)
+KlaviyoAPI::Lists.get_list_relationships_flow_triggers(id)
```
-#### [Get List Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_list_tags)
+#### [Get List Tags](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_tags)
```ruby
KlaviyoAPI::Lists.get_list_tags(id, opts)
@@ -2144,7 +2368,7 @@ KlaviyoAPI::Lists.get_list_tags(id, opts)
-#### [Get Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_lists)
+#### [Get Lists](https://developers.klaviyo.com/en/v2024-10-15/reference/get_lists)
```ruby
KlaviyoAPI::Lists.get_lists(opts)
@@ -2154,7 +2378,35 @@ KlaviyoAPI::Lists.get_lists(opts)
-#### [Update List](https://developers.klaviyo.com/en/v2024-07-15/reference/update_list)
+#### [Get Profile IDs for List](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profile_ids_for_list)
+
+```ruby
+KlaviyoAPI::Lists.get_profile_ids_for_list(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Lists.get_list_relationships_profiles(id, opts)
+```
+
+
+
+
+
+#### [Get Tag IDs for List](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_ids_for_list)
+
+```ruby
+KlaviyoAPI::Lists.get_tag_ids_for_list(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Lists.get_list_relationships_tags(id)
+```
+
+
+
+
+
+#### [Update List](https://developers.klaviyo.com/en/v2024-10-15/reference/update_list)
```ruby
KlaviyoAPI::Lists.update_list(id, body)
@@ -2168,7 +2420,7 @@ KlaviyoAPI::Lists.update_list(id, body)
## Metrics
-#### [Get Metric](https://developers.klaviyo.com/en/v2024-07-15/reference/get_metric)
+#### [Get Metric](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric)
```ruby
KlaviyoAPI::Metrics.get_metric(id, opts)
@@ -2178,20 +2430,106 @@ KlaviyoAPI::Metrics.get_metric(id, opts)
-#### [Get Metrics](https://developers.klaviyo.com/en/v2024-07-15/reference/get_metrics)
+#### [Get Metric Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_flow_triggers)
```ruby
-KlaviyoAPI::Metrics.get_metrics(opts)
+KlaviyoAPI::Metrics.get_metric_flow_triggers(id, opts)
```
-#### [Query Metric Aggregates](https://developers.klaviyo.com/en/v2024-07-15/reference/query_metric_aggregates)
+#### [Get Metric for Metric Property](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_for_metric_property)
```ruby
-KlaviyoAPI::Metrics.query_metric_aggregates(body)
+KlaviyoAPI::Metrics.get_metric_for_metric_property(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Metrics.get_metric_property_metric(id, opts)
+```
+
+
+
+
+
+#### [Get Metric ID for Metric Property](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_id_for_metric_property)
+
+```ruby
+KlaviyoAPI::Metrics.get_metric_id_for_metric_property(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Metrics.get_metric_property_relationships_metric(id)
+```
+
+
+
+
+
+#### [Get Metric Property](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_property)
+
+```ruby
+KlaviyoAPI::Metrics.get_metric_property(id, opts)
+```
+
+
+
+
+
+#### [Get Metric Relationships Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metric_relationships_flow_triggers)
+
+```ruby
+KlaviyoAPI::Metrics.get_metric_relationships_flow_triggers(id)
+```
+
+
+
+
+
+#### [Get Metrics](https://developers.klaviyo.com/en/v2024-10-15/reference/get_metrics)
+
+```ruby
+KlaviyoAPI::Metrics.get_metrics(opts)
+```
+
+
+
+
+
+#### [Get Properties for Metric](https://developers.klaviyo.com/en/v2024-10-15/reference/get_properties_for_metric)
+
+```ruby
+KlaviyoAPI::Metrics.get_properties_for_metric(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Metrics.get_metric_metric_properties(id, opts)
+```
+
+
+
+
+
+#### [Get Property IDs for Metric](https://developers.klaviyo.com/en/v2024-10-15/reference/get_property_ids_for_metric)
+
+```ruby
+KlaviyoAPI::Metrics.get_property_ids_for_metric(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Metrics.get_metric_relationships_metric_properties(id)
+```
+
+
+
+
+
+#### [Query Metric Aggregates](https://developers.klaviyo.com/en/v2024-10-15/reference/query_metric_aggregates)
+
+```ruby
+KlaviyoAPI::Metrics.query_metric_aggregates(body)
```
##### Method alias:
```ruby
@@ -2206,7 +2544,79 @@ KlaviyoAPI::Metrics.create_metric_aggregate(body)
## Profiles
-#### [Create or Update Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/create_or_update_profile)
+#### [Bulk Subscribe Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_subscribe_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.bulk_subscribe_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.subscribe_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_subscription_bulk_create_job(body)
+```
+
+
+
+
+
+#### [Bulk Suppress Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_suppress_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.bulk_suppress_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.suppress_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_suppression_bulk_create_job(body)
+```
+
+
+
+
+
+#### [Bulk Unsubscribe Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_unsubscribe_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.bulk_unsubscribe_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.unsubscribe_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_subscription_bulk_delete_job(body)
+```
+
+
+
+
+
+#### [Bulk Unsuppress Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/bulk_unsuppress_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.bulk_unsuppress_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.unsuppress_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_suppression_bulk_delete_job(body)
+```
+
+
+
+
+
+#### [Create or Update Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/create_or_update_profile)
```ruby
KlaviyoAPI::Profiles.create_or_update_profile(body)
@@ -2220,7 +2630,7 @@ KlaviyoAPI::Profiles.create_profile_import(body)
-#### [Create Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/create_profile)
+#### [Create Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/create_profile)
```ruby
KlaviyoAPI::Profiles.create_profile(body)
@@ -2230,7 +2640,7 @@ KlaviyoAPI::Profiles.create_profile(body)
-#### [Create or Update Push Token](https://developers.klaviyo.com/en/v2024-07-15/reference/create_push_token)
+#### [Create or Update Push Token](https://developers.klaviyo.com/en/v2024-10-15/reference/create_push_token)
```ruby
KlaviyoAPI::Profiles.create_push_token(body)
@@ -2240,8 +2650,12 @@ KlaviyoAPI::Profiles.create_push_token(body)
-#### [Get Bulk Profile Import Job](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job)
+#### [Get Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_import_profiles_job)
+```ruby
+KlaviyoAPI::Profiles.get_bulk_import_profiles_job(job_id, opts)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Profiles.get_bulk_profile_import_job(job_id, opts)
```
@@ -2254,284 +2668,538 @@ KlaviyoAPI::Profiles.get_profile_bulk_import_job(job_id, opts)
-#### [Get Bulk Profile Import Job Errors](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job_import_errors)
+#### [Get Bulk Import Profiles Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_import_profiles_jobs)
+
+```ruby
+KlaviyoAPI::Profiles.get_bulk_import_profiles_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_jobs(opts)
+```
+
+
+
+
+
+#### [Get Bulk Suppress Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_suppress_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_bulk_suppress_profiles_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_suppression_bulk_create_job(job_id, opts)
+```
+
+
+
+
+
+#### [Get Bulk Suppress Profiles Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_suppress_profiles_jobs)
+
+```ruby
+KlaviyoAPI::Profiles.get_bulk_suppress_profiles_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_suppression_bulk_create_jobs(opts)
+```
+
+
+
+
+
+#### [Get Bulk Unsuppress Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_unsuppress_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_bulk_unsuppress_profiles_job(job_id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_suppression_bulk_delete_job(job_id, opts)
+```
+
+
+
+
+
+#### [Get Bulk Unsuppress Profiles Jobs](https://developers.klaviyo.com/en/v2024-10-15/reference/get_bulk_unsuppress_profiles_jobs)
+
+```ruby
+KlaviyoAPI::Profiles.get_bulk_unsuppress_profiles_jobs(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_suppression_bulk_delete_jobs(opts)
+```
+
+
+
+
+
+#### [Get Errors for Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_errors_for_bulk_import_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_errors_for_bulk_import_profiles_job(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_job_import_errors(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_job_import_errors(id, opts)
+```
+
+
+
+
+
+#### [Get List for Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_for_bulk_import_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_list_for_bulk_import_profiles_job(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_job_lists(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_job_lists(id, opts)
+```
+
+
+
+
+
+#### [Get List IDs for Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_ids_for_bulk_import_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_list_ids_for_bulk_import_profiles_job(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_job_relationships_lists(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_job_relationships_lists(id)
+```
+
+
+
+
+
+#### [Get List IDs for Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_ids_for_profile)
+
+```ruby
+KlaviyoAPI::Profiles.get_list_ids_for_profile(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_relationships_lists(id)
+```
+
+
+
+
+
+#### [Get Lists for Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_lists_for_profile)
+
+```ruby
+KlaviyoAPI::Profiles.get_lists_for_profile(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_lists(id, opts)
+```
+
+
+
+
+
+#### [Get Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profile)
+
+```ruby
+KlaviyoAPI::Profiles.get_profile(id, opts)
+```
+
+
+
+
+
+#### [Get Profile IDs for Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profile_ids_for_bulk_import_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_profile_ids_for_bulk_import_profiles_job(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_job_relationships_profiles(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_job_relationships_profiles(id, opts)
+```
+
+
+
+
+
+#### [Get Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.get_profiles(opts)
+```
+
+
+
+
+
+#### [Get Profiles for Bulk Import Profiles Job](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profiles_for_bulk_import_profiles_job)
+
+```ruby
+KlaviyoAPI::Profiles.get_profiles_for_bulk_import_profiles_job(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_bulk_profile_import_job_profiles(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_bulk_import_job_profiles(id, opts)
+```
+
+
+
+
+
+#### [Get Segment IDs for Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segment_ids_for_profile)
+
+```ruby
+KlaviyoAPI::Profiles.get_segment_ids_for_profile(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_relationships_segments(id)
+```
+
+
+
+
+
+#### [Get Segments for Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segments_for_profile)
+
+```ruby
+KlaviyoAPI::Profiles.get_segments_for_profile(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.get_profile_segments(id, opts)
+```
+
+
+
+
+
+#### [Merge Profiles](https://developers.klaviyo.com/en/v2024-10-15/reference/merge_profiles)
+
+```ruby
+KlaviyoAPI::Profiles.merge_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_merge(body)
+```
+
+
+
+
+
+#### [Spawn Bulk Profile Import Job](https://developers.klaviyo.com/en/v2024-10-15/reference/spawn_bulk_profile_import_job)
+
+```ruby
+KlaviyoAPI::Profiles.spawn_bulk_profile_import_job(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.bulk_import_profiles(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Profiles.create_profile_bulk_import_job(body)
+```
+
+
+
+
+
+#### [Update Profile](https://developers.klaviyo.com/en/v2024-10-15/reference/update_profile)
+
+```ruby
+KlaviyoAPI::Profiles.update_profile(id, body)
+```
+
+
+
+
+
+
+## Reporting
+
+
+#### [Query Campaign Values](https://developers.klaviyo.com/en/v2024-10-15/reference/query_campaign_values)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_job_import_errors(id, opts)
+KlaviyoAPI::Reporting.query_campaign_values(body, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_job_import_errors(id, opts)
+KlaviyoAPI::Reporting.create_campaign_value_report(body, opts)
```
-#### [Get Bulk Profile Import Job Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job_lists)
+#### [Query Flow Series](https://developers.klaviyo.com/en/v2024-10-15/reference/query_flow_series)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_job_lists(id, opts)
+KlaviyoAPI::Reporting.query_flow_series(body, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_job_lists(id, opts)
+KlaviyoAPI::Reporting.create_flow_sery_report(body, opts)
```
-#### [Get Bulk Profile Import Job Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job_profiles)
+#### [Query Flow Values](https://developers.klaviyo.com/en/v2024-10-15/reference/query_flow_values)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_job_profiles(id, opts)
+KlaviyoAPI::Reporting.query_flow_values(body, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_job_profiles(id, opts)
+KlaviyoAPI::Reporting.create_flow_value_report(body, opts)
```
-#### [Get Bulk Profile Import Job Relationships Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job_relationships_lists)
+#### [Query Form Series](https://developers.klaviyo.com/en/v2024-10-15/reference/query_form_series)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_job_relationships_lists(id)
+KlaviyoAPI::Reporting.query_form_series(body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_job_relationships_lists(id)
+KlaviyoAPI::Reporting.create_form_sery_report(body)
```
-#### [Get Bulk Profile Import Job Relationships Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_job_relationships_profiles)
+#### [Query Form Values](https://developers.klaviyo.com/en/v2024-10-15/reference/query_form_values)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_job_relationships_profiles(id, opts)
+KlaviyoAPI::Reporting.query_form_values(body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_job_relationships_profiles(id, opts)
+KlaviyoAPI::Reporting.create_form_value_report(body)
```
-#### [Get Bulk Profile Import Jobs](https://developers.klaviyo.com/en/v2024-07-15/reference/get_bulk_profile_import_jobs)
+#### [Query Segment Series](https://developers.klaviyo.com/en/v2024-10-15/reference/query_segment_series)
```ruby
-KlaviyoAPI::Profiles.get_bulk_profile_import_jobs(opts)
+KlaviyoAPI::Reporting.query_segment_series(body)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.get_profile_bulk_import_jobs(opts)
+KlaviyoAPI::Reporting.create_segment_sery_report(body)
```
-#### [Get Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profile)
+#### [Query Segment Values](https://developers.klaviyo.com/en/v2024-10-15/reference/query_segment_values)
```ruby
-KlaviyoAPI::Profiles.get_profile(id, opts)
+KlaviyoAPI::Reporting.query_segment_values(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Reporting.create_segment_value_report(body)
```
-#### [Get Profile Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profile_lists)
-
-```ruby
-KlaviyoAPI::Profiles.get_profile_lists(id, opts)
-```
-
-
+## Reviews
-#### [Get Profile Relationships Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profile_relationships_lists)
+#### [Get Review](https://developers.klaviyo.com/en/v2024-10-15/reference/get_review)
```ruby
-KlaviyoAPI::Profiles.get_profile_relationships_lists(id)
+KlaviyoAPI::Reviews.get_review(id, opts)
```
-#### [Get Profile Relationships Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profile_relationships_segments)
+#### [Get Reviews](https://developers.klaviyo.com/en/v2024-10-15/reference/get_reviews)
```ruby
-KlaviyoAPI::Profiles.get_profile_relationships_segments(id)
+KlaviyoAPI::Reviews.get_reviews(opts)
```
-#### [Get Profile Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profile_segments)
-
-```ruby
-KlaviyoAPI::Profiles.get_profile_segments(id, opts)
-```
-
-
+## Segments
-#### [Get Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_profiles)
+#### [Create Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/create_segment)
```ruby
-KlaviyoAPI::Profiles.get_profiles(opts)
+KlaviyoAPI::Segments.create_segment(body)
```
-#### [Merge Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/merge_profiles)
+#### [Delete Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_segment)
```ruby
-KlaviyoAPI::Profiles.merge_profiles(body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Profiles.create_profile_merge(body)
+KlaviyoAPI::Segments.delete_segment(id)
```
-#### [Spawn Bulk Profile Import Job](https://developers.klaviyo.com/en/v2024-07-15/reference/spawn_bulk_profile_import_job)
+#### [Get Profile IDs for Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profile_ids_for_segment)
```ruby
-KlaviyoAPI::Profiles.spawn_bulk_profile_import_job(body)
+KlaviyoAPI::Segments.get_profile_ids_for_segment(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.create_profile_bulk_import_job(body)
+KlaviyoAPI::Segments.get_segment_relationships_profiles(id, opts)
```
-#### [Subscribe Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/subscribe_profiles)
+#### [Get Profiles for Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/get_profiles_for_segment)
```ruby
-KlaviyoAPI::Profiles.subscribe_profiles(body)
+KlaviyoAPI::Segments.get_profiles_for_segment(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Profiles.create_profile_subscription_bulk_create_job(body)
+KlaviyoAPI::Segments.get_segment_profiles(id, opts)
```
-#### [Suppress Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/suppress_profiles)
+#### [Get Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segment)
```ruby
-KlaviyoAPI::Profiles.suppress_profiles(body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Profiles.create_profile_suppression_bulk_create_job(body)
+KlaviyoAPI::Segments.get_segment(id, opts)
```
-#### [Unsubscribe Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/unsubscribe_profiles)
+#### [Get Segment Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segment_flow_triggers)
```ruby
-KlaviyoAPI::Profiles.unsubscribe_profiles(body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Profiles.create_profile_subscription_bulk_delete_job(body)
+KlaviyoAPI::Segments.get_segment_flow_triggers(id, opts)
```
-#### [Unsuppress Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/unsuppress_profiles)
+#### [Get Segment Relationships Flow Triggers](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segment_relationships_flow_triggers)
```ruby
-KlaviyoAPI::Profiles.unsuppress_profiles(body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Profiles.create_profile_suppression_bulk_delete_job(body)
+KlaviyoAPI::Segments.get_segment_relationships_flow_triggers(id)
```
-#### [Update Profile](https://developers.klaviyo.com/en/v2024-07-15/reference/update_profile)
+#### [Get Segments](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segments)
```ruby
-KlaviyoAPI::Profiles.update_profile(id, body)
+KlaviyoAPI::Segments.get_segments(opts)
```
-
-## Reporting
-
-
-#### [Query Campaign Values](https://developers.klaviyo.com/en/v2024-07-15/reference/query_campaign_values)
+#### [Get Tag IDs for Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_ids_for_segment)
```ruby
-KlaviyoAPI::Reporting.query_campaign_values(body, opts)
+KlaviyoAPI::Segments.get_tag_ids_for_segment(id)
```
##### Method alias:
```ruby
-KlaviyoAPI::Reporting.create_campaign_value_report(body, opts)
+KlaviyoAPI::Segments.get_segment_relationships_tags(id)
```
-#### [Query Flow Series](https://developers.klaviyo.com/en/v2024-07-15/reference/query_flow_series)
+#### [Get Tags for Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tags_for_segment)
```ruby
-KlaviyoAPI::Reporting.query_flow_series(body, opts)
+KlaviyoAPI::Segments.get_tags_for_segment(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Reporting.create_flow_sery_report(body, opts)
+KlaviyoAPI::Segments.get_segment_tags(id, opts)
```
-#### [Query Flow Values](https://developers.klaviyo.com/en/v2024-07-15/reference/query_flow_values)
+#### [Update Segment](https://developers.klaviyo.com/en/v2024-10-15/reference/update_segment)
```ruby
-KlaviyoAPI::Reporting.query_flow_values(body, opts)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Reporting.create_flow_value_report(body, opts)
+KlaviyoAPI::Segments.update_segment(id, body)
```
@@ -2539,201 +3207,207 @@ KlaviyoAPI::Reporting.create_flow_value_report(body, opts)
-## Segments
+## Tags
-#### [Create Segment](https://developers.klaviyo.com/en/v2024-07-15/reference/create_segment)
+#### [Create Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/create_tag)
```ruby
-KlaviyoAPI::Segments.create_segment(body)
+KlaviyoAPI::Tags.create_tag(body)
```
-#### [Delete Segment](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_segment)
+#### [Create Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/create_tag_group)
```ruby
-KlaviyoAPI::Segments.delete_segment(id)
+KlaviyoAPI::Tags.create_tag_group(body)
```
-#### [Get Segment](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segment)
+#### [Delete Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_tag)
```ruby
-KlaviyoAPI::Segments.get_segment(id, opts)
+KlaviyoAPI::Tags.delete_tag(id)
```
-#### [Get Segment Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segment_profiles)
+#### [Delete Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_tag_group)
```ruby
-KlaviyoAPI::Segments.get_segment_profiles(id, opts)
+KlaviyoAPI::Tags.delete_tag_group(id)
```
-#### [Get Segment Relationships Profiles](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segment_relationships_profiles)
+#### [Get Campaign IDs for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_campaign_ids_for_tag)
```ruby
-KlaviyoAPI::Segments.get_segment_relationships_profiles(id, opts)
+KlaviyoAPI::Tags.get_campaign_ids_for_tag(id)
```
-
-
-
-
-
-#### [Get Segment Relationships Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segment_relationships_tags)
-
+##### Method alias:
```ruby
-KlaviyoAPI::Segments.get_segment_relationships_tags(id)
+KlaviyoAPI::Tags.get_tag_relationships_campaigns(id)
```
-#### [Get Segment Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segment_tags)
+#### [Get Flow IDs for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_flow_ids_for_tag)
```ruby
-KlaviyoAPI::Segments.get_segment_tags(id, opts)
+KlaviyoAPI::Tags.get_flow_ids_for_tag(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.get_tag_relationships_flows(id)
```
-#### [Get Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/get_segments)
+#### [Get List IDs for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_list_ids_for_tag)
```ruby
-KlaviyoAPI::Segments.get_segments(opts)
+KlaviyoAPI::Tags.get_list_ids_for_tag(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.get_tag_relationships_lists(id)
```
-#### [Update Segment](https://developers.klaviyo.com/en/v2024-07-15/reference/update_segment)
+#### [Get Segment IDs for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_segment_ids_for_tag)
```ruby
-KlaviyoAPI::Segments.update_segment(id, body)
+KlaviyoAPI::Tags.get_segment_ids_for_tag(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.get_tag_relationships_segments(id)
```
-
-## Tags
-
-
-#### [Create Tag](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag)
+#### [Get Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag)
```ruby
-KlaviyoAPI::Tags.create_tag(body)
+KlaviyoAPI::Tags.get_tag(id, opts)
```
-#### [Create Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag_group)
+#### [Get Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_group)
```ruby
-KlaviyoAPI::Tags.create_tag_group(body)
+KlaviyoAPI::Tags.get_tag_group(id, opts)
```
-#### [Create Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag_relationships_campaigns)
+#### [Get Tag Group for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_group_for_tag)
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_campaigns(id, body)
+KlaviyoAPI::Tags.get_tag_group_for_tag(id, opts)
```
##### Method alias:
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_campaign(id, body)
+KlaviyoAPI::Tags.get_tag_tag_group(id, opts)
```
-#### [Create Tag Relationships Flows](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag_relationships_flows)
+#### [Get Tag Group ID for Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_group_id_for_tag)
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_flows(id, body)
+KlaviyoAPI::Tags.get_tag_group_id_for_tag(id)
```
##### Method alias:
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_flow(id, body)
+KlaviyoAPI::Tags.get_tag_relationships_tag_group(id)
```
-#### [Create Tag Relationships Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag_relationships_lists)
+#### [Get Tag Groups](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_groups)
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_lists(id, body)
-```
-##### Method alias:
-```ruby
-KlaviyoAPI::Tags.create_tag_relationships_list(id, body)
+KlaviyoAPI::Tags.get_tag_groups(opts)
```
-#### [Create Tag Relationships Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/create_tag_relationships_segments)
+#### [Get Tag IDs for Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tag_ids_for_tag_group)
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_segments(id, body)
+KlaviyoAPI::Tags.get_tag_ids_for_tag_group(id)
```
##### Method alias:
```ruby
-KlaviyoAPI::Tags.create_tag_relationships_segment(id, body)
+KlaviyoAPI::Tags.get_tag_group_relationships_tags(id)
```
-#### [Delete Tag](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag)
+#### [Get Tags](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tags)
```ruby
-KlaviyoAPI::Tags.delete_tag(id)
+KlaviyoAPI::Tags.get_tags(opts)
```
-#### [Delete Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag_group)
+#### [Get Tags for Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tags_for_tag_group)
```ruby
-KlaviyoAPI::Tags.delete_tag_group(id)
+KlaviyoAPI::Tags.get_tags_for_tag_group(id, opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.get_tag_group_tags(id, opts)
```
-#### [Delete Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag_relationships_campaigns)
+#### [Remove Tag from Campaigns](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_tag_from_campaigns)
+```ruby
+KlaviyoAPI::Tags.remove_tag_from_campaigns(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Tags.delete_tag_relationships_campaigns(id, body)
```
@@ -2742,8 +3416,12 @@ KlaviyoAPI::Tags.delete_tag_relationships_campaigns(id, body)
-#### [Delete Tag Relationships Flows](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag_relationships_flows)
+#### [Remove Tag from Flows](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_tag_from_flows)
+```ruby
+KlaviyoAPI::Tags.remove_tag_from_flows(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Tags.delete_tag_relationships_flows(id, body)
```
@@ -2752,8 +3430,12 @@ KlaviyoAPI::Tags.delete_tag_relationships_flows(id, body)
-#### [Delete Tag Relationships Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag_relationships_lists)
+#### [Remove Tag from Lists](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_tag_from_lists)
+```ruby
+KlaviyoAPI::Tags.remove_tag_from_lists(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Tags.delete_tag_relationships_lists(id, body)
```
@@ -2762,8 +3444,12 @@ KlaviyoAPI::Tags.delete_tag_relationships_lists(id, body)
-#### [Delete Tag Relationships Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_tag_relationships_segments)
+#### [Remove Tag from Segments](https://developers.klaviyo.com/en/v2024-10-15/reference/remove_tag_from_segments)
+```ruby
+KlaviyoAPI::Tags.remove_tag_from_segments(id, body)
+```
+##### Method alias:
```ruby
KlaviyoAPI::Tags.delete_tag_relationships_segments(id, body)
```
@@ -2772,214 +3458,274 @@ KlaviyoAPI::Tags.delete_tag_relationships_segments(id, body)
-#### [Get Tag](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag)
+#### [Tag Campaigns](https://developers.klaviyo.com/en/v2024-10-15/reference/tag_campaigns)
```ruby
-KlaviyoAPI::Tags.get_tag(id, opts)
+KlaviyoAPI::Tags.tag_campaigns(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_campaigns(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_campaign(id, body)
```
-#### [Get Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_group)
+#### [Tag Flows](https://developers.klaviyo.com/en/v2024-10-15/reference/tag_flows)
```ruby
-KlaviyoAPI::Tags.get_tag_group(id, opts)
+KlaviyoAPI::Tags.tag_flows(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_flows(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_flow(id, body)
```
-#### [Get Tag Group Relationships Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_group_relationships_tags)
+#### [Tag Lists](https://developers.klaviyo.com/en/v2024-10-15/reference/tag_lists)
```ruby
-KlaviyoAPI::Tags.get_tag_group_relationships_tags(id)
+KlaviyoAPI::Tags.tag_lists(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_lists(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_list(id, body)
```
-#### [Get Tag Group Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_group_tags)
+#### [Tag Segments](https://developers.klaviyo.com/en/v2024-10-15/reference/tag_segments)
```ruby
-KlaviyoAPI::Tags.get_tag_group_tags(id, opts)
+KlaviyoAPI::Tags.tag_segments(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_segments(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Tags.create_tag_relationships_segment(id, body)
```
-#### [Get Tag Groups](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_groups)
+#### [Update Tag](https://developers.klaviyo.com/en/v2024-10-15/reference/update_tag)
```ruby
-KlaviyoAPI::Tags.get_tag_groups(opts)
+KlaviyoAPI::Tags.update_tag(id, body)
```
-#### [Get Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_relationships_campaigns)
+#### [Update Tag Group](https://developers.klaviyo.com/en/v2024-10-15/reference/update_tag_group)
```ruby
-KlaviyoAPI::Tags.get_tag_relationships_campaigns(id)
+KlaviyoAPI::Tags.update_tag_group(id, body)
```
-#### [Get Tag Relationships Flows](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_relationships_flows)
+
+## Templates
+
+
+#### [Clone Template](https://developers.klaviyo.com/en/v2024-10-15/reference/clone_template)
```ruby
-KlaviyoAPI::Tags.get_tag_relationships_flows(id)
+KlaviyoAPI::Templates.clone_template(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.create_template_clone(body)
```
-#### [Get Tag Relationships Lists](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_relationships_lists)
+#### [Create Template](https://developers.klaviyo.com/en/v2024-10-15/reference/create_template)
```ruby
-KlaviyoAPI::Tags.get_tag_relationships_lists(id)
+KlaviyoAPI::Templates.create_template(body)
```
-#### [Get Tag Relationships Segments](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_relationships_segments)
+#### [Create Universal Content](https://developers.klaviyo.com/en/v2024-10-15/reference/create_universal_content)
```ruby
-KlaviyoAPI::Tags.get_tag_relationships_segments(id)
+KlaviyoAPI::Templates.create_universal_content(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.create_template_universal_content(body)
```
-#### [Get Tag Relationships Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_relationships_tag_group)
+#### [Delete Template](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_template)
```ruby
-KlaviyoAPI::Tags.get_tag_relationships_tag_group(id)
+KlaviyoAPI::Templates.delete_template(id)
```
-#### [Get Tag Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tag_tag_group)
+#### [Delete Universal Content](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_universal_content)
```ruby
-KlaviyoAPI::Tags.get_tag_tag_group(id, opts)
+KlaviyoAPI::Templates.delete_universal_content(id)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.delete_template_universal_content(id)
```
-#### [Get Tags](https://developers.klaviyo.com/en/v2024-07-15/reference/get_tags)
+#### [Get All Universal Content](https://developers.klaviyo.com/en/v2024-10-15/reference/get_all_universal_content)
```ruby
-KlaviyoAPI::Tags.get_tags(opts)
+KlaviyoAPI::Templates.get_all_universal_content(opts)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.get_template_universal_content(opts)
```
-#### [Update Tag](https://developers.klaviyo.com/en/v2024-07-15/reference/update_tag)
+#### [Get Template](https://developers.klaviyo.com/en/v2024-10-15/reference/get_template)
```ruby
-KlaviyoAPI::Tags.update_tag(id, body)
+KlaviyoAPI::Templates.get_template(id, opts)
```
-#### [Update Tag Group](https://developers.klaviyo.com/en/v2024-07-15/reference/update_tag_group)
+#### [Get Templates](https://developers.klaviyo.com/en/v2024-10-15/reference/get_templates)
```ruby
-KlaviyoAPI::Tags.update_tag_group(id, body)
+KlaviyoAPI::Templates.get_templates(opts)
```
-
-## Templates
-
-
-#### [Create Template](https://developers.klaviyo.com/en/v2024-07-15/reference/create_template)
+#### [Get Universal Content](https://developers.klaviyo.com/en/v2024-10-15/reference/get_universal_content)
```ruby
-KlaviyoAPI::Templates.create_template(body)
+KlaviyoAPI::Templates.get_universal_content(id, opts)
```
-#### [Create Template Clone](https://developers.klaviyo.com/en/v2024-07-15/reference/create_template_clone)
+#### [Render Template](https://developers.klaviyo.com/en/v2024-10-15/reference/render_template)
```ruby
-KlaviyoAPI::Templates.create_template_clone(body)
+KlaviyoAPI::Templates.render_template(body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.create_template_render(body)
```
-#### [Create Template Render](https://developers.klaviyo.com/en/v2024-07-15/reference/create_template_render)
+#### [Update Template](https://developers.klaviyo.com/en/v2024-10-15/reference/update_template)
```ruby
-KlaviyoAPI::Templates.create_template_render(body)
+KlaviyoAPI::Templates.update_template(id, body)
```
-#### [Delete Template](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_template)
+#### [Update Universal Content](https://developers.klaviyo.com/en/v2024-10-15/reference/update_universal_content)
```ruby
-KlaviyoAPI::Templates.delete_template(id)
+KlaviyoAPI::Templates.update_universal_content(id, body)
+```
+##### Method alias:
+```ruby
+KlaviyoAPI::Templates.update_template_universal_content(id, body)
```
-#### [Get Template](https://developers.klaviyo.com/en/v2024-07-15/reference/get_template)
+
+## Tracking Settings
+
+
+#### [Get Tracking Setting](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tracking_setting)
```ruby
-KlaviyoAPI::Templates.get_template(id, opts)
+KlaviyoAPI::TrackingSettings.get_tracking_setting(id, opts)
```
-#### [Get Templates](https://developers.klaviyo.com/en/v2024-07-15/reference/get_templates)
+#### [Get Tracking Settings](https://developers.klaviyo.com/en/v2024-10-15/reference/get_tracking_settings)
```ruby
-KlaviyoAPI::Templates.get_templates(opts)
+KlaviyoAPI::TrackingSettings.get_tracking_settings(opts)
```
-#### [Update Template](https://developers.klaviyo.com/en/v2024-07-15/reference/update_template)
+#### [Update Tracking Setting](https://developers.klaviyo.com/en/v2024-10-15/reference/update_tracking_setting)
```ruby
-KlaviyoAPI::Templates.update_template(id, body)
+KlaviyoAPI::TrackingSettings.update_tracking_setting(id, body)
```
@@ -2990,7 +3736,7 @@ KlaviyoAPI::Templates.update_template(id, body)
## Webhooks
-#### [Create Webhook](https://developers.klaviyo.com/en/v2024-07-15/reference/create_webhook)
+#### [Create Webhook](https://developers.klaviyo.com/en/v2024-10-15/reference/create_webhook)
```ruby
KlaviyoAPI::Webhooks.create_webhook(body)
@@ -3000,7 +3746,7 @@ KlaviyoAPI::Webhooks.create_webhook(body)
-#### [Delete Webhook](https://developers.klaviyo.com/en/v2024-07-15/reference/delete_webhook)
+#### [Delete Webhook](https://developers.klaviyo.com/en/v2024-10-15/reference/delete_webhook)
```ruby
KlaviyoAPI::Webhooks.delete_webhook(id)
@@ -3010,7 +3756,7 @@ KlaviyoAPI::Webhooks.delete_webhook(id)
-#### [Get Webhook](https://developers.klaviyo.com/en/v2024-07-15/reference/get_webhook)
+#### [Get Webhook](https://developers.klaviyo.com/en/v2024-10-15/reference/get_webhook)
```ruby
KlaviyoAPI::Webhooks.get_webhook(id, opts)
@@ -3020,7 +3766,7 @@ KlaviyoAPI::Webhooks.get_webhook(id, opts)
-#### [Get Webhook Topic](https://developers.klaviyo.com/en/v2024-07-15/reference/get_webhook_topic)
+#### [Get Webhook Topic](https://developers.klaviyo.com/en/v2024-10-15/reference/get_webhook_topic)
```ruby
KlaviyoAPI::Webhooks.get_webhook_topic(id)
@@ -3030,7 +3776,7 @@ KlaviyoAPI::Webhooks.get_webhook_topic(id)
-#### [Get Webhook Topics](https://developers.klaviyo.com/en/v2024-07-15/reference/get_webhook_topics)
+#### [Get Webhook Topics](https://developers.klaviyo.com/en/v2024-10-15/reference/get_webhook_topics)
```ruby
KlaviyoAPI::Webhooks.get_webhook_topics
@@ -3040,7 +3786,7 @@ KlaviyoAPI::Webhooks.get_webhook_topics
-#### [Get Webhooks](https://developers.klaviyo.com/en/v2024-07-15/reference/get_webhooks)
+#### [Get Webhooks](https://developers.klaviyo.com/en/v2024-10-15/reference/get_webhooks)
```ruby
KlaviyoAPI::Webhooks.get_webhooks(opts)
@@ -3050,7 +3796,7 @@ KlaviyoAPI::Webhooks.get_webhooks(opts)
-#### [Update Webhook](https://developers.klaviyo.com/en/v2024-07-15/reference/update_webhook)
+#### [Update Webhook](https://developers.klaviyo.com/en/v2024-10-15/reference/update_webhook)
```ruby
KlaviyoAPI::Webhooks.update_webhook(id, body)
diff --git a/klaviyo-api-sdk.gemspec b/klaviyo-api-sdk.gemspec
index 018d5e3..470b01e 100644
--- a/klaviyo-api-sdk.gemspec
+++ b/klaviyo-api-sdk.gemspec
@@ -5,7 +5,7 @@
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
-The version of the OpenAPI document: 2024-07-15
+The version of the OpenAPI document: 2024-10-15
Contact: developers@klaviyo.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.2.1
@@ -17,7 +17,7 @@ require "klaviyo-api-sdk/version"
Gem::Specification.new do |s|
s.name = "klaviyo-api-sdk"
- s.version = "9.0.0"
+ s.version = "10.0.0"
s.authors = ['Klaviyo Team']
s.email = ['libraries@klaviyo.com']
s.summary = 'You heard us, a Ruby wrapper for the Klaviyo API'
diff --git a/lib/klaviyo-api-sdk.rb b/lib/klaviyo-api-sdk.rb
index 5f286de..030b096 100644
--- a/lib/klaviyo-api-sdk.rb
+++ b/lib/klaviyo-api-sdk.rb
@@ -3,7 +3,7 @@
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
-The version of the OpenAPI document: 2024-07-15
+The version of the OpenAPI document: 2024-10-15
Contact: developers@klaviyo.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.2.1
@@ -28,6 +28,8 @@
require 'klaviyo-api-sdk/models/back_in_stock_subscription_enum'
require 'klaviyo-api-sdk/models/base_event_create_query_resource_object'
require 'klaviyo-api-sdk/models/base_event_create_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/block_display_options'
+require 'klaviyo-api-sdk/models/block_enum'
require 'klaviyo-api-sdk/models/boolean_enum'
require 'klaviyo-api-sdk/models/boolean_filter'
require 'klaviyo-api-sdk/models/bounce_date_enum'
@@ -70,6 +72,8 @@
require 'klaviyo-api-sdk/models/campaign_send_job_partial_update_query'
require 'klaviyo-api-sdk/models/campaign_send_job_partial_update_query_resource_object'
require 'klaviyo-api-sdk/models/campaign_send_job_partial_update_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/campaign_tracking_setting_dynamic_param'
+require 'klaviyo-api-sdk/models/campaign_tracking_setting_static_param'
require 'klaviyo-api-sdk/models/campaign_values_report_enum'
require 'klaviyo-api-sdk/models/campaign_values_request_dto'
require 'klaviyo-api-sdk/models/campaign_values_request_dto_resource_object'
@@ -164,6 +168,7 @@
require 'klaviyo-api-sdk/models/constant_contact_enum'
require 'klaviyo-api-sdk/models/constant_contact_integration_filter'
require 'klaviyo-api-sdk/models/constant_contact_integration_method_filter'
+require 'klaviyo-api-sdk/models/content_repeat'
require 'klaviyo-api-sdk/models/coupon_code_bulk_create_job_enum'
require 'klaviyo-api-sdk/models/coupon_code_create_job_create_query'
require 'klaviyo-api-sdk/models/coupon_code_create_job_create_query_resource_object'
@@ -189,6 +194,7 @@
require 'klaviyo-api-sdk/models/custom_source_enum'
require 'klaviyo-api-sdk/models/custom_source_filter'
require 'klaviyo-api-sdk/models/custom_timeframe'
+require 'klaviyo-api-sdk/models/custom_tracking_param_dto'
require 'klaviyo-api-sdk/models/data_privacy_create_deletion_job_query'
require 'klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_resource_object'
require 'klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_resource_object_attributes'
@@ -199,11 +205,14 @@
require 'klaviyo-api-sdk/models/date_enum'
require 'klaviyo-api-sdk/models/device_metadata'
require 'klaviyo-api-sdk/models/double_optin_filter'
+require 'klaviyo-api-sdk/models/dynamic_enum'
+require 'klaviyo-api-sdk/models/dynamic_tracking_param'
require 'klaviyo-api-sdk/models/email_content_sub_object'
require 'klaviyo-api-sdk/models/email_enum'
require 'klaviyo-api-sdk/models/email_send_options_sub_object'
require 'klaviyo-api-sdk/models/email_subscription_parameters'
require 'klaviyo-api-sdk/models/email_tracking_options_sub_object'
+require 'klaviyo-api-sdk/models/email_tracking_options_sub_object_custom_tracking_params_inner'
require 'klaviyo-api-sdk/models/equals_enum'
require 'klaviyo-api-sdk/models/equals_string_filter'
require 'klaviyo-api-sdk/models/event_bulk_create_enum'
@@ -233,6 +242,8 @@
require 'klaviyo-api-sdk/models/flow_series_request_dto'
require 'klaviyo-api-sdk/models/flow_series_request_dto_resource_object'
require 'klaviyo-api-sdk/models/flow_series_request_dto_resource_object_attributes'
+require 'klaviyo-api-sdk/models/flow_tracking_setting_dynamic_param'
+require 'klaviyo-api-sdk/models/flow_tracking_setting_static_param'
require 'klaviyo-api-sdk/models/flow_update_query'
require 'klaviyo-api-sdk/models/flow_update_query_resource_object'
require 'klaviyo-api-sdk/models/flow_update_query_resource_object_attributes'
@@ -242,10 +253,20 @@
require 'klaviyo-api-sdk/models/flow_values_request_dto_resource_object_attributes'
require 'klaviyo-api-sdk/models/form_enum'
require 'klaviyo-api-sdk/models/form_method_filter'
+require 'klaviyo-api-sdk/models/form_series_report_enum'
+require 'klaviyo-api-sdk/models/form_series_request_dto'
+require 'klaviyo-api-sdk/models/form_series_request_dto_resource_object'
+require 'klaviyo-api-sdk/models/form_series_request_dto_resource_object_attributes'
+require 'klaviyo-api-sdk/models/form_values_report_enum'
+require 'klaviyo-api-sdk/models/form_values_request_dto'
+require 'klaviyo-api-sdk/models/form_values_request_dto_resource_object'
+require 'klaviyo-api-sdk/models/form_values_request_dto_resource_object_attributes'
require 'klaviyo-api-sdk/models/get_accounts4_xx_response'
require 'klaviyo-api-sdk/models/get_accounts4_xx_response_errors_inner'
require 'klaviyo-api-sdk/models/get_accounts4_xx_response_errors_inner_source'
require 'klaviyo-api-sdk/models/greater_than_enum'
+require 'klaviyo-api-sdk/models/html_block'
+require 'klaviyo-api-sdk/models/html_block_data'
require 'klaviyo-api-sdk/models/has_email_marketing'
require 'klaviyo-api-sdk/models/has_email_marketing_consent'
require 'klaviyo-api-sdk/models/has_email_marketing_consent_consent_status'
@@ -257,6 +278,7 @@
require 'klaviyo-api-sdk/models/has_sms_marketing_consent'
require 'klaviyo-api-sdk/models/has_sms_marketing_subscribed'
require 'klaviyo-api-sdk/models/has_sms_marketing_subscribed_filters_inner'
+require 'klaviyo-api-sdk/models/html_enum'
require 'klaviyo-api-sdk/models/image_create_query'
require 'klaviyo-api-sdk/models/image_create_query_resource_object'
require 'klaviyo-api-sdk/models/image_create_query_resource_object_attributes'
@@ -288,6 +310,7 @@
require 'klaviyo-api-sdk/models/list_partial_update_query'
require 'klaviyo-api-sdk/models/list_partial_update_query_resource_object'
require 'klaviyo-api-sdk/models/list_set_filter'
+require 'klaviyo-api-sdk/models/list_substring_filter'
require 'klaviyo-api-sdk/models/mailbox_provider_enum'
require 'klaviyo-api-sdk/models/mailbox_provider_method_filter'
require 'klaviyo-api-sdk/models/manual_add_enum'
@@ -298,7 +321,6 @@
require 'klaviyo-api-sdk/models/manual_remove_method_filter'
require 'klaviyo-api-sdk/models/manual_suppression_date_enum'
require 'klaviyo-api-sdk/models/manual_suppression_date_filter'
-require 'klaviyo-api-sdk/models/marketing_subscription_parameters'
require 'klaviyo-api-sdk/models/message_blocked_enum'
require 'klaviyo-api-sdk/models/message_blocked_method_filter'
require 'klaviyo-api-sdk/models/method_enum'
@@ -434,6 +456,15 @@
require 'klaviyo-api-sdk/models/segment_partial_update_query'
require 'klaviyo-api-sdk/models/segment_partial_update_query_resource_object'
require 'klaviyo-api-sdk/models/segment_partial_update_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/segment_series_report_enum'
+require 'klaviyo-api-sdk/models/segment_series_request_dto'
+require 'klaviyo-api-sdk/models/segment_series_request_dto_resource_object'
+require 'klaviyo-api-sdk/models/segment_series_request_dto_resource_object_attributes'
+require 'klaviyo-api-sdk/models/segment_values_report_enum'
+require 'klaviyo-api-sdk/models/segment_values_request_dto'
+require 'klaviyo-api-sdk/models/segment_values_request_dto_resource_object'
+require 'klaviyo-api-sdk/models/segment_values_request_dto_resource_object_attributes'
+require 'klaviyo-api-sdk/models/segment_values_request_dto_resource_object_attributes_timeframe'
require 'klaviyo-api-sdk/models/send_strategy_sub_object'
require 'klaviyo-api-sdk/models/server_bis_subscription_create_query'
require 'klaviyo-api-sdk/models/server_bis_subscription_create_query_resource_object'
@@ -452,7 +483,9 @@
require 'klaviyo-api-sdk/models/spam_complaint_method_filter'
require 'klaviyo-api-sdk/models/static_date_filter'
require 'klaviyo-api-sdk/models/static_date_range_filter'
+require 'klaviyo-api-sdk/models/static_enum'
require 'klaviyo-api-sdk/models/static_schedule_options'
+require 'klaviyo-api-sdk/models/static_tracking_param'
require 'klaviyo-api-sdk/models/status_date_enum'
require 'klaviyo-api-sdk/models/status_date_filter'
require 'klaviyo-api-sdk/models/status_date_filter_filter'
@@ -476,6 +509,7 @@
require 'klaviyo-api-sdk/models/subscription_delete_job_create_query_resource_object_relationships'
require 'klaviyo-api-sdk/models/subscription_delete_job_create_query_resource_object_relationships_list'
require 'klaviyo-api-sdk/models/subscription_delete_job_create_query_resource_object_relationships_list_data'
+require 'klaviyo-api-sdk/models/subscription_parameters'
require 'klaviyo-api-sdk/models/suppression_create_job_create_query'
require 'klaviyo-api-sdk/models/suppression_create_job_create_query_resource_object'
require 'klaviyo-api-sdk/models/suppression_create_job_create_query_resource_object_attributes'
@@ -528,14 +562,33 @@
require 'klaviyo-api-sdk/models/template_render_query'
require 'klaviyo-api-sdk/models/template_render_query_resource_object'
require 'klaviyo-api-sdk/models/template_render_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/template_universal_content_enum'
require 'klaviyo-api-sdk/models/template_update_query'
require 'klaviyo-api-sdk/models/template_update_query_resource_object'
require 'klaviyo-api-sdk/models/template_update_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/text_block'
+require 'klaviyo-api-sdk/models/text_block_data'
+require 'klaviyo-api-sdk/models/text_block_styles'
+require 'klaviyo-api-sdk/models/text_enum'
require 'klaviyo-api-sdk/models/throttled_schedule_options'
require 'klaviyo-api-sdk/models/timeframe'
-require 'klaviyo-api-sdk/models/utm_params_sub_object'
+require 'klaviyo-api-sdk/models/tracking_param_dto'
+require 'klaviyo-api-sdk/models/tracking_param_dto_campaign'
+require 'klaviyo-api-sdk/models/tracking_param_dto_flow'
+require 'klaviyo-api-sdk/models/tracking_setting_enum'
+require 'klaviyo-api-sdk/models/tracking_setting_partial_update_query'
+require 'klaviyo-api-sdk/models/tracking_setting_partial_update_query_resource_object'
+require 'klaviyo-api-sdk/models/tracking_setting_partial_update_query_resource_object_attributes'
require 'klaviyo-api-sdk/models/union_positive_numeric_filter'
require 'klaviyo-api-sdk/models/union_positive_numeric_filter_operator'
+require 'klaviyo-api-sdk/models/universal_content_create_query'
+require 'klaviyo-api-sdk/models/universal_content_create_query_resource_object'
+require 'klaviyo-api-sdk/models/universal_content_create_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/universal_content_create_query_resource_object_attributes_definition'
+require 'klaviyo-api-sdk/models/universal_content_partial_update_query'
+require 'klaviyo-api-sdk/models/universal_content_partial_update_query_resource_object'
+require 'klaviyo-api-sdk/models/universal_content_partial_update_query_resource_object_attributes'
+require 'klaviyo-api-sdk/models/universal_content_partial_update_query_resource_object_attributes_definition'
require 'klaviyo-api-sdk/models/unsubscribed_enum'
require 'klaviyo-api-sdk/models/webhook_create_query'
require 'klaviyo-api-sdk/models/webhook_create_query_resource_object'
@@ -563,9 +616,11 @@
require 'klaviyo-api-sdk/api/metrics_api'
require 'klaviyo-api-sdk/api/profiles_api'
require 'klaviyo-api-sdk/api/reporting_api'
+require 'klaviyo-api-sdk/api/reviews_api'
require 'klaviyo-api-sdk/api/segments_api'
require 'klaviyo-api-sdk/api/tags_api'
require 'klaviyo-api-sdk/api/templates_api'
+require 'klaviyo-api-sdk/api/tracking_settings_api'
require 'klaviyo-api-sdk/api/webhooks_api'
# retry logic
diff --git a/lib/klaviyo-api-sdk/api/accounts_api.rb b/lib/klaviyo-api-sdk/api/accounts_api.rb
index 9b6af3c..f1a23ba 100644
--- a/lib/klaviyo-api-sdk/api/accounts_api.rb
+++ b/lib/klaviyo-api-sdk/api/accounts_api.rb
@@ -3,7 +3,7 @@
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
-The version of the OpenAPI document: 2024-07-15
+The version of the OpenAPI document: 2024-10-15
Contact: developers@klaviyo.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.2.1
@@ -23,7 +23,7 @@ def initialize(api_client = ApiClient.default)
# Retrieve a single account object by its account ID. You can only request the account by which the private API key was generated.
*Rate limits*:
Burst: `1/s`
Steady: `15/m` **Scopes:** `accounts:read`
# @param id [String] The ID of the account
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
def get_account(id, opts = {})
data, _status_code, _headers = get_account_with_http_info(id, opts)
@@ -34,7 +34,7 @@ def get_account(id, opts = {})
# Retrieve a single account object by its account ID. You can only request the account by which the private API key was generated.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m` **Scopes:** `accounts:read`
# @param id [String] The ID of the account
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
def get_account_with_http_info(id, opts = {})
if @api_client.config.debugging
@@ -49,7 +49,7 @@ def get_account_with_http_info(id, opts = {})
fail ArgumentError, "invalid value for \"fields_account\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/accounts/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/accounts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -58,9 +58,9 @@ def get_account_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -94,7 +94,7 @@ def get_account_with_http_info(id, opts = {})
# Get Accounts
# Retrieve the account(s) associated with a given private API key. This will return 1 account object within the array. You can use this to retrieve account-specific data (contact information, timezone, currency, Public API key, etc.) or test if a Private API Key belongs to the correct account prior to performing subsequent actions with the API.
*Rate limits*:
Burst: `1/s`
Steady: `15/m` **Scopes:** `accounts:read`
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
def get_accounts(opts = {})
data, _status_code, _headers = get_accounts_with_http_info(opts)
@@ -104,7 +104,7 @@ def get_accounts(opts = {})
# Get Accounts
# Retrieve the account(s) associated with a given private API key. This will return 1 account object within the array. You can use this to retrieve account-specific data (contact information, timezone, currency, Public API key, etc.) or test if a Private API Key belongs to the correct account prior to performing subsequent actions with the API.<br><br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `15/m` **Scopes:** `accounts:read`
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_account For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
def get_accounts_with_http_info(opts = {})
if @api_client.config.debugging
@@ -115,7 +115,7 @@ def get_accounts_with_http_info(opts = {})
fail ArgumentError, "invalid value for \"fields_account\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/accounts/'
+ local_var_path = '/api/accounts'
# query parameters
query_params = opts[:query_params] || {}
@@ -124,9 +124,9 @@ def get_accounts_with_http_info(opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
diff --git a/lib/klaviyo-api-sdk/api/campaigns_api.rb b/lib/klaviyo-api-sdk/api/campaigns_api.rb
index 0237072..8798ca7 100644
--- a/lib/klaviyo-api-sdk/api/campaigns_api.rb
+++ b/lib/klaviyo-api-sdk/api/campaigns_api.rb
@@ -3,7 +3,7 @@
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
-The version of the OpenAPI document: 2024-07-15
+The version of the OpenAPI document: 2024-10-15
Contact: developers@klaviyo.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.2.1
@@ -19,31 +19,34 @@ class CampaignsApi
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
- # Create Campaign
- # Creates a campaign given a set of parameters, then returns it.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_create_query [CampaignCreateQuery] Creates a campaign from parameters
+ # Assign Template to Campaign Message
+ # Creates a non-reusable version of the template and assigns it to the message.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_message_assign_template_query [CampaignMessageAssignTemplateQuery] Takes a reusable template, clones it, and assigns the non-reusable clone to the message.
# @param [Hash] opts the optional parameters
# @return [Hash]
- def create_campaign(campaign_create_query, opts = {})
- data, _status_code, _headers = create_campaign_with_http_info(campaign_create_query, opts)
+ def assign_template_to_campaign_message(campaign_message_assign_template_query, opts = {})
+ data, _status_code, _headers = assign_template_to_campaign_message_with_http_info(campaign_message_assign_template_query, opts)
data
end
- # Create Campaign
- # Creates a campaign given a set of parameters, then returns it.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_create_query [CampaignCreateQuery] Creates a campaign from parameters
+ # alias of `assign_template_to_campaign_message`
+ alias create_campaign_message_assign_template assign_template_to_campaign_message
+
+ # Assign Template to Campaign Message
+ # Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_message_assign_template_query [CampaignMessageAssignTemplateQuery] Takes a reusable template, clones it, and assigns the non-reusable clone to the message.
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_campaign_with_http_info(campaign_create_query, opts = {})
+ def assign_template_to_campaign_message_with_http_info(campaign_message_assign_template_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.assign_template_to_campaign_message ...'
end
- # verify the required parameter 'campaign_create_query' is set
- if @api_client.config.client_side_validation && campaign_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_create_query' when calling CampaignsApi.create_campaign"
+ # verify the required parameter 'campaign_message_assign_template_query' is set
+ if @api_client.config.client_side_validation && campaign_message_assign_template_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_message_assign_template_query' when calling CampaignsApi.assign_template_to_campaign_message"
end
# resource path
- local_var_path = '/api/campaigns/'
+ local_var_path = '/api/campaign-message-assign-template'
# query parameters
query_params = opts[:query_params] || {}
@@ -51,11 +54,11 @@ def create_campaign_with_http_info(campaign_create_query, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -64,7 +67,7 @@ def create_campaign_with_http_info(campaign_create_query, opts = {})
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_message_assign_template_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -73,7 +76,7 @@ def create_campaign_with_http_info(campaign_create_query, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.create_campaign",
+ :operation => :"CampaignsApi.assign_template_to_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -84,106 +87,48 @@ def create_campaign_with_http_info(campaign_create_query, opts = {})
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#create_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#assign_template_to_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Campaign Clone
- # Clones an existing campaign, returning a new campaign based on the original with a new ID and name.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_clone_query [CampaignCloneQuery] Clones a campaign from an existing campaign
- # @param [Hash] opts the optional parameters
- # @return [Hash]
- def create_campaign_clone(campaign_clone_query, opts = {})
- data, _status_code, _headers = create_campaign_clone_with_http_info(campaign_clone_query, opts)
- data
- end
+ # alias of `assign_template_to_campaign_message_with_http_info`
+ alias create_campaign_message_assign_template_with_http_info assign_template_to_campaign_message_with_http_info
- # Create Campaign Clone
- # Clones an existing campaign, returning a new campaign based on the original with a new ID and name.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_clone_query [CampaignCloneQuery] Clones a campaign from an existing campaign
+ # Cancel Campaign Send
+ # Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The ID of the currently sending campaign to cancel or revert
+ # @param campaign_send_job_partial_update_query [CampaignSendJobPartialUpdateQuery] Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
# @param [Hash] opts the optional parameters
- # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_campaign_clone_with_http_info(campaign_clone_query, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign_clone ...'
- end
- # verify the required parameter 'campaign_clone_query' is set
- if @api_client.config.client_side_validation && campaign_clone_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_clone_query' when calling CampaignsApi.create_campaign_clone"
- end
- # resource path
- local_var_path = '/api/campaign-clone/'
-
- # query parameters
- query_params = opts[:query_params] || {}
-
- # header parameters
- header_params = opts[:header_params] || {}
- # klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-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(campaign_clone_query)
-
- # return_type
- return_type = opts[:debug_return_type] || 'Hash'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
-
- new_options = opts.merge(
- :operation => :"CampaignsApi.create_campaign_clone",
- :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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#create_campaign_clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
+ # @return [nil]
+ def cancel_campaign_send(id, campaign_send_job_partial_update_query, opts = {})
+ cancel_campaign_send_with_http_info(id, campaign_send_job_partial_update_query, opts)
+ nil
end
- # Assign Campaign Message Template
- # Creates a non-reusable version of the template and assigns it to the message.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_message_assign_template_query [CampaignMessageAssignTemplateQuery] Takes a reusable template, clones it, and assigns the non-reusable clone to the message.
- # @param [Hash] opts the optional parameters
- # @return [Hash]
- def create_campaign_message_assign_template(campaign_message_assign_template_query, opts = {})
- data, _status_code, _headers = create_campaign_message_assign_template_with_http_info(campaign_message_assign_template_query, opts)
- data
- end
+ # alias of `cancel_campaign_send`
+ alias update_campaign_send_job cancel_campaign_send
- # Assign Campaign Message Template
- # Creates a non-reusable version of the template and assigns it to the message.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_message_assign_template_query [CampaignMessageAssignTemplateQuery] Takes a reusable template, clones it, and assigns the non-reusable clone to the message.
+ # Cancel Campaign Send
+ # Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The ID of the currently sending campaign to cancel or revert
+ # @param campaign_send_job_partial_update_query [CampaignSendJobPartialUpdateQuery] Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
# @param [Hash] opts the optional parameters
- # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_campaign_message_assign_template_with_http_info(campaign_message_assign_template_query, opts = {})
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def cancel_campaign_send_with_http_info(id, campaign_send_job_partial_update_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign_message_assign_template ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.cancel_campaign_send ...'
end
- # verify the required parameter 'campaign_message_assign_template_query' is set
- if @api_client.config.client_side_validation && campaign_message_assign_template_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_message_assign_template_query' when calling CampaignsApi.create_campaign_message_assign_template"
+ # 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 CampaignsApi.cancel_campaign_send"
+ end
+ # verify the required parameter 'campaign_send_job_partial_update_query' is set
+ if @api_client.config.client_side_validation && campaign_send_job_partial_update_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_send_job_partial_update_query' when calling CampaignsApi.cancel_campaign_send"
end
# resource path
- local_var_path = '/api/campaign-message-assign-template/'
+ local_var_path = '/api/campaign-send-jobs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -191,11 +136,11 @@ def create_campaign_message_assign_template_with_http_info(campaign_message_assi
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -204,16 +149,16 @@ def create_campaign_message_assign_template_with_http_info(campaign_message_assi
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_message_assign_template_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_send_job_partial_update_query)
# return_type
- return_type = opts[:debug_return_type] || 'Hash'
+ return_type = opts[:debug_return_type]
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.create_campaign_message_assign_template",
+ :operation => :"CampaignsApi.cancel_campaign_send",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -222,38 +167,41 @@ def create_campaign_message_assign_template_with_http_info(campaign_message_assi
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#create_campaign_message_assign_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#cancel_campaign_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Campaign Recipient Estimation Job
- # Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_recipient_estimation_job_create_query [CampaignRecipientEstimationJobCreateQuery] Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
+ # alias of `cancel_campaign_send_with_http_info`
+ alias update_campaign_send_job_with_http_info cancel_campaign_send_with_http_info
+
+ # Create Campaign
+ # Creates a campaign given a set of parameters, then returns it.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_create_query [CampaignCreateQuery] Creates a campaign from parameters
# @param [Hash] opts the optional parameters
# @return [Hash]
- def create_campaign_recipient_estimation_job(campaign_recipient_estimation_job_create_query, opts = {})
- data, _status_code, _headers = create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_estimation_job_create_query, opts)
+ def create_campaign(campaign_create_query, opts = {})
+ data, _status_code, _headers = create_campaign_with_http_info(campaign_create_query, opts)
data
end
- # Create Campaign Recipient Estimation Job
- # Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_recipient_estimation_job_create_query [CampaignRecipientEstimationJobCreateQuery] Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
+ # Create Campaign
+ # Creates a campaign given a set of parameters, then returns it.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_create_query [CampaignCreateQuery] Creates a campaign from parameters
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_estimation_job_create_query, opts = {})
+ def create_campaign_with_http_info(campaign_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign_recipient_estimation_job ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign ...'
end
- # verify the required parameter 'campaign_recipient_estimation_job_create_query' is set
- if @api_client.config.client_side_validation && campaign_recipient_estimation_job_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_recipient_estimation_job_create_query' when calling CampaignsApi.create_campaign_recipient_estimation_job"
+ # verify the required parameter 'campaign_create_query' is set
+ if @api_client.config.client_side_validation && campaign_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_create_query' when calling CampaignsApi.create_campaign"
end
# resource path
- local_var_path = '/api/campaign-recipient-estimation-jobs/'
+ local_var_path = '/api/campaigns'
# query parameters
query_params = opts[:query_params] || {}
@@ -261,11 +209,11 @@ def create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_e
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -274,7 +222,7 @@ def create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_e
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_recipient_estimation_job_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -283,7 +231,7 @@ def create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_e
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.create_campaign_recipient_estimation_job",
+ :operation => :"CampaignsApi.create_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -294,36 +242,39 @@ def create_campaign_recipient_estimation_job_with_http_info(campaign_recipient_e
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#create_campaign_recipient_estimation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#create_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Campaign Send Job
- # Trigger a campaign to send asynchronously
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_send_job_create_query [CampaignSendJobCreateQuery] Trigger the campaign to send asynchronously
+ # Create Campaign Clone
+ # Clones an existing campaign, returning a new campaign based on the original with a new ID and name.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_clone_query [CampaignCloneQuery] Clones a campaign from an existing campaign
# @param [Hash] opts the optional parameters
# @return [Hash]
- def create_campaign_send_job(campaign_send_job_create_query, opts = {})
- data, _status_code, _headers = create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts)
+ def create_campaign_clone(campaign_clone_query, opts = {})
+ data, _status_code, _headers = create_campaign_clone_with_http_info(campaign_clone_query, opts)
data
end
- # Create Campaign Send Job
- # Trigger a campaign to send asynchronously<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param campaign_send_job_create_query [CampaignSendJobCreateQuery] Trigger the campaign to send asynchronously
+ # alias of `create_campaign_clone`
+ alias clone_campaign create_campaign_clone
+
+ # Create Campaign Clone
+ # Clones an existing campaign, returning a new campaign based on the original with a new ID and name.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_clone_query [CampaignCloneQuery] Clones a campaign from an existing campaign
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts = {})
+ def create_campaign_clone_with_http_info(campaign_clone_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign_send_job ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign_clone ...'
end
- # verify the required parameter 'campaign_send_job_create_query' is set
- if @api_client.config.client_side_validation && campaign_send_job_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_send_job_create_query' when calling CampaignsApi.create_campaign_send_job"
+ # verify the required parameter 'campaign_clone_query' is set
+ if @api_client.config.client_side_validation && campaign_clone_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_clone_query' when calling CampaignsApi.create_campaign_clone"
end
# resource path
- local_var_path = '/api/campaign-send-jobs/'
+ local_var_path = '/api/campaign-clone'
# query parameters
query_params = opts[:query_params] || {}
@@ -331,11 +282,11 @@ def create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -344,7 +295,7 @@ def create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_send_job_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_clone_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -353,7 +304,7 @@ def create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.create_campaign_send_job",
+ :operation => :"CampaignsApi.create_campaign_clone",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -364,11 +315,14 @@ def create_campaign_send_job_with_http_info(campaign_send_job_create_query, opts
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#create_campaign_send_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#create_campaign_clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # alias of `create_campaign_clone_with_http_info`
+ alias clone_campaign_with_http_info create_campaign_clone_with_http_info
+
# Delete Campaign
# Delete a campaign with the given campaign ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
# @param id [String] The campaign ID to be deleted
@@ -393,7 +347,7 @@ def delete_campaign_with_http_info(id, opts = {})
fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.delete_campaign"
end
# resource path
- local_var_path = '/api/campaigns/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -401,9 +355,9 @@ def delete_campaign_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -438,10 +392,10 @@ def delete_campaign_with_http_info(id, opts = {})
# Returns a specific campaign based on a required id.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String] The campaign ID to be retrieved
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Hash]
def get_campaign(id, opts = {})
data, _status_code, _headers = get_campaign_with_http_info(id, opts)
@@ -452,10 +406,10 @@ def get_campaign(id, opts = {})
# Returns a specific campaign based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String] The campaign ID to be retrieved
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
def get_campaign_with_http_info(id, opts = {})
if @api_client.config.debugging
@@ -465,11 +419,11 @@ def get_campaign_with_http_info(id, opts = {})
if @api_client.config.client_side_validation && id.nil?
fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign"
end
- allowable_values = ["label", "channel", "content", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
+ allowable_values = ["label", "channel", "content", "content.subject", "content.preview_text", "content.from_email", "content.from_label", "content.reply_to_email", "content.cc_email", "content.bcc_email", "content.body", "content.media_url", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
end
- allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "tracking_options", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
+ allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "send_options.use_smart_sending", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
end
@@ -482,7 +436,7 @@ def get_campaign_with_http_info(id, opts = {})
fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaigns/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -494,9 +448,9 @@ def get_campaign_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -527,69 +481,51 @@ def get_campaign_with_http_info(id, opts = {})
return data, status_code, headers
end
- # Get Campaign Campaign Messages
- # Return all messages that belong to the given campaign.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # Get Campaign for Campaign Message
+ # Return the related campaign
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_campaign_messages(id, opts = {})
- data, _status_code, _headers = get_campaign_campaign_messages_with_http_info(id, opts)
+ def get_campaign_for_campaign_message(id, opts = {})
+ data, _status_code, _headers = get_campaign_for_campaign_message_with_http_info(id, opts)
data
end
- # Get Campaign Campaign Messages
- # Return all messages that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # alias of `get_campaign_for_campaign_message`
+ alias get_campaign_message_campaign get_campaign_for_campaign_message
+
+ # Get Campaign for Campaign Message
+ # Return the related campaign<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_campaign_messages_with_http_info(id, opts = {})
+ def get_campaign_for_campaign_message_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_campaign_messages ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_for_campaign_message ...'
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 CampaignsApi.get_campaign_campaign_messages"
- end
- allowable_values = ["label", "channel", "content", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_for_campaign_message"
end
- allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "tracking_options", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
+ allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "send_options.use_smart_sending", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
end
- allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
- end
- allowable_values = ["campaign", "template"]
- 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/campaigns/{id}/campaign-messages/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-messages/{id}/campaign'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
- query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].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['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -604,7 +540,7 @@ def get_campaign_campaign_messages_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_campaign_messages",
+ :operation => :"CampaignsApi.get_campaign_for_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -615,74 +551,52 @@ def get_campaign_campaign_messages_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_campaign_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_for_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Message
- # Returns a specific message based on a required id.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The message ID to be retrieved
+ # alias of `get_campaign_for_campaign_message_with_http_info`
+ alias get_campaign_message_campaign_with_http_info get_campaign_for_campaign_message_with_http_info
+
+ # Get Campaign ID for Campaign Message
+ # Returns the ID of the related campaign
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
# @return [Hash]
- def get_campaign_message(id, opts = {})
- data, _status_code, _headers = get_campaign_message_with_http_info(id, opts)
+ def get_campaign_id_for_campaign_message(id, opts = {})
+ data, _status_code, _headers = get_campaign_id_for_campaign_message_with_http_info(id, opts)
data
end
- # Get Campaign Message
- # Returns a specific message based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The message ID to be retrieved
+ # alias of `get_campaign_id_for_campaign_message`
+ alias get_campaign_message_relationships_campaign get_campaign_id_for_campaign_message
+
+ # Get Campaign ID for Campaign Message
+ # Returns the ID of the related campaign<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_message_with_http_info(id, opts = {})
+ def get_campaign_id_for_campaign_message_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_id_for_campaign_message ...'
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 CampaignsApi.get_campaign_message"
- end
- allowable_values = ["label", "channel", "content", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
- end
- allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "tracking_options", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
- end
- allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
- end
- allowable_values = ["campaign", "template"]
- 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}"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_id_for_campaign_message"
end
# resource path
- local_var_path = '/api/campaign-messages/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-messages/{id}/relationships/campaign'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
- query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
- query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].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['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -697,7 +611,7 @@ def get_campaign_message_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_message",
+ :operation => :"CampaignsApi.get_campaign_id_for_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -708,53 +622,77 @@ def get_campaign_message_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_id_for_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Message Campaign
- # Return the related campaign
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String]
+ # alias of `get_campaign_id_for_campaign_message_with_http_info`
+ alias get_campaign_message_relationships_campaign_with_http_info get_campaign_id_for_campaign_message_with_http_info
+
+ # Get Campaign Message
+ # Returns a specific message based on a required id.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The message ID to be retrieved
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Hash]
- def get_campaign_message_campaign(id, opts = {})
- data, _status_code, _headers = get_campaign_message_campaign_with_http_info(id, opts)
+ def get_campaign_message(id, opts = {})
+ data, _status_code, _headers = get_campaign_message_with_http_info(id, opts)
data
end
- # Get Campaign Message Campaign
- # Return the related campaign<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String]
+ # Get Campaign Message
+ # Returns a specific message based on a required id.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The message ID to be retrieved
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_message_campaign_with_http_info(id, opts = {})
+ def get_campaign_message_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message_campaign ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message ...'
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 CampaignsApi.get_campaign_message_campaign"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_message"
+ end
+ allowable_values = ["label", "channel", "content", "content.subject", "content.preview_text", "content.from_email", "content.from_label", "content.reply_to_email", "content.cc_email", "content.bcc_email", "content.body", "content.media_url", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
end
- allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "tracking_options", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
+ allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "send_options.use_smart_sending", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
end
+ allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["campaign", "template"]
+ 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/campaign-messages/{id}/campaign/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-messages/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
+ query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].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['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -769,7 +707,7 @@ def get_campaign_message_campaign_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_message_campaign",
+ :operation => :"CampaignsApi.get_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -780,46 +718,53 @@ def get_campaign_message_campaign_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Message Relationships Campaign
- # Returns the ID of the related campaign
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String]
+ # Get Campaign Recipient Estimation
+ # Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign for which to get the estimated number of recipients
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_message_relationships_campaign(id, opts = {})
- data, _status_code, _headers = get_campaign_message_relationships_campaign_with_http_info(id, opts)
+ def get_campaign_recipient_estimation(id, opts = {})
+ data, _status_code, _headers = get_campaign_recipient_estimation_with_http_info(id, opts)
data
end
- # Get Campaign Message Relationships Campaign
- # Returns the ID of the related campaign<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String]
+ # Get Campaign Recipient Estimation
+ # Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign for which to get the estimated number of recipients
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_message_relationships_campaign_with_http_info(id, opts = {})
+ def get_campaign_recipient_estimation_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message_relationships_campaign ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_recipient_estimation ...'
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 CampaignsApi.get_campaign_message_relationships_campaign"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_recipient_estimation"
+ end
+ allowable_values = ["estimated_recipient_count"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_recipient_estimation'] && !opts[:'fields_campaign_recipient_estimation'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_recipient_estimation\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaign-messages/{id}/relationships/campaign/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-recipient-estimations/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
+ query_params[:'fields[campaign-recipient-estimation]'] = @api_client.build_collection_param(opts[:'fields_campaign_recipient_estimation'], :csv) if !opts[:'fields_campaign_recipient_estimation'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -834,7 +779,7 @@ def get_campaign_message_relationships_campaign_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_message_relationships_campaign",
+ :operation => :"CampaignsApi.get_campaign_recipient_estimation",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -845,46 +790,53 @@ def get_campaign_message_relationships_campaign_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message_relationships_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_recipient_estimation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Message Relationships Template
- # Returns the ID of the related template
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
- # @param id [String]
+ # Get Campaign Recipient Estimation Job
+ # Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign to get recipient estimation status
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_message_relationships_template(id, opts = {})
- data, _status_code, _headers = get_campaign_message_relationships_template_with_http_info(id, opts)
+ def get_campaign_recipient_estimation_job(id, opts = {})
+ data, _status_code, _headers = get_campaign_recipient_estimation_job_with_http_info(id, opts)
data
end
- # Get Campaign Message Relationships Template
- # Returns the ID of the related template<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
- # @param id [String]
+ # Get Campaign Recipient Estimation Job
+ # Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign to get recipient estimation status
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_message_relationships_template_with_http_info(id, opts = {})
+ def get_campaign_recipient_estimation_job_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message_relationships_template ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_recipient_estimation_job ...'
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 CampaignsApi.get_campaign_message_relationships_template"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_recipient_estimation_job"
+ end
+ allowable_values = ["status"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_recipient_estimation_job'] && !opts[:'fields_campaign_recipient_estimation_job'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_recipient_estimation_job\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaign-messages/{id}/relationships/template/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-recipient-estimation-jobs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
+ query_params[:'fields[campaign-recipient-estimation-job]'] = @api_client.build_collection_param(opts[:'fields_campaign_recipient_estimation_job'], :csv) if !opts[:'fields_campaign_recipient_estimation_job'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -899,7 +851,7 @@ def get_campaign_message_relationships_template_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_message_relationships_template",
+ :operation => :"CampaignsApi.get_campaign_recipient_estimation_job",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -910,53 +862,53 @@ def get_campaign_message_relationships_template_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message_relationships_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_recipient_estimation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Message Template
- # Return the related template
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
- # @param id [String]
+ # Get Campaign Send Job
+ # Get a campaign send job
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign to send
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_message_template(id, opts = {})
- data, _status_code, _headers = get_campaign_message_template_with_http_info(id, opts)
+ def get_campaign_send_job(id, opts = {})
+ data, _status_code, _headers = get_campaign_send_job_with_http_info(id, opts)
data
end
- # Get Campaign Message Template
- # Return the related template<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
- # @param id [String]
+ # Get Campaign Send Job
+ # Get a campaign send job<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param id [String] The ID of the campaign to send
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_message_template_with_http_info(id, opts = {})
+ def get_campaign_send_job_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_message_template ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_send_job ...'
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 CampaignsApi.get_campaign_message_template"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_send_job"
end
- allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
+ allowable_values = ["status"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_send_job'] && !opts[:'fields_campaign_send_job'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_send_job\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaign-messages/{id}/template/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-send-jobs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
+ query_params[:'fields[campaign-send-job]'] = @api_client.build_collection_param(opts[:'fields_campaign_send_job'], :csv) if !opts[:'fields_campaign_send_job'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -971,7 +923,7 @@ def get_campaign_message_template_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_message_template",
+ :operation => :"CampaignsApi.get_campaign_send_job",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -982,53 +934,53 @@ def get_campaign_message_template_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_message_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_send_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Recipient Estimation
- # Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign for which to get the estimated number of recipients
+ # Get Campaign Tags
+ # Return all tags that belong to the given campaign.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_recipient_estimation(id, opts = {})
- data, _status_code, _headers = get_campaign_recipient_estimation_with_http_info(id, opts)
+ def get_campaign_tags(id, opts = {})
+ data, _status_code, _headers = get_campaign_tags_with_http_info(id, opts)
data
end
- # Get Campaign Recipient Estimation
- # Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign for which to get the estimated number of recipients
+ # Get Campaign Tags
+ # Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_recipient_estimation_with_http_info(id, opts = {})
+ def get_campaign_tags_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_recipient_estimation ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_tags ...'
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 CampaignsApi.get_campaign_recipient_estimation"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_campaign_tags"
end
- allowable_values = ["estimated_recipient_count"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_recipient_estimation'] && !opts[:'fields_campaign_recipient_estimation'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_recipient_estimation\", must include one of #{allowable_values}"
+ allowable_values = ["name"]
+ if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaign-recipient-estimations/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[campaign-recipient-estimation]'] = @api_client.build_collection_param(opts[:'fields_campaign_recipient_estimation'], :csv) if !opts[:'fields_campaign_recipient_estimation'].nil?
+ query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1043,7 +995,7 @@ def get_campaign_recipient_estimation_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_recipient_estimation",
+ :operation => :"CampaignsApi.get_campaign_tags",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1054,53 +1006,85 @@ def get_campaign_recipient_estimation_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_recipient_estimation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Recipient Estimation Job
- # Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign to get recipient estimation status
+ # Get Campaigns
+ # Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,'email')` to list email campaigns, or `?filter=equals(messages.channel,'sms')` to list SMS campaigns.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param filter [String] For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
# @return [Hash]
- def get_campaign_recipient_estimation_job(id, opts = {})
- data, _status_code, _headers = get_campaign_recipient_estimation_job_with_http_info(id, opts)
+ def get_campaigns(filter, opts = {})
+ data, _status_code, _headers = get_campaigns_with_http_info(filter, opts)
data
end
- # Get Campaign Recipient Estimation Job
- # Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign to get recipient estimation status
+ # Get Campaigns
+ # Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,'email')` to list email campaigns, or `?filter=equals(messages.channel,'sms')` to list SMS campaigns.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
+ # @param filter [String] For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#pagination
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sorting
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_recipient_estimation_job_with_http_info(id, opts = {})
+ def get_campaigns_with_http_info(filter, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_recipient_estimation_job ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaigns ...'
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 CampaignsApi.get_campaign_recipient_estimation_job"
+ # verify the required parameter 'filter' is set
+ if @api_client.config.client_side_validation && filter.nil?
+ fail ArgumentError, "Missing the required parameter 'filter' when calling CampaignsApi.get_campaigns"
end
- allowable_values = ["status"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_recipient_estimation_job'] && !opts[:'fields_campaign_recipient_estimation_job'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_recipient_estimation_job\", must include one of #{allowable_values}"
+ allowable_values = ["label", "channel", "content", "content.subject", "content.preview_text", "content.from_email", "content.from_label", "content.reply_to_email", "content.cc_email", "content.bcc_email", "content.body", "content.media_url", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "send_options.use_smart_sending", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["name"]
+ if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["campaign-messages", "tags"]
+ 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
+ allowable_values = ["created_at", "-created_at", "id", "-id", "name", "-name", "scheduled_at", "-scheduled_at", "updated_at", "-updated_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/campaign-recipient-estimation-jobs/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns'
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[campaign-recipient-estimation-job]'] = @api_client.build_collection_param(opts[:'fields_campaign_recipient_estimation_job'], :csv) if !opts[:'fields_campaign_recipient_estimation_job'].nil?
+ query_params[:'filter'] = filter
+ query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
+ query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
+ query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1115,7 +1099,7 @@ def get_campaign_recipient_estimation_job_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_recipient_estimation_job",
+ :operation => :"CampaignsApi.get_campaigns",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1126,36 +1110,39 @@ def get_campaign_recipient_estimation_job_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_recipient_estimation_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Relationships Campaign Messages
+ # Get Message IDs for Campaign
# Returns the IDs of all messages associated with the given campaign.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
# @return [Hash]
- def get_campaign_relationships_campaign_messages(id, opts = {})
- data, _status_code, _headers = get_campaign_relationships_campaign_messages_with_http_info(id, opts)
+ def get_message_ids_for_campaign(id, opts = {})
+ data, _status_code, _headers = get_message_ids_for_campaign_with_http_info(id, opts)
data
end
- # Get Campaign Relationships Campaign Messages
+ # alias of `get_message_ids_for_campaign`
+ alias get_campaign_relationships_campaign_messages get_message_ids_for_campaign
+
+ # Get Message IDs for Campaign
# Returns the IDs of all messages associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_relationships_campaign_messages_with_http_info(id, opts = {})
+ def get_message_ids_for_campaign_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_relationships_campaign_messages ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_message_ids_for_campaign ...'
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 CampaignsApi.get_campaign_relationships_campaign_messages"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_message_ids_for_campaign"
end
# resource path
- local_var_path = '/api/campaigns/{id}/relationships/campaign-messages/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}/relationships/campaign-messages'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -1163,9 +1150,9 @@ def get_campaign_relationships_campaign_messages_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1180,7 +1167,7 @@ def get_campaign_relationships_campaign_messages_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_relationships_campaign_messages",
+ :operation => :"CampaignsApi.get_message_ids_for_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1191,46 +1178,80 @@ def get_campaign_relationships_campaign_messages_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_relationships_campaign_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_message_ids_for_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Relationships Tags
- # Returns the IDs of all tags associated with the given campaign.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # alias of `get_message_ids_for_campaign_with_http_info`
+ alias get_campaign_relationships_campaign_messages_with_http_info get_message_ids_for_campaign_with_http_info
+
+ # Get Messages for Campaign
+ # Return all messages that belong to the given campaign.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Hash]
- def get_campaign_relationships_tags(id, opts = {})
- data, _status_code, _headers = get_campaign_relationships_tags_with_http_info(id, opts)
+ def get_messages_for_campaign(id, opts = {})
+ data, _status_code, _headers = get_messages_for_campaign_with_http_info(id, opts)
data
end
- # Get Campaign Relationships Tags
- # Returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # alias of `get_messages_for_campaign`
+ alias get_campaign_campaign_messages get_messages_for_campaign
+
+ # Get Messages for Campaign
+ # Return all messages that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
# @param id [String]
# @param [Hash] opts the optional parameters
+ # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#relationships
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_relationships_tags_with_http_info(id, opts = {})
+ def get_messages_for_campaign_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_relationships_tags ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_messages_for_campaign ...'
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 CampaignsApi.get_campaign_relationships_tags"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_messages_for_campaign"
+ end
+ allowable_values = ["label", "channel", "content", "content.subject", "content.preview_text", "content.from_email", "content.from_label", "content.reply_to_email", "content.cc_email", "content.bcc_email", "content.body", "content.media_url", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "send_options.use_smart_sending", "tracking_options", "tracking_options.add_tracking_params", "tracking_options.custom_tracking_params", "tracking_options.is_tracking_clicks", "tracking_options.is_tracking_opens", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
+ if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
+ end
+ allowable_values = ["campaign", "template"]
+ 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/campaigns/{id}/relationships/tags/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}/campaign-messages'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
+ query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
+ query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].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['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1245,7 +1266,7 @@ def get_campaign_relationships_tags_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_relationships_tags",
+ :operation => :"CampaignsApi.get_messages_for_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1256,53 +1277,52 @@ def get_campaign_relationships_tags_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_relationships_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_messages_for_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Send Job
- # Get a campaign send job
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign to send
+ # alias of `get_messages_for_campaign_with_http_info`
+ alias get_campaign_campaign_messages_with_http_info get_messages_for_campaign_with_http_info
+
+ # Get Tag IDs for Campaign
+ # Returns the IDs of all tags associated with the given campaign.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_send_job(id, opts = {})
- data, _status_code, _headers = get_campaign_send_job_with_http_info(id, opts)
+ def get_tag_ids_for_campaign(id, opts = {})
+ data, _status_code, _headers = get_tag_ids_for_campaign_with_http_info(id, opts)
data
end
- # Get Campaign Send Job
- # Get a campaign send job<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param id [String] The ID of the campaign to send
+ # alias of `get_tag_ids_for_campaign`
+ alias get_campaign_relationships_tags get_tag_ids_for_campaign
+
+ # Get Tag IDs for Campaign
+ # Returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_send_job_with_http_info(id, opts = {})
+ def get_tag_ids_for_campaign_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_send_job ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_tag_ids_for_campaign ...'
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 CampaignsApi.get_campaign_send_job"
- end
- allowable_values = ["status"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_send_job'] && !opts[:'fields_campaign_send_job'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_send_job\", must include one of #{allowable_values}"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_tag_ids_for_campaign"
end
# resource path
- local_var_path = '/api/campaign-send-jobs/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}/relationships/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[campaign-send-job]'] = @api_client.build_collection_param(opts[:'fields_campaign_send_job'], :csv) if !opts[:'fields_campaign_send_job'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1317,7 +1337,7 @@ def get_campaign_send_job_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_send_job",
+ :operation => :"CampaignsApi.get_tag_ids_for_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1328,53 +1348,59 @@ def get_campaign_send_job_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_send_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_tag_ids_for_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaign Tags
- # Return all tags that belong to the given campaign.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # alias of `get_tag_ids_for_campaign_with_http_info`
+ alias get_campaign_relationships_tags_with_http_info get_tag_ids_for_campaign_with_http_info
+
+ # Get Template for Campaign Message
+ # Return the related template
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
# @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_campaign_tags(id, opts = {})
- data, _status_code, _headers = get_campaign_tags_with_http_info(id, opts)
+ def get_template_for_campaign_message(id, opts = {})
+ data, _status_code, _headers = get_template_for_campaign_message_with_http_info(id, opts)
data
end
- # Get Campaign Tags
- # Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
+ # alias of `get_template_for_campaign_message`
+ alias get_campaign_message_template get_template_for_campaign_message
+
+ # Get Template for Campaign Message
+ # Return the related template<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
# @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
+ # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaign_tags_with_http_info(id, opts = {})
+ def get_template_for_campaign_message_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign_tags ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_template_for_campaign_message ...'
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 CampaignsApi.get_campaign_tags"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.get_template_for_campaign_message"
end
- allowable_values = ["name"]
- if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
+ allowable_values = ["name", "editor_type", "html", "text", "created", "updated"]
+ if @api_client.config.client_side_validation && opts[:'fields_template'] && !opts[:'fields_template'].all? { |item| allowable_values.include?(item) }
+ fail ArgumentError, "invalid value for \"fields_template\", must include one of #{allowable_values}"
end
# resource path
- local_var_path = '/api/campaigns/{id}/tags/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-messages/{id}/template'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
+ query_params[:'fields[template]'] = @api_client.build_collection_param(opts[:'fields_template'], :csv) if !opts[:'fields_template'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1389,7 +1415,7 @@ def get_campaign_tags_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaign_tags",
+ :operation => :"CampaignsApi.get_template_for_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1400,85 +1426,52 @@ def get_campaign_tags_with_http_info(id, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaign_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_template_for_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Campaigns
- # Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,'email')` to list email campaigns, or `?filter=equals(messages.channel,'sms')` to list SMS campaigns.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read`
- # @param filter [String] For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
+ # alias of `get_template_for_campaign_message_with_http_info`
+ alias get_campaign_message_template_with_http_info get_template_for_campaign_message_with_http_info
+
+ # Get Template ID for Campaign Message
+ # Returns the ID of the related template
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
# @return [Hash]
- def get_campaigns(filter, opts = {})
- data, _status_code, _headers = get_campaigns_with_http_info(filter, opts)
+ def get_template_id_for_campaign_message(id, opts = {})
+ data, _status_code, _headers = get_template_id_for_campaign_message_with_http_info(id, opts)
data
end
- # Get Campaigns
- # Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,'email')` to list email campaigns, or `?filter=equals(messages.channel,'sms')` to list SMS campaigns.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
- # @param filter [String] For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
+ # alias of `get_template_id_for_campaign_message`
+ alias get_campaign_message_relationships_template get_template_id_for_campaign_message
+
+ # Get Template ID for Campaign Message
+ # Returns the ID of the related template<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read` `templates:read`
+ # @param id [String]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_campaign For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_campaigns_with_http_info(filter, opts = {})
+ def get_template_id_for_campaign_message_with_http_info(id, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaigns ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_template_id_for_campaign_message ...'
end
- # verify the required parameter 'filter' is set
- if @api_client.config.client_side_validation && filter.nil?
- fail ArgumentError, "Missing the required parameter 'filter' when calling CampaignsApi.get_campaigns"
- end
- allowable_values = ["label", "channel", "content", "send_times", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language", "created_at", "updated_at"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign_message'] && !opts[:'fields_campaign_message'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign_message\", must include one of #{allowable_values}"
- end
- allowable_values = ["name", "status", "archived", "audiences", "audiences.included", "audiences.excluded", "send_options", "tracking_options", "send_strategy", "send_strategy.method", "send_strategy.options_static", "send_strategy.options_static.datetime", "send_strategy.options_static.is_local", "send_strategy.options_static.send_past_recipients_immediately", "send_strategy.options_throttled", "send_strategy.options_throttled.datetime", "send_strategy.options_throttled.throttle_percentage", "send_strategy.options_sto", "send_strategy.options_sto.date", "created_at", "scheduled_at", "updated_at", "send_time"]
- if @api_client.config.client_side_validation && opts[:'fields_campaign'] && !opts[:'fields_campaign'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_campaign\", must include one of #{allowable_values}"
- end
- allowable_values = ["name"]
- if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
- end
- allowable_values = ["campaign-messages", "tags"]
- 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
- allowable_values = ["created_at", "-created_at", "id", "-id", "name", "-name", "scheduled_at", "-scheduled_at", "updated_at", "-updated_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}"
+ # 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 CampaignsApi.get_template_id_for_campaign_message"
end
# resource path
- local_var_path = '/api/campaigns/'
+ local_var_path = '/api/campaign-messages/{id}/relationships/template'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'filter'] = filter
- query_params[:'fields[campaign-message]'] = @api_client.build_collection_param(opts[:'fields_campaign_message'], :csv) if !opts[:'fields_campaign_message'].nil?
- query_params[:'fields[campaign]'] = @api_client.build_collection_param(opts[:'fields_campaign'], :csv) if !opts[:'fields_campaign'].nil?
- query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
- query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# form parameters
form_params = opts[:form_params] || {}
@@ -1493,7 +1486,7 @@ def get_campaigns_with_http_info(filter, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.get_campaigns",
+ :operation => :"CampaignsApi.get_template_id_for_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1504,42 +1497,118 @@ def get_campaigns_with_http_info(filter, opts = {})
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#get_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#get_template_id_for_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update Campaign
- # Update a campaign with the given campaign ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The campaign ID to be retrieved
- # @param campaign_partial_update_query [CampaignPartialUpdateQuery] Update a campaign and return it
+ # alias of `get_template_id_for_campaign_message_with_http_info`
+ alias get_campaign_message_relationships_template_with_http_info get_template_id_for_campaign_message_with_http_info
+
+ # Refresh Campaign Recipient Estimation
+ # Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_recipient_estimation_job_create_query [CampaignRecipientEstimationJobCreateQuery] Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
# @param [Hash] opts the optional parameters
# @return [Hash]
- def update_campaign(id, campaign_partial_update_query, opts = {})
- data, _status_code, _headers = update_campaign_with_http_info(id, campaign_partial_update_query, opts)
+ def refresh_campaign_recipient_estimation(campaign_recipient_estimation_job_create_query, opts = {})
+ data, _status_code, _headers = refresh_campaign_recipient_estimation_with_http_info(campaign_recipient_estimation_job_create_query, opts)
data
end
- # Update Campaign
- # Update a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The campaign ID to be retrieved
- # @param campaign_partial_update_query [CampaignPartialUpdateQuery] Update a campaign and return it
+ # alias of `refresh_campaign_recipient_estimation`
+ alias create_campaign_recipient_estimation_job refresh_campaign_recipient_estimation
+
+ # Refresh Campaign Recipient Estimation
+ # Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_recipient_estimation_job_create_query [CampaignRecipientEstimationJobCreateQuery] Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
+ def refresh_campaign_recipient_estimation_with_http_info(campaign_recipient_estimation_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.refresh_campaign_recipient_estimation ...'
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 CampaignsApi.update_campaign"
+ # verify the required parameter 'campaign_recipient_estimation_job_create_query' is set
+ if @api_client.config.client_side_validation && campaign_recipient_estimation_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_recipient_estimation_job_create_query' when calling CampaignsApi.refresh_campaign_recipient_estimation"
end
- # verify the required parameter 'campaign_partial_update_query' is set
- if @api_client.config.client_side_validation && campaign_partial_update_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_partial_update_query' when calling CampaignsApi.update_campaign"
+ # resource path
+ local_var_path = '/api/campaign-recipient-estimation-jobs'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # klaviyo api revision
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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(campaign_recipient_estimation_job_create_query)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'Hash'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.refresh_campaign_recipient_estimation",
+ :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, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#refresh_campaign_recipient_estimation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # alias of `refresh_campaign_recipient_estimation_with_http_info`
+ alias create_campaign_recipient_estimation_job_with_http_info refresh_campaign_recipient_estimation_with_http_info
+
+ # Send Campaign
+ # Trigger a campaign to send asynchronously
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_send_job_create_query [CampaignSendJobCreateQuery] Trigger the campaign to send asynchronously
+ # @param [Hash] opts the optional parameters
+ # @return [Hash]
+ def send_campaign(campaign_send_job_create_query, opts = {})
+ data, _status_code, _headers = send_campaign_with_http_info(campaign_send_job_create_query, opts)
+ data
+ end
+
+ # alias of `send_campaign`
+ alias create_campaign_send_job send_campaign
+
+ # Send Campaign
+ # Trigger a campaign to send asynchronously<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param campaign_send_job_create_query [CampaignSendJobCreateQuery] Trigger the campaign to send asynchronously
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def send_campaign_with_http_info(campaign_send_job_create_query, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.send_campaign ...'
+ end
+ # verify the required parameter 'campaign_send_job_create_query' is set
+ if @api_client.config.client_side_validation && campaign_send_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_send_job_create_query' when calling CampaignsApi.send_campaign"
end
# resource path
- local_var_path = '/api/campaigns/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-send-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -1547,11 +1616,11 @@ def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -1560,7 +1629,7 @@ def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_partial_update_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_send_job_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -1569,7 +1638,7 @@ def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.update_campaign",
+ :operation => :"CampaignsApi.send_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1578,44 +1647,47 @@ def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#send_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update Campaign Message
- # Update a campaign message
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The message ID to be retrieved
- # @param campaign_message_partial_update_query [CampaignMessagePartialUpdateQuery] Update a message and return it
+ # alias of `send_campaign_with_http_info`
+ alias create_campaign_send_job_with_http_info send_campaign_with_http_info
+
+ # Update Campaign
+ # Update a campaign with the given campaign ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The campaign ID to be retrieved
+ # @param campaign_partial_update_query [CampaignPartialUpdateQuery] Update a campaign and return it
# @param [Hash] opts the optional parameters
# @return [Hash]
- def update_campaign_message(id, campaign_message_partial_update_query, opts = {})
- data, _status_code, _headers = update_campaign_message_with_http_info(id, campaign_message_partial_update_query, opts)
+ def update_campaign(id, campaign_partial_update_query, opts = {})
+ data, _status_code, _headers = update_campaign_with_http_info(id, campaign_partial_update_query, opts)
data
end
- # Update Campaign Message
- # Update a campaign message<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The message ID to be retrieved
- # @param campaign_message_partial_update_query [CampaignMessagePartialUpdateQuery] Update a message and return it
+ # Update Campaign
+ # Update a campaign with the given campaign ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The campaign ID to be retrieved
+ # @param campaign_partial_update_query [CampaignPartialUpdateQuery] Update a campaign and return it
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def update_campaign_message_with_http_info(id, campaign_message_partial_update_query, opts = {})
+ def update_campaign_with_http_info(id, campaign_partial_update_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign_message ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign ...'
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 CampaignsApi.update_campaign_message"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.update_campaign"
end
- # verify the required parameter 'campaign_message_partial_update_query' is set
- if @api_client.config.client_side_validation && campaign_message_partial_update_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_message_partial_update_query' when calling CampaignsApi.update_campaign_message"
+ # verify the required parameter 'campaign_partial_update_query' is set
+ if @api_client.config.client_side_validation && campaign_partial_update_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_partial_update_query' when calling CampaignsApi.update_campaign"
end
# resource path
- local_var_path = '/api/campaign-messages/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -1623,11 +1695,11 @@ def update_campaign_message_with_http_info(id, campaign_message_partial_update_q
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -1636,7 +1708,7 @@ def update_campaign_message_with_http_info(id, campaign_message_partial_update_q
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_message_partial_update_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_partial_update_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -1645,7 +1717,7 @@ def update_campaign_message_with_http_info(id, campaign_message_partial_update_q
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.update_campaign_message",
+ :operation => :"CampaignsApi.update_campaign",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1656,42 +1728,42 @@ def update_campaign_message_with_http_info(id, campaign_message_partial_update_q
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#update_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Update Campaign Send Job
- # Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The ID of the currently sending campaign to cancel or revert
- # @param campaign_send_job_partial_update_query [CampaignSendJobPartialUpdateQuery] Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
+ # Update Campaign Message
+ # Update a campaign message
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The message ID to be retrieved
+ # @param campaign_message_partial_update_query [CampaignMessagePartialUpdateQuery] Update a message and return it
# @param [Hash] opts the optional parameters
- # @return [nil]
- def update_campaign_send_job(id, campaign_send_job_partial_update_query, opts = {})
- update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update_query, opts)
- nil
+ # @return [Hash]
+ def update_campaign_message(id, campaign_message_partial_update_query, opts = {})
+ data, _status_code, _headers = update_campaign_message_with_http_info(id, campaign_message_partial_update_query, opts)
+ data
end
- # Update Campaign Send Job
- # Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
- # @param id [String] The ID of the currently sending campaign to cancel or revert
- # @param campaign_send_job_partial_update_query [CampaignSendJobPartialUpdateQuery] Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT
+ # Update Campaign Message
+ # Update a campaign message<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:write`
+ # @param id [String] The message ID to be retrieved
+ # @param campaign_message_partial_update_query [CampaignMessagePartialUpdateQuery] Update a message and return it
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update_query, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def update_campaign_message_with_http_info(id, campaign_message_partial_update_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign_send_job ...'
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign_message ...'
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 CampaignsApi.update_campaign_send_job"
+ fail ArgumentError, "Missing the required parameter 'id' when calling CampaignsApi.update_campaign_message"
end
- # verify the required parameter 'campaign_send_job_partial_update_query' is set
- if @api_client.config.client_side_validation && campaign_send_job_partial_update_query.nil?
- fail ArgumentError, "Missing the required parameter 'campaign_send_job_partial_update_query' when calling CampaignsApi.update_campaign_send_job"
+ # verify the required parameter 'campaign_message_partial_update_query' is set
+ if @api_client.config.client_side_validation && campaign_message_partial_update_query.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_message_partial_update_query' when calling CampaignsApi.update_campaign_message"
end
# resource path
- local_var_path = '/api/campaign-send-jobs/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/campaign-messages/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -1699,11 +1771,11 @@ def update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -1712,16 +1784,16 @@ def update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_send_job_partial_update_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_message_partial_update_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CampaignsApi.update_campaign_send_job",
+ :operation => :"CampaignsApi.update_campaign_message",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1732,7 +1804,7 @@ def update_campaign_send_job_with_http_info(id, campaign_send_job_partial_update
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CampaignsApi#update_campaign_send_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CampaignsApi#update_campaign_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
diff --git a/lib/klaviyo-api-sdk/api/catalogs_api.rb b/lib/klaviyo-api-sdk/api/catalogs_api.rb
index a742162..cf757b4 100644
--- a/lib/klaviyo-api-sdk/api/catalogs_api.rb
+++ b/lib/klaviyo-api-sdk/api/catalogs_api.rb
@@ -3,7 +3,7 @@
#The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
-The version of the OpenAPI document: 2024-07-15
+The version of the OpenAPI document: 2024-10-15
Contact: developers@klaviyo.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 6.2.1
@@ -19,31 +19,43 @@ class CatalogsApi
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
- # Create Back In Stock Subscription
- # Subscribe a profile to receive back in stock notifications. Check out [our Back in Stock API guide](https://developers.klaviyo.com/en/docs/how_to_set_up_custom_back_in_stock) for more details. This endpoint is specifically designed to be called from server-side applications. To create subscriptions from client-side contexts, use [POST /client/back-in-stock-subscriptions](https://developers.klaviyo.com/en/reference/create_client_back_in_stock_subscription).
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:write` `profiles:write`
- # @param server_bis_subscription_create_query [ServerBISSubscriptionCreateQuery]
+ # Add Category to Catalog Item
+ # Create a new catalog category relationship for the given item ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
# @param [Hash] opts the optional parameters
# @return [nil]
- def create_back_in_stock_subscription(server_bis_subscription_create_query, opts = {})
- create_back_in_stock_subscription_with_http_info(server_bis_subscription_create_query, opts)
+ def add_category_to_catalog_item(id, catalog_item_category_op, opts = {})
+ add_category_to_catalog_item_with_http_info(id, catalog_item_category_op, opts)
nil
end
- # Create Back In Stock Subscription
- # Subscribe a profile to receive back in stock notifications. Check out [our Back in Stock API guide](https://developers.klaviyo.com/en/docs/how_to_set_up_custom_back_in_stock) for more details. This endpoint is specifically designed to be called from server-side applications. To create subscriptions from client-side contexts, use [POST /client/back-in-stock-subscriptions](https://developers.klaviyo.com/en/reference/create_client_back_in_stock_subscription).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:write` `profiles:write`
- # @param server_bis_subscription_create_query [ServerBISSubscriptionCreateQuery]
+ # alias of `add_category_to_catalog_item`
+ alias create_catalog_item_relationships_categories add_category_to_catalog_item
+
+ # alias of `add_category_to_catalog_item`
+ alias create_catalog_item_relationships_category add_category_to_catalog_item
+
+ # Add Category to Catalog Item
+ # Create a new catalog category relationship for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def create_back_in_stock_subscription_with_http_info(server_bis_subscription_create_query, opts = {})
+ def add_category_to_catalog_item_with_http_info(id, catalog_item_category_op, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_back_in_stock_subscription ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.add_category_to_catalog_item ...'
end
- # verify the required parameter 'server_bis_subscription_create_query' is set
- if @api_client.config.client_side_validation && server_bis_subscription_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'server_bis_subscription_create_query' when calling CatalogsApi.create_back_in_stock_subscription"
+ # 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 CatalogsApi.add_category_to_catalog_item"
+ end
+ # verify the required parameter 'catalog_item_category_op' is set
+ if @api_client.config.client_side_validation && catalog_item_category_op.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.add_category_to_catalog_item"
end
# resource path
- local_var_path = '/api/back-in-stock-subscriptions/'
+ local_var_path = '/api/catalog-items/{id}/relationships/categories'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -51,11 +63,11 @@ def create_back_in_stock_subscription_with_http_info(server_bis_subscription_cre
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -64,7 +76,7 @@ def create_back_in_stock_subscription_with_http_info(server_bis_subscription_cre
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(server_bis_subscription_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
# return_type
return_type = opts[:debug_return_type]
@@ -73,7 +85,7 @@ def create_back_in_stock_subscription_with_http_info(server_bis_subscription_cre
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_back_in_stock_subscription",
+ :operation => :"CatalogsApi.add_category_to_catalog_item",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -84,36 +96,54 @@ def create_back_in_stock_subscription_with_http_info(server_bis_subscription_cre
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_back_in_stock_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#add_category_to_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Catalog Category
- # Create a new catalog category.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_category_create_query [CatalogCategoryCreateQuery]
+ # alias of `add_category_to_catalog_item_with_http_info`
+ alias create_catalog_item_relationships_categories_with_http_info add_category_to_catalog_item_with_http_info
+
+ # alias of `add_category_to_catalog_item_with_http_info`
+ alias create_catalog_item_relationships_category_with_http_info add_category_to_catalog_item_with_http_info
+
+ # Add Items to Catalog Category
+ # Create a new item relationship for the given category ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
# @param [Hash] opts the optional parameters
- # @return [Hash]
- def create_catalog_category(catalog_category_create_query, opts = {})
- data, _status_code, _headers = create_catalog_category_with_http_info(catalog_category_create_query, opts)
- data
+ # @return [nil]
+ def add_items_to_catalog_category(id, catalog_category_item_op, opts = {})
+ add_items_to_catalog_category_with_http_info(id, catalog_category_item_op, opts)
+ nil
end
- # Create Catalog Category
- # Create a new catalog category.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_category_create_query [CatalogCategoryCreateQuery]
+ # alias of `add_items_to_catalog_category`
+ alias create_catalog_category_relationships_items add_items_to_catalog_category
+
+ # alias of `add_items_to_catalog_category`
+ alias create_catalog_category_relationships_item add_items_to_catalog_category
+
+ # Add Items to Catalog Category
+ # Create a new item relationship for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
# @param [Hash] opts the optional parameters
- # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_catalog_category_with_http_info(catalog_category_create_query, opts = {})
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def add_items_to_catalog_category_with_http_info(id, catalog_category_item_op, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_category ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.add_items_to_catalog_category ...'
end
- # verify the required parameter 'catalog_category_create_query' is set
- if @api_client.config.client_side_validation && catalog_category_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_category_create_query' when calling CatalogsApi.create_catalog_category"
+ # 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 CatalogsApi.add_items_to_catalog_category"
+ end
+ # verify the required parameter 'catalog_category_item_op' is set
+ if @api_client.config.client_side_validation && catalog_category_item_op.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.add_items_to_catalog_category"
end
# resource path
- local_var_path = '/api/catalog-categories/'
+ local_var_path = '/api/catalog-categories/{id}/relationships/items'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
# query parameters
query_params = opts[:query_params] || {}
@@ -121,11 +151,11 @@ def create_catalog_category_with_http_info(catalog_category_create_query, opts =
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -134,16 +164,16 @@ def create_catalog_category_with_http_info(catalog_category_create_query, opts =
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
# return_type
- return_type = opts[:debug_return_type] || 'Hash'
+ return_type = opts[:debug_return_type]
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_catalog_category",
+ :operation => :"CatalogsApi.add_items_to_catalog_category",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -154,45 +184,48 @@ def create_catalog_category_with_http_info(catalog_category_create_query, opts =
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#add_items_to_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Catalog Category Relationships Items
- # Create a new item relationship for the given category ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_category_item_op [CatalogCategoryItemOp]
+ # alias of `add_items_to_catalog_category_with_http_info`
+ alias create_catalog_category_relationships_items_with_http_info add_items_to_catalog_category_with_http_info
+
+ # alias of `add_items_to_catalog_category_with_http_info`
+ alias create_catalog_category_relationships_item_with_http_info add_items_to_catalog_category_with_http_info
+
+ # Bulk Create Catalog Categories
+ # Create a catalog category bulk create job to create a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_create_job_create_query [CatalogCategoryCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def create_catalog_category_relationships_items(id, catalog_category_item_op, opts = {})
- create_catalog_category_relationships_items_with_http_info(id, catalog_category_item_op, opts)
- nil
+ # @return [Hash]
+ def bulk_create_catalog_categories(catalog_category_create_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_create_catalog_categories_with_http_info(catalog_category_create_job_create_query, opts)
+ data
end
- # alias of `create_catalog_category_relationships_items`
- alias create_catalog_category_relationships_item create_catalog_category_relationships_items
+ # alias of `bulk_create_catalog_categories`
+ alias spawn_create_categories_job bulk_create_catalog_categories
- # Create Catalog Category Relationships Items
- # Create a new item relationship for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_category_item_op [CatalogCategoryItemOp]
+ # alias of `bulk_create_catalog_categories`
+ alias create_catalog_category_bulk_create_job bulk_create_catalog_categories
+
+ # Bulk Create Catalog Categories
+ # Create a catalog category bulk create job to create a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_create_job_create_query [CatalogCategoryCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def create_catalog_category_relationships_items_with_http_info(id, catalog_category_item_op, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_create_catalog_categories_with_http_info(catalog_category_create_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_category_relationships_items ...'
- 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 CatalogsApi.create_catalog_category_relationships_items"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_create_catalog_categories ...'
end
- # verify the required parameter 'catalog_category_item_op' is set
- if @api_client.config.client_side_validation && catalog_category_item_op.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.create_catalog_category_relationships_items"
+ # verify the required parameter 'catalog_category_create_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_category_create_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_category_create_job_create_query' when calling CatalogsApi.bulk_create_catalog_categories"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/relationships/items/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-category-bulk-create-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -200,11 +233,11 @@ def create_catalog_category_relationships_items_with_http_info(id, catalog_categ
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -213,16 +246,16 @@ def create_catalog_category_relationships_items_with_http_info(id, catalog_categ
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_create_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_catalog_category_relationships_items",
+ :operation => :"CatalogsApi.bulk_create_catalog_categories",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -233,39 +266,48 @@ def create_catalog_category_relationships_items_with_http_info(id, catalog_categ
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_category_relationships_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_create_catalog_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # alias of `create_catalog_category_relationships_items_with_http_info`
- alias create_catalog_category_relationships_item_with_http_info create_catalog_category_relationships_items_with_http_info
+ # alias of `bulk_create_catalog_categories_with_http_info`
+ alias spawn_create_categories_job_with_http_info bulk_create_catalog_categories_with_http_info
- # Create Catalog Item
- # Create a new catalog item.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_item_create_query [CatalogItemCreateQuery]
+ # alias of `bulk_create_catalog_categories_with_http_info`
+ alias create_catalog_category_bulk_create_job_with_http_info bulk_create_catalog_categories_with_http_info
+
+ # Bulk Create Catalog Items
+ # Create a catalog item bulk create job to create a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_create_job_create_query [CatalogItemCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
# @return [Hash]
- def create_catalog_item(catalog_item_create_query, opts = {})
- data, _status_code, _headers = create_catalog_item_with_http_info(catalog_item_create_query, opts)
+ def bulk_create_catalog_items(catalog_item_create_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_create_catalog_items_with_http_info(catalog_item_create_job_create_query, opts)
data
end
- # Create Catalog Item
- # Create a new catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_item_create_query [CatalogItemCreateQuery]
+ # alias of `bulk_create_catalog_items`
+ alias spawn_create_items_job bulk_create_catalog_items
+
+ # alias of `bulk_create_catalog_items`
+ alias create_catalog_item_bulk_create_job bulk_create_catalog_items
+
+ # Bulk Create Catalog Items
+ # Create a catalog item bulk create job to create a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_create_job_create_query [CatalogItemCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
+ def bulk_create_catalog_items_with_http_info(catalog_item_create_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_item ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_create_catalog_items ...'
end
- # verify the required parameter 'catalog_item_create_query' is set
- if @api_client.config.client_side_validation && catalog_item_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_item_create_query' when calling CatalogsApi.create_catalog_item"
+ # verify the required parameter 'catalog_item_create_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_item_create_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_item_create_job_create_query' when calling CatalogsApi.bulk_create_catalog_items"
end
# resource path
- local_var_path = '/api/catalog-items/'
+ local_var_path = '/api/catalog-item-bulk-create-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -273,11 +315,11 @@ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -286,7 +328,7 @@ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_create_job_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -295,7 +337,7 @@ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_catalog_item",
+ :operation => :"CatalogsApi.bulk_create_catalog_items",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -306,45 +348,48 @@ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_create_catalog_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Create Catalog Item Relationships Categories
- # Create a new catalog category relationship for the given item ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_item_category_op [CatalogItemCategoryOp]
+ # alias of `bulk_create_catalog_items_with_http_info`
+ alias spawn_create_items_job_with_http_info bulk_create_catalog_items_with_http_info
+
+ # alias of `bulk_create_catalog_items_with_http_info`
+ alias create_catalog_item_bulk_create_job_with_http_info bulk_create_catalog_items_with_http_info
+
+ # Bulk Create Catalog Variants
+ # Create a catalog variant bulk create job to create a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_create_job_create_query [CatalogVariantCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def create_catalog_item_relationships_categories(id, catalog_item_category_op, opts = {})
- create_catalog_item_relationships_categories_with_http_info(id, catalog_item_category_op, opts)
- nil
+ # @return [Hash]
+ def bulk_create_catalog_variants(catalog_variant_create_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_create_catalog_variants_with_http_info(catalog_variant_create_job_create_query, opts)
+ data
end
- # alias of `create_catalog_item_relationships_categories`
- alias create_catalog_item_relationships_category create_catalog_item_relationships_categories
+ # alias of `bulk_create_catalog_variants`
+ alias spawn_create_variants_job bulk_create_catalog_variants
- # Create Catalog Item Relationships Categories
- # Create a new catalog category relationship for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_item_category_op [CatalogItemCategoryOp]
+ # alias of `bulk_create_catalog_variants`
+ alias create_catalog_variant_bulk_create_job bulk_create_catalog_variants
+
+ # Bulk Create Catalog Variants
+ # Create a catalog variant bulk create job to create a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_create_job_create_query [CatalogVariantCreateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def create_catalog_item_relationships_categories_with_http_info(id, catalog_item_category_op, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_create_catalog_variants_with_http_info(catalog_variant_create_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_item_relationships_categories ...'
- 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 CatalogsApi.create_catalog_item_relationships_categories"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_create_catalog_variants ...'
end
- # verify the required parameter 'catalog_item_category_op' is set
- if @api_client.config.client_side_validation && catalog_item_category_op.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.create_catalog_item_relationships_categories"
+ # verify the required parameter 'catalog_variant_create_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_variant_create_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_create_job_create_query' when calling CatalogsApi.bulk_create_catalog_variants"
end
# resource path
- local_var_path = '/api/catalog-items/{id}/relationships/categories/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-variant-bulk-create-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -352,11 +397,11 @@ def create_catalog_item_relationships_categories_with_http_info(id, catalog_item
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -365,16 +410,16 @@ def create_catalog_item_relationships_categories_with_http_info(id, catalog_item
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_create_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_catalog_item_relationships_categories",
+ :operation => :"CatalogsApi.bulk_create_catalog_variants",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -385,39 +430,48 @@ def create_catalog_item_relationships_categories_with_http_info(id, catalog_item
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_item_relationships_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_create_catalog_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # alias of `create_catalog_item_relationships_categories_with_http_info`
- alias create_catalog_item_relationships_category_with_http_info create_catalog_item_relationships_categories_with_http_info
+ # alias of `bulk_create_catalog_variants_with_http_info`
+ alias spawn_create_variants_job_with_http_info bulk_create_catalog_variants_with_http_info
- # Create Catalog Variant
- # Create a new variant for a related catalog item.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_variant_create_query [CatalogVariantCreateQuery]
+ # alias of `bulk_create_catalog_variants_with_http_info`
+ alias create_catalog_variant_bulk_create_job_with_http_info bulk_create_catalog_variants_with_http_info
+
+ # Bulk Delete Catalog Categories
+ # Create a catalog category bulk delete job to delete a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_delete_job_create_query [CatalogCategoryDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
# @return [Hash]
- def create_catalog_variant(catalog_variant_create_query, opts = {})
- data, _status_code, _headers = create_catalog_variant_with_http_info(catalog_variant_create_query, opts)
+ def bulk_delete_catalog_categories(catalog_category_delete_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_delete_catalog_categories_with_http_info(catalog_category_delete_job_create_query, opts)
data
end
- # Create Catalog Variant
- # Create a new variant for a related catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param catalog_variant_create_query [CatalogVariantCreateQuery]
+ # alias of `bulk_delete_catalog_categories`
+ alias spawn_delete_categories_job bulk_delete_catalog_categories
+
+ # alias of `bulk_delete_catalog_categories`
+ alias create_catalog_category_bulk_delete_job bulk_delete_catalog_categories
+
+ # Bulk Delete Catalog Categories
+ # Create a catalog category bulk delete job to delete a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_delete_job_create_query [CatalogCategoryDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {})
+ def bulk_delete_catalog_categories_with_http_info(catalog_category_delete_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_variant ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_delete_catalog_categories ...'
end
- # verify the required parameter 'catalog_variant_create_query' is set
- if @api_client.config.client_side_validation && catalog_variant_create_query.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_variant_create_query' when calling CatalogsApi.create_catalog_variant"
+ # verify the required parameter 'catalog_category_delete_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_category_delete_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_category_delete_job_create_query' when calling CatalogsApi.bulk_delete_catalog_categories"
end
# resource path
- local_var_path = '/api/catalog-variants/'
+ local_var_path = '/api/catalog-category-bulk-delete-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -425,11 +479,11 @@ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -438,7 +492,7 @@ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_create_query)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_delete_job_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -447,7 +501,7 @@ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.create_catalog_variant",
+ :operation => :"CatalogsApi.bulk_delete_catalog_categories",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -458,36 +512,48 @@ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_delete_catalog_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete Catalog Category
- # Delete a catalog category using the given category ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # alias of `bulk_delete_catalog_categories_with_http_info`
+ alias spawn_delete_categories_job_with_http_info bulk_delete_catalog_categories_with_http_info
+
+ # alias of `bulk_delete_catalog_categories_with_http_info`
+ alias create_catalog_category_bulk_delete_job_with_http_info bulk_delete_catalog_categories_with_http_info
+
+ # Bulk Delete Catalog Items
+ # Create a catalog item bulk delete job to delete a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_delete_job_create_query [CatalogItemDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_catalog_category(id, opts = {})
- delete_catalog_category_with_http_info(id, opts)
- nil
+ # @return [Hash]
+ def bulk_delete_catalog_items(catalog_item_delete_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_delete_catalog_items_with_http_info(catalog_item_delete_job_create_query, opts)
+ data
end
- # Delete Catalog Category
- # Delete a catalog category using the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # alias of `bulk_delete_catalog_items`
+ alias spawn_delete_items_job bulk_delete_catalog_items
+
+ # alias of `bulk_delete_catalog_items`
+ alias create_catalog_item_bulk_delete_job bulk_delete_catalog_items
+
+ # Bulk Delete Catalog Items
+ # Create a catalog item bulk delete job to delete a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_delete_job_create_query [CatalogItemDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def delete_catalog_category_with_http_info(id, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_delete_catalog_items_with_http_info(catalog_item_delete_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_category ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_delete_catalog_items ...'
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 CatalogsApi.delete_catalog_category"
+ # verify the required parameter 'catalog_item_delete_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_item_delete_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_item_delete_job_create_query' when calling CatalogsApi.bulk_delete_catalog_items"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-item-bulk-delete-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -495,24 +561,29 @@ def delete_catalog_category_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_delete_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.delete_catalog_category",
+ :operation => :"CatalogsApi.bulk_delete_catalog_items",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -521,44 +592,50 @@ def delete_catalog_category_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_delete_catalog_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete Catalog Category Relationships Items
- # Delete item relationships for the given category ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_category_item_op [CatalogCategoryItemOp]
+ # alias of `bulk_delete_catalog_items_with_http_info`
+ alias spawn_delete_items_job_with_http_info bulk_delete_catalog_items_with_http_info
+
+ # alias of `bulk_delete_catalog_items_with_http_info`
+ alias create_catalog_item_bulk_delete_job_with_http_info bulk_delete_catalog_items_with_http_info
+
+ # Bulk Delete Catalog Variants
+ # Create a catalog variant bulk delete job to delete a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_delete_job_create_query [CatalogVariantDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_catalog_category_relationships_items(id, catalog_category_item_op, opts = {})
- delete_catalog_category_relationships_items_with_http_info(id, catalog_category_item_op, opts)
- nil
+ # @return [Hash]
+ def bulk_delete_catalog_variants(catalog_variant_delete_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_delete_catalog_variants_with_http_info(catalog_variant_delete_job_create_query, opts)
+ data
end
- # Delete Catalog Category Relationships Items
- # Delete item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_category_item_op [CatalogCategoryItemOp]
+ # alias of `bulk_delete_catalog_variants`
+ alias spawn_delete_variants_job bulk_delete_catalog_variants
+
+ # alias of `bulk_delete_catalog_variants`
+ alias create_catalog_variant_bulk_delete_job bulk_delete_catalog_variants
+
+ # Bulk Delete Catalog Variants
+ # Create a catalog variant bulk delete job to delete a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_delete_job_create_query [CatalogVariantDeleteJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def delete_catalog_category_relationships_items_with_http_info(id, catalog_category_item_op, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_delete_catalog_variants_with_http_info(catalog_variant_delete_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_category_relationships_items ...'
- 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 CatalogsApi.delete_catalog_category_relationships_items"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_delete_catalog_variants ...'
end
- # verify the required parameter 'catalog_category_item_op' is set
- if @api_client.config.client_side_validation && catalog_category_item_op.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.delete_catalog_category_relationships_items"
+ # verify the required parameter 'catalog_variant_delete_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_variant_delete_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_delete_job_create_query' when calling CatalogsApi.bulk_delete_catalog_variants"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/relationships/items/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-variant-bulk-delete-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -566,11 +643,11 @@ def delete_catalog_category_relationships_items_with_http_info(id, catalog_categ
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -579,16 +656,16 @@ def delete_catalog_category_relationships_items_with_http_info(id, catalog_categ
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_delete_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.delete_catalog_category_relationships_items",
+ :operation => :"CatalogsApi.bulk_delete_catalog_variants",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -597,38 +674,50 @@ def delete_catalog_category_relationships_items_with_http_info(id, catalog_categ
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_category_relationships_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_delete_catalog_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete Catalog Item
- # Delete a catalog item with the given item ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
- # @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_catalog_item(id, opts = {})
- delete_catalog_item_with_http_info(id, opts)
- nil
+ # alias of `bulk_delete_catalog_variants_with_http_info`
+ alias spawn_delete_variants_job_with_http_info bulk_delete_catalog_variants_with_http_info
+
+ # alias of `bulk_delete_catalog_variants_with_http_info`
+ alias create_catalog_variant_bulk_delete_job_with_http_info bulk_delete_catalog_variants_with_http_info
+
+ # Bulk Update Catalog Categories
+ # Create a catalog category bulk update job to update a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_update_job_create_query [CatalogCategoryUpdateJobCreateQuery]
+ # @param [Hash] opts the optional parameters
+ # @return [Hash]
+ def bulk_update_catalog_categories(catalog_category_update_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_update_catalog_categories_with_http_info(catalog_category_update_job_create_query, opts)
+ data
end
- # Delete Catalog Item
- # Delete a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # alias of `bulk_update_catalog_categories`
+ alias spawn_update_categories_job bulk_update_catalog_categories
+
+ # alias of `bulk_update_catalog_categories`
+ alias create_catalog_category_bulk_update_job bulk_update_catalog_categories
+
+ # Bulk Update Catalog Categories
+ # Create a catalog category bulk update job to update a batch of catalog categories. Accepts up to 100 catalog categories per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_update_job_create_query [CatalogCategoryUpdateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def delete_catalog_item_with_http_info(id, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_update_catalog_categories_with_http_info(catalog_category_update_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_item ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_update_catalog_categories ...'
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 CatalogsApi.delete_catalog_item"
+ # verify the required parameter 'catalog_category_update_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_category_update_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_category_update_job_create_query' when calling CatalogsApi.bulk_update_catalog_categories"
end
# resource path
- local_var_path = '/api/catalog-items/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-category-bulk-update-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -636,24 +725,29 @@ def delete_catalog_item_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_update_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.delete_catalog_item",
+ :operation => :"CatalogsApi.bulk_update_catalog_categories",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -662,44 +756,50 @@ def delete_catalog_item_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_update_catalog_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete Catalog Item Relationships Categories
- # Delete catalog category relationships for the given item ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_item_category_op [CatalogItemCategoryOp]
+ # alias of `bulk_update_catalog_categories_with_http_info`
+ alias spawn_update_categories_job_with_http_info bulk_update_catalog_categories_with_http_info
+
+ # alias of `bulk_update_catalog_categories_with_http_info`
+ alias create_catalog_category_bulk_update_job_with_http_info bulk_update_catalog_categories_with_http_info
+
+ # Bulk Update Catalog Items
+ # Create a catalog item bulk update job to update a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_update_job_create_query [CatalogItemUpdateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_catalog_item_relationships_categories(id, catalog_item_category_op, opts = {})
- delete_catalog_item_relationships_categories_with_http_info(id, catalog_item_category_op, opts)
- nil
+ # @return [Hash]
+ def bulk_update_catalog_items(catalog_item_update_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_update_catalog_items_with_http_info(catalog_item_update_job_create_query, opts)
+ data
end
- # Delete Catalog Item Relationships Categories
- # Delete catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String]
- # @param catalog_item_category_op [CatalogItemCategoryOp]
+ # alias of `bulk_update_catalog_items`
+ alias spawn_update_items_job bulk_update_catalog_items
+
+ # alias of `bulk_update_catalog_items`
+ alias create_catalog_item_bulk_update_job bulk_update_catalog_items
+
+ # Bulk Update Catalog Items
+ # Create a catalog item bulk update job to update a batch of catalog items. Accepts up to 100 catalog items per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_update_job_create_query [CatalogItemUpdateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def delete_catalog_item_relationships_categories_with_http_info(id, catalog_item_category_op, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_update_catalog_items_with_http_info(catalog_item_update_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_item_relationships_categories ...'
- 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 CatalogsApi.delete_catalog_item_relationships_categories"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_update_catalog_items ...'
end
- # verify the required parameter 'catalog_item_category_op' is set
- if @api_client.config.client_side_validation && catalog_item_category_op.nil?
- fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.delete_catalog_item_relationships_categories"
+ # verify the required parameter 'catalog_item_update_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_item_update_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_item_update_job_create_query' when calling CatalogsApi.bulk_update_catalog_items"
end
# resource path
- local_var_path = '/api/catalog-items/{id}/relationships/categories/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-item-bulk-update-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -707,11 +807,11 @@ def delete_catalog_item_relationships_categories_with_http_info(id, catalog_item
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
# HTTP header 'Content-Type'
- content_type = @api_client.select_header_content_type(['application/json'])
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
@@ -720,16 +820,16 @@ def delete_catalog_item_relationships_categories_with_http_info(id, catalog_item
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_update_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.delete_catalog_item_relationships_categories",
+ :operation => :"CatalogsApi.bulk_update_catalog_items",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -738,38 +838,50 @@ def delete_catalog_item_relationships_categories_with_http_info(id, catalog_item
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_item_relationships_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_update_catalog_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Delete Catalog Variant
- # Delete a catalog item variant with the given variant ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # alias of `bulk_update_catalog_items_with_http_info`
+ alias spawn_update_items_job_with_http_info bulk_update_catalog_items_with_http_info
+
+ # alias of `bulk_update_catalog_items_with_http_info`
+ alias create_catalog_item_bulk_update_job_with_http_info bulk_update_catalog_items_with_http_info
+
+ # Bulk Update Catalog Variants
+ # Create a catalog variant bulk update job to update a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_update_job_create_query [CatalogVariantUpdateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_catalog_variant(id, opts = {})
- delete_catalog_variant_with_http_info(id, opts)
- nil
+ # @return [Hash]
+ def bulk_update_catalog_variants(catalog_variant_update_job_create_query, opts = {})
+ data, _status_code, _headers = bulk_update_catalog_variants_with_http_info(catalog_variant_update_job_create_query, opts)
+ data
end
- # Delete Catalog Variant
- # Delete a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
- # @param id [String] The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # alias of `bulk_update_catalog_variants`
+ alias spawn_update_variants_job bulk_update_catalog_variants
+
+ # alias of `bulk_update_catalog_variants`
+ alias create_catalog_variant_bulk_update_job bulk_update_catalog_variants
+
+ # Bulk Update Catalog Variants
+ # Create a catalog variant bulk update job to update a batch of catalog variants. Accepts up to 100 catalog variants per request. The maximum allowed payload size is 5MB. The maximum number of jobs in progress at one time is 500.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_update_job_create_query [CatalogVariantUpdateJobCreateQuery]
# @param [Hash] opts the optional parameters
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
- def delete_catalog_variant_with_http_info(id, opts = {})
+ # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
+ def bulk_update_catalog_variants_with_http_info(catalog_variant_update_job_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_variant ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.bulk_update_catalog_variants ...'
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 CatalogsApi.delete_catalog_variant"
+ # verify the required parameter 'catalog_variant_update_job_create_query' is set
+ if @api_client.config.client_side_validation && catalog_variant_update_job_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_update_job_create_query' when calling CatalogsApi.bulk_update_catalog_variants"
end
# resource path
- local_var_path = '/api/catalog-variants/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-variant-bulk-update-jobs'
# query parameters
query_params = opts[:query_params] || {}
@@ -777,24 +889,29 @@ def delete_catalog_variant_with_http_info(id, opts = {})
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_update_job_create_query)
# return_type
- return_type = opts[:debug_return_type]
+ return_type = opts[:debug_return_type] || 'Hash'
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.delete_catalog_variant",
+ :operation => :"CatalogsApi.bulk_update_catalog_variants",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -803,77 +920,74 @@ def delete_catalog_variant_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#bulk_update_catalog_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Catalog Categories
- # Get all catalog categories in an account. Catalog categories can be sorted by the following fields, in ascending and descending order: `created` Currently, the only supported integration type is `$custom`, and the only supported catalog type is `$default`. Returns a maximum of 100 categories per request.
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:read`
+ # alias of `bulk_update_catalog_variants_with_http_info`
+ alias spawn_update_variants_job_with_http_info bulk_update_catalog_variants_with_http_info
+
+ # alias of `bulk_update_catalog_variants_with_http_info`
+ alias create_catalog_variant_bulk_update_job_with_http_info bulk_update_catalog_variants_with_http_info
+
+ # Create Back In Stock Subscription
+ # Subscribe a profile to receive back in stock notifications. Check out [our Back in Stock API guide](https://developers.klaviyo.com/en/docs/how_to_set_up_custom_back_in_stock) for more details. This endpoint is specifically designed to be called from server-side applications. To create subscriptions from client-side contexts, use [POST /client/back-in-stock-subscriptions](https://developers.klaviyo.com/en/reference/create_client_back_in_stock_subscription).
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:write` `profiles:write`
+ # @param server_bis_subscription_create_query [ServerBISSubscriptionCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item.id`: `equals`<br>`name`: `contains`
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
- # @return [Hash]
- def get_catalog_categories(opts = {})
- data, _status_code, _headers = get_catalog_categories_with_http_info(opts)
- data
+ # @return [nil]
+ def create_back_in_stock_subscription(server_bis_subscription_create_query, opts = {})
+ create_back_in_stock_subscription_with_http_info(server_bis_subscription_create_query, opts)
+ nil
end
- # Get Catalog Categories
- # Get all catalog categories in an account. Catalog categories can be sorted by the following fields, in ascending and descending order: `created` Currently, the only supported integration type is `$custom`, and the only supported catalog type is `$default`. Returns a maximum of 100 categories per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:read`
+ # Create Back In Stock Subscription
+ # Subscribe a profile to receive back in stock notifications. Check out [our Back in Stock API guide](https://developers.klaviyo.com/en/docs/how_to_set_up_custom_back_in_stock) for more details. This endpoint is specifically designed to be called from server-side applications. To create subscriptions from client-side contexts, use [POST /client/back-in-stock-subscriptions](https://developers.klaviyo.com/en/reference/create_client_back_in_stock_subscription).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:write` `profiles:write`
+ # @param server_bis_subscription_create_query [ServerBISSubscriptionCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item.id`: `equals`<br>`name`: `contains`
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
- # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_catalog_categories_with_http_info(opts = {})
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ def create_back_in_stock_subscription_with_http_info(server_bis_subscription_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_categories ...'
- end
- allowable_values = ["external_id", "name", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_back_in_stock_subscription ...'
end
- allowable_values = ["created", "-created"]
- 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}"
+ # verify the required parameter 'server_bis_subscription_create_query' is set
+ if @api_client.config.client_side_validation && server_bis_subscription_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'server_bis_subscription_create_query' when calling CatalogsApi.create_back_in_stock_subscription"
end
# resource path
- local_var_path = '/api/catalog-categories/'
+ local_var_path = '/api/back-in-stock-subscriptions'
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
- query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(server_bis_subscription_create_query)
# return_type
- return_type = opts[:debug_return_type] || 'Hash'
+ return_type = opts[:debug_return_type]
# auth_names
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.get_catalog_categories",
+ :operation => :"CatalogsApi.create_back_in_stock_subscription",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -882,61 +996,59 @@ def get_catalog_categories_with_http_info(opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#create_back_in_stock_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Catalog Category
- # Get a catalog category with the given category ID.
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # Create Catalog Category
+ # Create a new catalog category.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_create_query [CatalogCategoryCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
# @return [Hash]
- def get_catalog_category(id, opts = {})
- data, _status_code, _headers = get_catalog_category_with_http_info(id, opts)
+ def create_catalog_category(catalog_category_create_query, opts = {})
+ data, _status_code, _headers = create_catalog_category_with_http_info(catalog_category_create_query, opts)
data
end
- # Get Catalog Category
- # Get a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # Create Catalog Category
+ # Create a new catalog category.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_category_create_query [CatalogCategoryCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_catalog_category_with_http_info(id, opts = {})
+ def create_catalog_category_with_http_info(catalog_category_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category ...'
- 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 CatalogsApi.get_catalog_category"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_category ...'
end
- allowable_values = ["external_id", "name", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
+ # verify the required parameter 'catalog_category_create_query' is set
+ if @api_client.config.client_side_validation && catalog_category_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_category_create_query' when calling CatalogsApi.create_catalog_category"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-categories'
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -945,7 +1057,7 @@ def get_catalog_category_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.get_catalog_category",
+ :operation => :"CatalogsApi.create_catalog_category",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -954,88 +1066,59 @@ def get_catalog_category_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Catalog Category Items
- # Get all items in a category with the given category ID. Items can be sorted by the following fields, in ascending and descending order: `created` Returns a maximum of 100 items per request.
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String]
+ # Create Catalog Item
+ # Create a new catalog item.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_create_query [CatalogItemCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category.id`: `equals`<br>`title`: `contains`<br>`published`: `equals`
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
# @return [Hash]
- def get_catalog_category_items(id, opts = {})
- data, _status_code, _headers = get_catalog_category_items_with_http_info(id, opts)
+ def create_catalog_item(catalog_item_create_query, opts = {})
+ data, _status_code, _headers = create_catalog_item_with_http_info(catalog_item_create_query, opts)
data
end
- # Get Catalog Category Items
- # Get all items in a category with the given category ID. Items can be sorted by the following fields, in ascending and descending order: `created` Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String]
+ # Create Catalog Item
+ # Create a new catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_item_create_query [CatalogItemCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category.id`: `equals`<br>`title`: `contains`<br>`published`: `equals`
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
- # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sorting
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_catalog_category_items_with_http_info(id, opts = {})
+ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category_items ...'
- 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 CatalogsApi.get_catalog_category_items"
- end
- allowable_values = ["external_id", "title", "description", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
- end
- allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
- if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
- fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
- end
- allowable_values = ["variants"]
- 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}"
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_item ...'
end
- allowable_values = ["created", "-created"]
- 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}"
+ # verify the required parameter 'catalog_item_create_query' is set
+ if @api_client.config.client_side_validation && catalog_item_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_item_create_query' when calling CatalogsApi.create_catalog_item"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/items/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-items'
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
- query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
- query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
- query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -1044,7 +1127,7 @@ def get_catalog_category_items_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.get_catalog_category_items",
+ :operation => :"CatalogsApi.create_catalog_item",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1053,57 +1136,59 @@ def get_catalog_category_items_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Catalog Category Relationships Items
- # Get all items in the given category ID. Returns a maximum of 100 items per request.
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String]
+ # Create Catalog Variant
+ # Create a new variant for a related catalog item.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_create_query [CatalogVariantCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
# @return [Hash]
- def get_catalog_category_relationships_items(id, opts = {})
- data, _status_code, _headers = get_catalog_category_relationships_items_with_http_info(id, opts)
+ def create_catalog_variant(catalog_variant_create_query, opts = {})
+ data, _status_code, _headers = create_catalog_variant_with_http_info(catalog_variant_create_query, opts)
data
end
- # Get Catalog Category Relationships Items
- # Get all items in the given category ID. Returns a maximum of 100 items per request.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String]
+ # Create Catalog Variant
+ # Create a new variant for a related catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param catalog_variant_create_query [CatalogVariantCreateQuery]
# @param [Hash] opts the optional parameters
- # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#pagination
# @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers
- def get_catalog_category_relationships_items_with_http_info(id, opts = {})
+ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category_relationships_items ...'
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_variant ...'
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 CatalogsApi.get_catalog_category_relationships_items"
+ # verify the required parameter 'catalog_variant_create_query' is set
+ if @api_client.config.client_side_validation && catalog_variant_create_query.nil?
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_create_query' when calling CatalogsApi.create_catalog_variant"
end
# resource path
- local_var_path = '/api/catalog-categories/{id}/relationships/items/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
+ local_var_path = '/api/catalog-variants'
# query parameters
query_params = opts[:query_params] || {}
- query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
# header parameters
header_params = opts[:header_params] || {}
# klaviyo api revision
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-07-15"
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
# HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/vnd.api+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]
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_create_query)
# return_type
return_type = opts[:debug_return_type] || 'Hash'
@@ -1112,7 +1197,7 @@ def get_catalog_category_relationships_items_with_http_info(id, opts = {})
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
new_options = opts.merge(
- :operation => :"CatalogsApi.get_catalog_category_relationships_items",
+ :operation => :"CatalogsApi.create_catalog_variant",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -1121,69 +1206,48 @@ def get_catalog_category_relationships_items_with_http_info(id, opts = {})
:return_type => return_type
)
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category_relationships_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get Catalog Item
- # Get a specific catalog item with the given item ID.
*Rate limits*:
Burst: `350/s`
Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # Delete Catalog Category
+ # Delete a catalog category using the given category ID.
*Rate limits*:
Burst: `75/s`
Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @return [Hash]
- def get_catalog_item(id, opts = {})
- data, _status_code, _headers = get_catalog_item_with_http_info(id, opts)
- data
+ # @return [nil]
+ def delete_catalog_category(id, opts = {})
+ delete_catalog_category_with_http_info(id, opts)
+ nil
end
- # Get Catalog Item
- # Get a specific catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `catalogs:read`
- # @param id [String] The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
+ # Delete Catalog Category
+ # Delete a catalog category using the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `catalogs:write`
+ # @param id [String] The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
# @param [Hash] opts the optional parameters
- # @option opts [Array] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#sparse-fieldsets
- # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-07-15/reference/api-overview#relationships
- # @return [Array<(Hash, Integer, Hash)>] Hash