klaviyo-api-sdk 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d912ad2ed63157f996b3b1c86210a305ee7092d6077d08b6c50b483cb31cbdc7
4
- data.tar.gz: bedf4d29446dba67879342fc3e2cce6f21d11562c8e09436d32eea324b5c09df
3
+ metadata.gz: faaaa4c8d774927097aaf6269f1eca694fd4a64087fe8483a073f3030a7c6956
4
+ data.tar.gz: ea8a4fc2b3b2dcff585d74757c1c482ad613ad96f6f3d57ee75925cefffd52a8
5
5
  SHA512:
6
- metadata.gz: 2fde6d2d6eac6b0e4d5e830d309647e07f9a63d01d0ec2692cdcc3e28db9b51051a13e51a760a7e263db65335affa5d12b53334841db685f16b02e28cf9f57e5
7
- data.tar.gz: 7f49417324ac9b44e00ef1a0fdc129ffda3453704cb10eee975b0f1a2dbb5e8a8412503aeac69e6378f14f8a522784482bec7698a0c9ff2bfc14fbf5bee47f44
6
+ metadata.gz: 7868cd36cbc1b413022800f39ca1b2c1f62f6c2115fd85f10d4ffc73b744668b33704710b0983b06cce5d11b567a47be34799fc943450122025c81a878e7e479
7
+ data.tar.gz: a27c77253db6e3f632cd8965b46d6602e1407ef53f1514a117a589ff742f6642d88b7334ffdfa950d378aae795b83e7c188d756a99e09c0fbf71a21e47bc59a1
data/CHANGELOG.md ADDED
@@ -0,0 +1,260 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [9.0.0] - revision 2024-07-15
8
+ ### Added
9
+ - Added several method aliases based on previous operation IDs
10
+
11
+ ## [8.0.0] - revision 2024-07-15
12
+
13
+ ### Added
14
+
15
+ - Forms API
16
+ - New `KlaviyoAPI::Forms` class with methods to get forms, form versions and relationships.
17
+ - Webhooks API
18
+ - new `KlaviyoAPI::Webooks` class containing CRUD operations for webhooks.
19
+
20
+ ### Changed
21
+ - `ProfilesApi.subscribe()`
22
+ - Added `historical_import` flag for importing historically consented profiles can now be optionally supplied in the payload for the Subscribe Profiles endpoint.
23
+ - When using this flag, a consented_at date must be provided and must be in the past.
24
+
25
+
26
+ ## [7.1.0] - revision 2024-06-15
27
+
28
+ ### Added
29
+ - Segments Api
30
+ - New create segment endpoint `KlaviyoAPI::Segments.create_segment()`.
31
+ - New delete segment endpoint `KlaviyoAPI::Segments.delete_segment()`.
32
+ - Updated exisiting segments endpoints to include the segment definition
33
+ - For more information, see our [Segments API overview](https://developers.klaviyo.com/en/reference/segments_api_overview).
34
+
35
+ - Flows Api
36
+ - New delete flows endpoint `KlaviyoAPI::Flows.delete_flow()`
37
+
38
+
39
+ ## [7.0.0] - revision 2024-05-15
40
+
41
+ ### Added
42
+
43
+ - Bulk Create Events API
44
+ - We have added support for creating events in bulk via the `KlaviyoAPI::Event.bulk_create_events` method
45
+ - Create multiple events for new and existing profiles and/or update profile properties in a single API call. For more information, see our [Events API overview](https://developers.klaviyo.com/en/reference/events_api_overview).
46
+
47
+ ### Changed
48
+
49
+ - Accounts Api
50
+ - `KlaviyoAPI::Accounts.get_accounts` and `KlaviyoAPI::Accounts.get_account` have been updated to return the account's locale, e.g. `en-US`.
51
+
52
+ - **Breaking** Subscribe API Synchronous Validation Improved
53
+ - To provide better feedback for handling SMS subscriptions, we’ve added improved validation behavior to `KlaviyoAPI::Profiles.subscribe_profiles` method. In prior revisions, such requests may appear as 202s but will fail to update SMS consent. To handle this issue, 400 validation errors are returned for the following cases
54
+ 1. If a profile is subscribed to SMS marketing and [age-gating is enabled](https://help.klaviyo.com/hc/en-us/articles/4408311712667) but age_gated_date_of_birth is not provided, or the DOB does not meet the region's requirements.
55
+ 2. If the account does not have a sending number in the phone number’s region.
56
+ 3. If the phone number is in a region not supported by Klaviyo.
57
+ 4. If consented_at is set and the list or global setting is double opt-in.
58
+ - Use `KLAVIYO_API_REVISION` as the env var for controlling which Klaviyo API to call, instead of `API_REVISION`. However, `API_REVISION` is a fallback, to avoid making this a breaking change
59
+
60
+
61
+ ## [6.0.0] - revision 2024-02-15
62
+
63
+ ### Added:
64
+
65
+ - New `Reporting` allows you to request campaign and flow performance data that you can view in the Klaviyo UI.
66
+
67
+ - `campaign_values_query`
68
+ - Request campaign analytics data, for example, a campaign performance report on the open rate over the past 30 days.
69
+
70
+ - `flow_values_query`
71
+ - Request flow analytics data, for example, a flow performance report on the revenue per recipient value over the past 3 months.
72
+
73
+ - `flow_series_query`
74
+ - Fetch flow series data for a specific interval and timeframe, for example, a flow performance report on weekly click rates over the past 12 months.
75
+
76
+
77
+ - New `Profiles` endpoint allows you to create or update a profile with a set of profile attributes.
78
+
79
+ - `create_or_update_profile`
80
+ - This endpoint operates synchronously and offers an upsert pattern similar to the [v1/v2 Identify API](https://developers.klaviyo.com/en/docs/apis_comparison_chart).
81
+
82
+ ### Changed:
83
+
84
+ - Removed the $attribution field from event_properties in get_event and get_events (breaking change).
85
+
86
+ - To include this data in your request, add include=attributions to your request.
87
+
88
+
89
+ ## [5.1.0] - revision 2023-12-15
90
+ ### Added
91
+ - New Endpoints: Bulk Profile Imports:
92
+ - `Profiles.spawn_bulk_profile_import_job`
93
+ - `Profiles.get_bulk_profile_import_job`
94
+ - `Profiles.get_bulk_profile_import_jobs`
95
+ - `Profiles.get_bulk_profile_import_job_lists`
96
+ - `Profiles.get_bulk_profile_import_job_profiles`
97
+ - `Profiles.get_bulk_profile_import_job_import_errors`
98
+ - `Profiles.get_bulk_profile_import_job_relationships_profiles`
99
+ - `Profiles.get_bulk_profile_import_job_relationships_lists`
100
+ ### Changed
101
+ - The `relationships` field of Profiles.subscribe_profiles payload is now optional. (see [subscribe_profiles reference](https://developers.klaviyo.com/en/reference/subscribe_profiles) for details).
102
+
103
+ ## [5.0.0] - revision 2023-10-15
104
+
105
+ ### Added
106
+
107
+ - Support for returning list suppressions via the [/profiles endpoint](https://developers.klaviyo.com/en/reference/get_profiles)
108
+
109
+ Rules for suppression [filtering](https://developers.klaviyo.com/en/docs/filtering_):
110
+
111
+ - You may not mix-and-match list and global filters
112
+ - You may only specify a single date filter
113
+ - You may or may not specify a reason
114
+ - You must specify a list_id to filter on any list suppression properties
115
+
116
+ Examples:
117
+
118
+ - To return profiles who were suppressed after a certain date:
119
+ `{filter: "greater-than(subscriptions.email.marketing.suppression.timestamp,2023-03-01T01:00:00Z)`
120
+ - To return profiles who were suppressed from a specific list after a certain date:
121
+ `{filter: "greater-than(subscriptions.email.marketing.list_suppressions.timestamp,2023-03-01T01:00:00Z),equals(subscriptions.email.marketing.list_suppressions.list_id,\"LIST_ID\"")`
122
+ - To return all profiles who were suppressed for a specific reason after a certain date:
123
+ `{"filter: 'greater-than(subscriptions.email.marketing.suppression.timestamp,2023-03-01T01:00:00Z),equals(subscriptions.email.marketing.suppression.reason\"user_suppressed\"")`
124
+
125
+ - Optionally retrieve subscription status on Get List Profiles, Get Segment Profiles, Get Event Profile
126
+
127
+ - Use `{additional_fields_profile = ["subscriptions"]}` on these endpoints to include subscription information.
128
+
129
+ ## Changes
130
+
131
+ - Subscription object not returned by default on Get Profile / Get Profiles
132
+
133
+ - The subscription object is no longer returned by default with get profile(s) requests. However, it can be included by adding `{additional_fields_profile = ["subscriptions"]}s` to the request. This change will allow us to provide a more performant experience when making requests to Get Profiles without including the subscriptions object.
134
+
135
+ - Profile Subscription Fields Renamed
136
+
137
+ - In the interest of providing more clarity and information on the subscription object, we have renamed several fields, and added several as well. This will provide more context on a contact's subscriptions and consent, as well as boolean fields to see who you can or cannot message.
138
+
139
+ For SMSMarketing:
140
+
141
+ - `timestamp` is now `consent_timestamp`
142
+ - `last_updated` is a new field that mirrors `consent_timestamp`
143
+ - `can_receive_sms_marketing` is a new field which is `True` if the profile is consented for SMS
144
+
145
+ For EmailMarketing:
146
+
147
+ - `timestamp` is now `consent_timestamp`
148
+ - `can_receive_email_marketing` is True if the profile does not have a global suppression
149
+ - `suppressions` is now `suppression`
150
+ - `last_updated` is a new field that is the most recent of all the dates on the object
151
+
152
+ ## [4.2.0] - revision 2023-09-15
153
+ ### Added
154
+
155
+ - `Images` API
156
+ - We now support the following operations to work with images:
157
+ - `get_image`
158
+ - `get_images`
159
+ - `update_image`
160
+ - `upload_image_from_file`
161
+ - `upload_image_from_url`
162
+ - `Coupons` API
163
+ - We now support CRUD operations for both Coupons and Coupon Codes
164
+ - Check out [Coupons API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_coupons_api) for more information.
165
+ - Additional filtering/sorting option for Lists and Segments: `joined_group_at`
166
+ - New profile merge endpoint: `Profiles.merge_profiles`
167
+ - Increased the maximum page size limit for List and Segment Profile Relationship Endpoints to 1000
168
+
169
+ ## [4.1.0] - revision 2023-08-15
170
+ ### Added
171
+ - Flow Message Templates
172
+ - You can now retrieve the templates associated with flow messages using `Flows.get_flow_message_template()` or `Flows.get_flow_message_relationships_template()` . You’re also able to include the template HTML for a flow message using `Flows.get_flow_message(id, {"include": ["template"]})`.
173
+ - Create or Update Push Tokens
174
+ - We have added an endpoint to create push tokens, `Profiles.create_push_token()`. This endpoint can be used to migrate profiles and their push tokens from another platform to Klaviyo. If you’re looking to register push tokens from users’ devices, please use our mobile SDKs.
175
+
176
+ ## [4.0.0] - revision 2023-07-15
177
+ ### Added
178
+ - Back-In-stock APIs
179
+ - We have added support for subscribing profiles to back-in-stock notifications, for both email and SMS, using the new [create_back_in_stock_subscription](./README.md#create-back-in-stock-subscription) endpoint.
180
+ - New functionality to Campaigns API
181
+ - CRUD support for SMS campaigns is now available
182
+ - You can now also retrieve all messages for a campaign to determine performance data on campaigns where you're running A/B tests
183
+ - To support this functionality, we introduced a relationship between [campaigns and campaign messages](./README.md#get-campaign-relationships-campaign-messages), and between [campaign messages and templates](./README.md#get-campaign-message-relationships-template)
184
+
185
+
186
+ ### Changed
187
+ - Relationship Standardization
188
+ - We are making a number of changes across endpoints to standardize how we handle [relationships](https://developers.klaviyo.com/en/docs/relationships_) in our APIs and leverage consistently typed objects across endpoints. For example, you can create a profile in our APIs in the same shape, regardless of whether you're calling the profiles endpoint or the events endpoint.
189
+ - The changes include:
190
+ - Updating 1:1 relationships to use singular tense and an object (instead of plural and an array)
191
+ - example: for [get_flow_action](./README.md#get-flow-action), if you want to use the `include` param, you would set `include=` to `"flow"` (instead of `"flows"`)
192
+ - Moving related object IDs from the attributes payload to relationships
193
+ - example: The format for the [body](https://developers.klaviyo.com/en/reference/create_tag) of [create_tag](./README.md#create-tag) has changed, with `tag_group_id` previously at `data.attributes.tag_group_id` being removed and replaced by a `data` object containing `type`+`id` and located at `data.relationships.tag-group.data`.
194
+ - Specifying a relationship between two Klaviyo objects to allow for improved consistency and greater interoperability across endpoints
195
+ - example: for [create_event](./README.md#create-event), you can now create/update a profile for an event in the same way you would when using the profiles API directly
196
+ - NOTE: The examples for the above relationship changes are illustrative, not comprehensive. For a complete list of ALL the endpoints that have changed and exactly how, please refer to our latest [API Changelog](https://developers.klaviyo.com/en/docs/changelog_#revision-2023-07-15)
197
+ - For [get_campaigns](./README.md#get-campaigns) endpoint, `filter` param is now required, to, at minimum, filter on `messages.channel`
198
+
199
+
200
+ ### Removed
201
+ - We removed the `company_id` from the response for [get_template](./README.md#get-template) and [get_templates](./README.md#get-templates). If you need to obtain the company ID / public API key for an account, please use the [Accounts API](./README.md#accounts).- We removed the `company_id` from the response for [get_template](./README.md#get-template) and [get_templates](./README.md#get-templates). If you need to obtain the company ID / public API key for an account, please use the [Accounts API](./README.md#accounts).
202
+
203
+ ## [3.0.0] - revision 2023-06-15
204
+ ### Added
205
+ - Accounts API is now available, this will allow you to access information about the Klaviyo account associated with your API key.
206
+ - `get_accounts`
207
+ - `get_account`
208
+
209
+ **Note:** You will need to generate a new API key with either the `Accounts` scope enabled or `Full Access` to use these endpoints.
210
+
211
+ ### Removed
212
+ - All `client` endpoints
213
+ - `create_client_event`
214
+ - `create_client_profile`
215
+ - `create_client_subscription`
216
+ ## [2.0.0] - 2023-04-06
217
+ ### Added
218
+ - Profiles API now returns predictive analytics when calling `get_profile` and `get_profiles` by passing in `additional_fields_profile: ["predictive_analytics"]`.
219
+
220
+ ### Changed
221
+ - Relationship endpoints that were previously grouped together are now split into related-resource-specific endpoints.
222
+
223
+ ### Migration Guide
224
+ - To migrate to this latest version, all calls to relationship endpoints need to be updated, as in the following example:
225
+ - `get_campaign_relationships(id, "tags")` will become `get_campaign_relationships_tags(id)`.
226
+ ## [1.2.0] - 2023-02-22
227
+ ### Added
228
+ - Campagins (which were previously in our Beta API/SDKs)
229
+
230
+ ### Changes
231
+ - Profiles
232
+ - Fix longitude value in ProfileLocation type mapping
233
+ - Flows
234
+ - Pagination changed from page offset to cursor
235
+
236
+ ## [1.1.0] - 2022-01-24
237
+ ### Added
238
+ - Added the following endpoints (which were previously in our Beta API/SDKs):
239
+ - Data Privacy
240
+ - All Tags endpoints, as well as the following related resource-specific endpoints:
241
+ - Get Flow Tags
242
+ - Get List Tags
243
+ - Get Segment Tags
244
+
245
+ ## [1.0.1] - 2022-12-06
246
+ ### Changes
247
+ - Support for cursor pagination
248
+ - Passing the `next` value from a paginated result to the following call via the `page_cursor` query string argument will now result in the cursor being parsed and set appropriately by the `ApiClient`.
249
+
250
+ ## [1.0.0] - 2022-10-19
251
+ ### Added
252
+ - Initial release
253
+
254
+ ### Changes
255
+ - Naming changes:
256
+ - Package name: klaviyo_sdk -> klaviyo-api-sdk
257
+ - Module name: KlaviyoBeta -> KlaviyoAPI
258
+ - Some functions have changed name
259
+ - New resources and endpoints:
260
+ - See API Changelog for full details