Skip to content

Releases: klaviyo/klaviyo-api-node

v.7.0.0-beta.1 OAuth

17 Oct 15:54
4fd2ebc
Compare
Choose a tag to compare
v.7.0.0-beta.1 OAuth Pre-release
Pre-release

Adds OAuth support and various helpers.

Check out the readme or the example integration

v6.0.1

22 Sep 18:02
666d837
Compare
Choose a tag to compare

[6.0.1] - revision 2023-09-15

Fixed

  • Relationship and its child attributes were incorrectly marked as optional for the following endpoints
    • createBackInStockSubscription
    • createCampaignMessageAssignTemplate
    • spawnCreateVariantsJob
    • createCatalogVariant
    • spawnCouponCodeBulkCreateJob
    • createCouponCode
    • mergeProfiles
    • subscribeProfiles
  • Removed unused dependencies from package.json that were requiring a higher node version than necessary

v6.0.0 - Typescript GA

15 Sep 20:51
a95e01d
Compare
Choose a tag to compare

[6.0.0] - revision 2023-09-15

Added

  • Typescript Support

    • Types - This is a complete rework of our node sdk to add native type support in package
  • Images API

    • We now support the following operations to work with images:
      • get_image
      • get_images
      • update_image
      • upload_image_from_file - You can se fs.createReadStream to pass the file into the function
      • upload_image_from_url
  • Coupons API

    • We now support CRUD operations for both Coupons and Coupon Codes
    • Check out Coupons API guide for more information.
  • Additional filtering/sorting option for Lists and Segments: joined_group_at

  • New profile merge endpoint: ProfilesApi.mergeProfiles

  • Increased the maximum page size limit for List and Segment Profile Relationship Endpoints to 1000

Changed

  • Authentication - Changes were made to make way for upcomming OAuth support
    • Now use ApiKeySession object to pass in the authentication into an api constructor. The readme has plenty of examples.
    • ConfigWrapper should still work it now just updates the GlobalApiKeyConfig and creates an ApiKeySession instance

v5.1.0

15 Aug 20:46
fefb6ec
Compare
Choose a tag to compare

Added

  • Flow Message Templates
    • You can now retrieve the templates associated with flow messages using Flows.getFlowMessageTemplate() or Flows.getFlowMessageRelationshipsTemplate() . You’re also able to include the template HTML for a flow message using Flows.getFlowMessage(FLOW_MESSAGE_ID, {include: ['template']}).
  • Create or Update Push Tokens
    • We have added an endpoint to create push tokens, Profiles.createPushToken(). 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.

v5.1.0-beta.1 Typescript

15 Aug 20:54
fefb6ec
Compare
Choose a tag to compare
Pre-release

Added

  • Flow Message Templates
    • You can now retrieve the templates associated with flow messages using flowsApi.getFlowMessageTemplate() or flowsApi.getFlowMessageRelationshipsTemplate() . You’re also able to include the template HTML for a flow message using flowsApi.getFlowMessage(FLOW_MESSAGE_ID, {include: ['template']}).
  • Create or Update Push Tokens
    • We have added an endpoint to create push tokens, profilesApi.createPushToken(). 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.

Fixes

  • Campaign Message Template
    • Fixed response model to be a template and not a campaign message

v5.0.0-beta.1 Typescript

01 Aug 19:05
Compare
Choose a tag to compare
Pre-release

Added

  • Types - This is a complete rework of our node sdk to add native type support in package
  • ConfigWrapper is now optional
    • Pass your api key and optional retry data directly into API objects new campaignsApi("<YOUR API KEY HERE>")
  • Optional Klaviyo scope
    • Instead of accessing items apis like new campaignsApi() you can also use new Klaviyo.campaignsApi() to keep your application organized.

5.0.0 - New endpoints and relationships rework

17 Jul 17:42
53bea49
Compare
Choose a tag to compare

Added

  • Back-In-stock APIs
  • New functionality to Campaigns API
    • CRUD support for SMS campaigns is now available
    • You can now also retrieve all messages for a campaign to determine performance data on campaigns where you're running A/B tests

Changed

  • Relationship Standardization
    • We are making a number of changes across endpoints to standardize how we handle 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.
    • The changes include:
      • Updating 1:1 relationships to use singular tense and an object (instead of plural and an array)
        • example: for get_flow_action, if you want to use the include param, you would set include= to "flow" (instead of "flows")
      • Moving related object IDs from the attributes payload to relationships
        • example: The format for the body of 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.
      • Specifying a relationship between two Klaviyo objects to allow for improved consistency and greater interoperability across endpoints
        • example: for create_event, you can now create/update a profile for an event in the same way you would when using the profiles API directly
    • 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
  • For get_campaigns endpoint, filter param is now required, to, at minimum, filter on messages.channel

Removed

4.0.1 - update superagent depency

15 Jun 16:26
def3ad0
Compare
Choose a tag to compare

Older version of superagent has dependencies that can cause issues with webpack. This bump should prevent that issue.

4.0.0 - Adding Accounts API

15 Jun 14:43
f06ba73
Compare
Choose a tag to compare

[4.0.0] - revision 2023-06-15

Added

  • Accounts API is now available, this will allow you to access information about the Klaviyo account associated with your API key.
    • getAccounts
    • getAccount

Note: You will need to generate a new API key with either the Accounts scope enabled or Full Access to use these endpoints.

Changed

  • createProfile - opts parameter removed because there are no optional query parameter that can be passed to the endpoint

Removed

  • All client endpoints - While you could potentially get this repo to work for frontend and use only these client endpoints, it is bad practice to use client-side endpoints on the server side. In addition, developers found the inclusion of the client-side endpoints in our SDKs generally confusing.

Klaviyo has the much lighter weight klaviyo.js wrapper that we recommend for client-side use which you can read about here.

  • createClientEvent
  • createClientProfile
  • createClientSubscription

In addition, you can make client-side API calls outright if desired.

v3.0.0 - relationships and predictive analytivs

06 Apr 15:27
804180e
Compare
Choose a tag to compare

Added

  • Profiles API now returns predictive analytics when calling getProfile and getProfiles by passing in additionalFieldsProfile = ["predictive_analytics"].

    const response = await Profiles.getProfiles({additionalFieldsProfile: ["predictive_analytics"]})

Changed

  • Relationship endpoints that were previously grouped together are now split into related-resource-specific endpoints.

Migration Guide

  • To migrate to this latest version, all calls to relationship endpoints need to be updated, as in the following example:
    • getCampaignRelationships(campaignId, "tags") will become getCampaignRelationshipsTags(campaignId).