You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+3-166
Original file line number
Diff line number
Diff line change
@@ -7,173 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
NOTE: For more granular API-specific changes, please see our [API Changelog](https://developers.klaviyo.com/en/docs/changelog_)
9
9
10
-
## [12.0.0] - 2024-07-15
11
-
### Added
12
-
- Added several method aliases based on previous operation IDs
10
+
## [13.0.0] - 2024-07-15
13
11
### Fixed
14
12
-**Breaking**
15
-
- Removed incorrect `links` property from several DTO classes. From issue https://github.com/klaviyo/klaviyo-api-python/issues/64
16
-
17
-
18
-
## [11.0.1] - 2024-07-15
19
-
### Fixed
20
-
- Typing error when using `additional_fields_profile=['subscriptions']` on `get_profiles`. From issue https://github.com/klaviyo/klaviyo-api-python/issues/61
21
-
22
-
23
-
## [11.0.0] Typed SDK - revision 2024-07-15
24
-
25
-
### Added
26
-
- Typed Responses (Breaking change)
27
-
- By default, all API methods will return a type representing the response payload instead of dictionary, as was the case in previous versions of this SDK. Using the typed response, you can access fields of a response using dot notation, like so:
28
-
```python
29
-
from klaviyo_api import KlaviyoAPI
30
-
31
-
client = KlaviyoAPI(
32
-
api_key,
33
-
max_delay=0,
34
-
max_retries=0
35
-
)
36
-
37
-
profiles = client.Profiles.get_profiles()
38
-
profile_id = profiles.data[0].id
39
-
profile = client.Profiles.get_profile(profile_id)
40
-
profile_id = profile.data.id
41
-
profile_email = profile.data.attributes.email
42
-
43
-
print(type(profile).__name__) # prints GetProfileResponseCompoundDocument
44
-
```
45
-
The class used in this example is found [here](src/openapi_client/models/get_profile_response_collection_compound_document.py).
46
-
47
-
This is a breaking change, as response objects will now require dot notation to access their fields versus the subscriptable access method used for dictionaries, i.e. `profile.data.id` vs `profile['data']['id']`. We have provided a [backwards compatibility strategy](#backwards-compatibility) to smooth the transition from dictionary responses to typed responses.
48
-
49
-
#### Backwards Compatibility
50
-
To maintain backwards compatibility with previous versions of this SDK, we have added an `options` argument that allows you to continue using dictionaries as response values. There are two ways to use this `options` argument:
51
-
```python
52
-
from klaviyo_api import KlaviyoAPI
53
-
from openapi_client.api_arg_options importUSE_DICTIONARY_FOR_RESPONSE_DATA
The first way will only return a dictionary for that specific `get_profiles` call. The second makes it so that allAPI methods called using `dictionary_client` will return dictionaries as responses.
83
-
84
-
- Some API methods still return response data that isnot fully typed. See the [Untyped Response Data for Specific APIs](README.md#untyped-response-data-for-specific-apis) in the README for more details.
85
-
- Filter Builder - A new class to help construct filter query parameters.
- New `klaviyo.Forms`classwith methods to get forms, form versions and relationships
108
-
- Webhooks API
109
-
- new `klaviyo.Webooks`class containing CRUD operations for webhooks
110
-
111
-
### Changed
112
-
-`klaviyo.Profiles.subscribe()`
113
-
- added `historical_import` flag for importing historically consented profiles can now be optionally supplied in the payload for the Subscribe Profiles endpoint.
114
-
- When using this flag, a consented_at date must be provided and must be in the past.
115
-
116
-
117
-
## [9.0.0] - revision 2024-06-15
118
-
119
-
### Added
120
-
- Segments Api
121
-
- New create segment endpoint `SegmentsApi.createSegment()`.
122
-
- New delete segment endpoint `SegementsApi.deleteSegment()`.
123
-
- Updated exisiting segments endpoints to include the segment definition
124
-
- For more information, see our [Segments API overview](https://developers.klaviyo.com/en/reference/segments_api_overview).
125
-
126
-
- Flows Api
127
-
- New delete flows endpoint `FlowsApi.deleteFlow()`
128
-
129
-
130
-
## [8.0.1] - revision 2024-05-15
131
-
132
-
### Added
133
-
134
-
- Fixes issue where `filter` query params foranyAPI call were being duplicated on request send. See issue: https://github.com/klaviyo/klaviyo-api-python/issues/51
135
-
136
-
137
-
## [8.0.0] - revision 2024-05-15
138
-
139
-
### Added
140
-
141
-
- Bulk Create Events APIwith
142
-
- We have added support for creating events in bulk via the EventsApi.bulkCreateEvents method
143
-
- 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).
144
-
145
-
### Changed
146
-
147
-
- Accounts API
148
-
-`Accounts.get_account`and`Accounts.get_accounts` have been updated to return the account's locale, e.g. `"en-US"`.
149
-
150
-
-**Breaking**
151
-
- Subscribe API Synchronous Validation Improved
152
-
- To provide better feedback for handling SMS subscriptions, we’ve added improved validation behavior to ProfilesApi.subscribeProfiles method. In prior revisions, such requests may appear as202s but will fail to update SMS consent. To handle this issue, 400 validation errors are returned for the following cases
153
-
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 isnot provided, or the DOB does not meet the region's requirements.
154
-
2. If the account does not have a sending number in the phone number’s region.
155
-
3. If the phone number isin a region not supported by Klaviyo.
156
-
4. If consented_at issetand the listorglobal setting is double opt-in.
157
-
- Pydantic V2
158
-
- This SDK now uses Pydantic V2. This may cause some compatibility issues if your source code depends on Pydantic V1.
159
-
- Renamed Fields inSDK
160
-
- As of the 2024-05-15 release, some models fields are named differently than they appear inAPI documentation. These fields are
161
-
-`datetime`: renamed to `datetime_`
162
-
-`date`: renamed to `date_`
163
-
164
-
This is to manage compatibility with Pydantic v2. An example of this can be seen in [StaticScheduleOptions](src/openapi_client/models/static_schedule_options.py).
165
-
166
-
```python
167
-
class StaticScheduleOptions(BaseModel):
168
-
"""
169
-
StaticScheduleOptions
170
-
"""# noqa: E501
171
-
datetime_: datetime= Field(description="The time to send at", alias="datetime")
0 commit comments