Klaviyo v2024-02-15 walkthrough
Klaviyo API v2024-02-15 API is an upgraded version of the Klaviyo integration designed to enhance data extraction and transformation capabilities for advanced analytics and marketing workflows.
To connect Klaviyo API v2024-02-15 API with your destination, follow the step-by-step tutorial. Choose a Source connection after creating a connection.
Predefined reports
Data Integration provides a convenient entry point and recommended approach for accessing a range of predefined reports. Each report includes a concise data description, a list of customizable fields (if applicable), and the schema mapping.
These reports follow a standardized format, so specific fields are locked, and you can only access them through the Custom reports.
Custom reports
Select a specific report to pull data from the Klaviyo API v2024-02-15 API.
Profiles
The Profiles retrieve all profiles within an account. To access this endpoint, you need the profiles:read scope.
Profiles JSON representation:
{
"data": [
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phone_number": "+15005550006",
"external_id": "63f64a2b-c6bf-40c7-b81f-bed08162edbe",
"first_name": "Sarah",
"last_name": "Mason",
"organization": "Example Corporation",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"last_event_date": "2022-11-08T00:00:00",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
},
"subscriptions": {
"email": {
"marketing": {
"can_receive_email_marketing": true,
"consent": "SUBSCRIBED",
"consent_timestamp": "2023-02-21T20:07:38+00:00",
"last_updated": "2023-02-21T20:07:38+00:00",
"method": "PREFERENCE_PAGE",
"method_detail": "Mydomain | Hosting, Domains, and Websites with Web.com ",
"custom_method_detail": "marketing drive",
"double_optin": "True",
"suppression": [
{
"reason": "HARD_BOUNCE",
"timestamp": "2023-02-21T20:07:38+00:00"
}
],
"list_suppressions": [
{
"list_id": "Y6nRLr",
"reason": "USER_SUPPRESSED",
"timestamp": "2023-02-21T20:07:38+00:00"
}
]
}
},
"sms": {
"marketing": {
"can_receive_sms_marketing": true,
"consent": "SUBSCRIBED",
"consent_timestamp": "2023-02-21T20:07:38+00:00",
"method": "TEXT",
"method_detail": "JOIN",
"last_updated": "2023-02-21T20:07:38+00:00"
}
}
},
"predictive_analytics": {
"historic_clv": 93.87,
"predicted_clv": 27.24,
"total_clv": 121.11,
"historic_number_of_orders": 2,
"predicted_number_of_orders": 0.54,
"average_days_between_orders": 189,
"average_order_value": 46.94,
"churn_probability": 0.89,
"expected_date_of_next_order": "2022-11-08T00:00:00"
}
},
"links": {
"self": "string"
},
"relationships": {
"lists": {
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Profile segments
The Profile segments retrieves the segment memberships for a profile using the provided profile ID. The required scopes for this endpoint are profiles:read, segments:read.
Profile segments JSON representation:
{
"data": [
{
"type": "segment",
"id": "string",
"attributes": {
"name": "Repeat Purchasers",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"is_active": true,
"is_processing": true,
"is_starred": true
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Segments
The Segments retrieves every segment within an account. To access this endpoint, you need the segments:read scope.
Segments JSON representation:
{
"data": [
{
"type": "segment",
"id": "string",
"attributes": {
"name": "Repeat Purchasers",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"is_active": true,
"is_processing": true,
"is_starred": true
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
Events
The Events get all events in an account The required scope for this endpoint is events:read.
Events JSON representation:
{
"data": [
{
"type": "event",
"id": "string",
"attributes": {
"timestamp": 0,
"event_properties": {},
"datetime": "2022-11-08T01:23:45+00:00",
"uuid": "string"
},
"links": {
"self": "string"
},
"relationships": {
"profile": {
"data": {
"type": "profile",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"metric": {
"data": {
"type": "metric",
"id": "string"
},
"links": {
"self": "string",
"related": "string"
}
},
"attributions": {
"data": [
{
"type": "attribution",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "attribution",
"id": "925e385b52fb405715f3616c337cc65c",
"relationships": {
"event": {
"data": {
"type": "event",
"id": "string"
}
},
"attributed-event": {
"data": {
"type": "event",
"id": "string"
}
},
"campaign": {
"data": {
"type": "campaign",
"id": "string"
}
},
"campaign-message": {
"data": {
"type": "campaign-message",
"id": "string"
}
},
"flow": {
"data": {
"type": "flow",
"id": "string"
}
},
"flow-message": {
"data": {
"type": "flow-message",
"id": "string"
}
},
"flow-message-variation": {
"data": {
"type": "flow-message",
"id": "string"
}
}
},
"links": {
"self": "string"
}
},
{
"type": "metric",
"id": "string",
"attributes": {
"name": "string",
"created": "string",
"updated": "string",
"integration": {}
},
"links": {
"self": "string"
}
},
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phone_number": "+15005550006",
"external_id": "63f64a2b-c6bf-40c7-b81f-bed08162edbe",
"first_name": "Sarah",
"last_name": "Mason",
"organization": "Example Corporation",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"last_event_date": "2022-11-08T00:00:00",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
}
},
"links": {
"self": "string"
}
}
]
}
Metrics
The Metrics retrieve all metrics within an account. The required scope for this endpoint is metrics:read.
Metrics JSON representation:
{
"data": [
{
"type": "metric",
"id": "string",
"attributes": {
"name": "string",
"created": "string",
"updated": "string",
"integration": {}
},
"links": {
"self": "string"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Flows
The Flows get all flows within an account. The required scope for this endpoint is flows:read.
Flows JSON representation:
{
"data": [
{
"type": "flow",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"trigger_type": "Added to List"
},
"links": {
"self": "string"
},
"relationships": {
"flow-actions": {
"data": [
{
"type": "flow-action",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "flow-action",
"id": "string",
"attributes": {
"action_type": "string",
"status": "string",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"settings": {},
"tracking_options": {
"add_utm": true,
"utm_params": [
{
"name": "string",
"value": "string"
}
],
"is_tracking_opens": true,
"is_tracking_clicks": true
},
"send_options": {
"use_smart_sending": true,
"is_transactional": true
},
"render_options": {
"shorten_links": true,
"add_org_prefix": true,
"add_info_link": true,
"add_opt_out_language": true
}
},
"links": {
"self": "string"
}
},
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
Campaigns
Deliver campaigns based on specified filters, which can include some or all campaigns.
The Campaigns are divided into two distinct types:
- Email campaigns
- SMS campaigns
The required scope for this endpoint is campaigns:read.
Email campaigns JSON representation:
{
"data": [
{
"type": "campaign",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"audiences": {
"included": [
"Y6nRLr"
],
"excluded": [
"UTd5ui"
]
},
"send_options": {
"use_smart_sending": true
},
"tracking_options": {
"is_add_utm": true,
"utm_params": [
{
"name": "utm_medium",
"value": "campaign"
}
],
"is_tracking_clicks": true,
"is_tracking_opens": true
},
"send_strategy": {
"method": "static",
"options_static": {
"datetime": "2022-11-08T00:00:00",
"is_local": true,
"send_past_recipients_immediately": true
},
"options_throttled": {
"datetime": "2024-04-11T12:54:31.196Z",
"throttle_percentage": 0
},
"options_sto": {
"date": "2024-04-11"
}
},
"created_at": "2022-11-08T00:00:00",
"scheduled_at": "2022-11-08T00:00:00",
"updated_at": "2022-11-08T00:00:00",
"send_time": "2022-11-08T00:00:00"
},
"links": {
"self": "string"
},
"relationships": {
"campaign-messages": {
"data": [
{
"type": "campaign-message",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "campaign-message",
"id": "string",
"attributes": {
"label": "string",
"channel": "string",
"content": {
"subject": "Buy our product!",
"preview_text": "My preview text",
"from_email": "store@my-company.com",
"from_label": "My Company",
"reply_to_email": "reply-to@my-company.com",
"cc_email": "cc@my-company.com",
"bcc_email": "bcc@my-company.com"
},
"send_times": [
{
"datetime": "2022-11-08T00:00:00",
"is_local": true
}
],
"render_options": {
"shorten_links": true,
"add_org_prefix": true,
"add_info_link": true,
"add_opt_out_language": false
},
"created_at": "2022-11-08T00:00:00",
"updated_at": "2022-11-08T00:00:00"
},
"links": {
"self": "string"
}
},
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
SMS campaigns JSON representation:
{
"data": {
"type": "campaign",
"id": "string",
"attributes": {
"name": "string",
"status": "string",
"archived": true,
"audiences": {
"included": [
"Y6nRLr"
],
"excluded": [
"UTd5ui"
]
},
"send_options": {
"use_smart_sending": true
},
"tracking_options": {
"is_add_utm": true,
"utm_params": [
{
"name": "utm_medium",
"value": "campaign"
}
],
"is_tracking_clicks": true,
"is_tracking_opens": true
},
"send_strategy": {
"method": "static",
"options_static": {
"datetime": "2022-11-08T00:00:00",
"is_local": true,
"send_past_recipients_immediately": true
},
"options_throttled": {
"datetime": "2024-04-11T12:54:31.196Z",
"throttle_percentage": 0
},
"options_sto": {
"date": "2024-04-11"
}
},
"created_at": "2022-11-08T00:00:00",
"scheduled_at": "2022-11-08T00:00:00",
"updated_at": "2022-11-08T00:00:00",
"send_time": "2022-11-08T00:00:00"
},
"links": {
"self": "string"
},
"relationships": {
"campaign-messages": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
}
Campaign messages
Campaign messages returns all messages associated with the specified campaign. The Campaign Messages are divided into two distinct types:
- Email Campaigns Messages
- SMS Campaigns Messages The required scope for this endpoint is campaigns:read.
Email campaigns messages JSON representation:
{
"data": {
"type": "campaign-message",
"id": "`<string>`",
"attributes": {
"label": "`<string>`",
"channel": "email",
"content": {
"subject": "`<string>`",
"preview_text": "`<string>`",
"from_email": "`<string>`",
"from_label": "`<string>`",
"reply_to_email": "`<string>`",
"cc_email": "`<string>`",
"bcc_email": "`<string>`"
},
"send_times": [
{
"datetime": "`<dateTime>`",
"is_local": "`<boolean>`"
},
{
"datetime": "`<dateTime>`",
"is_local": "`<boolean>`"
}
],
"render_options": {
"shorten_links": true,
"add_org_prefix": true,
"add_info_link": true,
"add_opt_out_language": false
},
"created_at": "`<dateTime>`",
"updated_at": "`<dateTime>`"
},
"links": {
"self": "`<uri>`"
},
"relationships": {
"campaign": {
"data": {
"type": "campaign",
"id": "`<string>`"
},
"links": {
"self": "`<uri>`",
"related": "`<uri>`"
}
},
"template": {
"data": {
"type": "template",
"id": "`<string>`"
},
"links": {
"self": "`<uri>`",
"related": "`<uri>`"
}
}
}
}
}
SMS campaigns messages JSON representation
{
"data": {
"type": "campaign-message",
"id": "`<string>`",
"attributes": {
"label": "`<string>`",
"channel": "sms",
"content": {
"subject": "`<string>`",
"preview_text": "`<string>`",
"from_email": "`<string>`",
"from_label": "`<string>`",
"reply_to_email": "`<string>`",
"cc_email": "`<string>`",
"bcc_email": "`<string>`"
},
"send_times": [
{
"datetime": "`<dateTime>`",
"is_local": "`<boolean>`"
},
{
"datetime": "`<dateTime>`",
"is_local": "`<boolean>`"
}
],
"render_options": {
"shorten_links": true,
"add_org_prefix": true,
"add_info_link": true,
"add_opt_out_language": false
},
"created_at": "`<dateTime>`",
"updated_at": "`<dateTime>`"
},
"links": {
"self": "`<uri>`"
},
"relationships": {
"campaign": {
"data": {
"type": "campaign",
"id": "`<string>`"
},
"links": {
"self": "`<uri>`",
"related": "`<uri>`"
}
},
"template": {
"data": {
"type": "template",
"id": "`<string>`"
},
"links": {
"self": "`<uri>`",
"related": "`<uri>`"
}
}
}
}
}
Campaign recipient
Campaign recipient gets the estimated recipient count for a campaign with the provided campaign ID. The required scope for this endpoint is campaigns:read.
Campaign recipient JSON representation:
{
"data": {
"type": "campaign-recipient-estimation",
"id": "string",
"attributes": {
"estimated_recipient_count": 0
},
"links": {
"self": "string"
}
}
}
Templates
Retrieve all templates within an account. The required scope for this endpoint is templates:read.
Templates JSON representation:
{
"data": [
{
"type": "template",
"id": "string",
"attributes": {
"name": "string",
"editor_type": "string",
"html": "string",
"text": "string",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00"
},
"links": {
"self": "string"
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
Lists
Retrieve all lists within an account. Apply filters to request a specific subset of lists. You can filter Lists based on their ID, name, created, and updated fields. The required scope for this endpoint is lists:read.
Lists JSON representation:
{
"data": [
{
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"opt_in_process": "double_opt_in"
},
"links": {
"self": "string"
},
"relationships": {
"profiles": {
"links": {
"self": "string",
"related": "string"
}
},
"tags": {
"data": [
{
"type": "tag",
"id": "string"
}
],
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"included": [
{
"type": "tag",
"id": "abcd1234-ef56-gh78-ij90-abcdef123456",
"attributes": {
"name": "My Tag"
},
"links": {
"self": "string"
}
}
]
}
List profiles
List profiles gets all profiles within a list with the given list ID. The required scope for this endpoint is lists:read, profiles:read.
Report JSON representation:
{
"data": [
{
"type": "profile",
"id": "01GDDKASAP8TKDDA2GRZDSVP4H",
"attributes": {
"email": "sarah.mason@klaviyo-demo.com",
"phone_number": "+15005550006",
"external_id": "63f64a2b-c6bf-40c7-b81f-bed08162edbe",
"first_name": "Sarah",
"last_name": "Mason",
"organization": "Example Corporation",
"title": "Regional Manager",
"image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
"created": "2022-11-08T00:00:00",
"updated": "2022-11-08T00:00:00",
"last_event_date": "2022-11-08T00:00:00",
"location": {
"address1": "89 E 42nd St",
"address2": "1st floor",
"city": "New York",
"country": "United States",
"latitude": "string",
"longitude": "string",
"region": "NY",
"zip": "10017",
"timezone": "America/New_York",
"ip": "127.0.0.1"
},
"properties": {
"pseudonym": "Dr. Octopus"
},
"joined_group_at": "2022-11-08T00:00:00",
"subscriptions": {
"email": {
"marketing": {
"can_receive_email_marketing": true,
"consent": "SUBSCRIBED",
"consent_timestamp": "2023-02-21T20:07:38+00:00",
"last_updated": "2023-02-21T20:07:38+00:00",
"method": "PREFERENCE_PAGE",
"method_detail": "Mydomain | Hosting, Domains, and Websites with Web.com ",
"custom_method_detail": "marketing drive",
"double_optin": "True",
"suppression": [
{
"reason": "HARD_BOUNCE",
"timestamp": "2023-02-21T20:07:38+00:00"
}
],
"list_suppressions": [
{
"list_id": "Y6nRLr",
"reason": "USER_SUPPRESSED",
"timestamp": "2023-02-21T20:07:38+00:00"
}
]
}
},
"sms": {
"marketing": {
"can_receive_sms_marketing": true,
"consent": "SUBSCRIBED",
"consent_timestamp": "2023-02-21T20:07:38+00:00",
"method": "TEXT",
"method_detail": "JOIN",
"last_updated": "2023-02-21T20:07:38+00:00"
}
}
},
"predictive_analytics": {
"historic_clv": 93.87,
"predicted_clv": 27.24,
"total_clv": 121.11,
"historic_number_of_orders": 2,
"predicted_number_of_orders": 0.54,
"average_days_between_orders": 189,
"average_order_value": 46.94,
"churn_probability": 0.89,
"expected_date_of_next_order": "2022-11-08T00:00:00"
}
},
"links": {
"self": "string"
},
"relationships": {
"lists": {
"links": {
"self": "string",
"related": "string"
}
},
"segments": {
"links": {
"self": "string",
"related": "string"
}
}
}
}
],
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
After selecting the required report, specify the fields to include in your schema mapping.
Extract method
When using the Extract Method, you can retrieve all data without any time restrictions by selecting All or Incremental to control data retrieval based on dates.
- Start Date is mandatory.
- You can retrieve data for the date range specified between the start and end dates.
- If you leave the end date blank, the data will be pulled at the current time of the river's run.
- Date timezone: UTC.
- The Start Date will not be advanced if a River run is unsuccessful. If you do not want this default setting, click More Options and select the checkbox to advance the start date even if the River run is unsuccessful (Not recommended).
- Use the Last Days Back For Each Run option to gather data from a specified number of days before the selected start date.
When the data you are fetching is large and reaching size or timeout constraints, Split your chunks by to split the data into chunks.
- Custom reports mapping extracts data from the API using a code-generated schema from sample data, which may miss some fields or inaccurately represent data types. This addresses variable field types by casting them as Strings.
- Predefined reports ensure a consistent structure by loading nested record fields as JSON.