Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Klaviyo] Upgrade to revision 2025-01-15 #2748

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const API_URL = 'https://a.klaviyo.com/api'
export const REVISION_DATE = '2023-09-15'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connecting the dots. This is being used here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

export const REVISION_DATE = '2025-01-15'
export const COUNTRY_CODES = [
{ label: 'AD - Andorra', value: 'AD' },
{ label: 'AE - United Arab Emirates', value: 'AE' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ export const constructBulkProfileImportPayload = (
export const sendImportJobRequest = async (request: RequestClient, importJobPayload: { data: ImportJobPayload }) => {
return await request(`${API_URL}/profile-bulk-import-jobs/`, {
method: 'POST',
headers: {
revision: '2023-10-15.pre'
},
json: importJobPayload
})
}
Expand Down Expand Up @@ -707,10 +704,7 @@ export async function sendBatchedTrackEvent(request: RequestClient, payloads: Tr
try {
const response = await request(`${API_URL}/event-bulk-create-jobs/`, {
method: 'POST',
json: payloadToSend,
headers: {
revision: '2024-10-15'
}
json: payloadToSend
})
updateMultiStatusWithSuccessData(filteredPayloads, validPayloadIndicesBitmap, multiStatusResponse, response)
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ const action: ActionDefinition<Settings, Payload> = {
const profileToSubscribe = formatSubscribeProfile(email, phone_number, consented_at)
const subData = formatSubscribeRequestBody(profileToSubscribe, list_id, custom_source)

// subscribe requires use of 2024-02-15 api version
return await request(`${API_URL}/profile-subscription-bulk-create-jobs/`, {
method: 'POST',
headers: {
revision: '2024-02-15'
},
json: subData
})
},
Expand Down Expand Up @@ -158,9 +154,6 @@ const action: ActionDefinition<Settings, Payload> = {

const response = request<Response>(`${API_URL}/profile-subscription-bulk-create-jobs/`, {
method: 'POST',
headers: {
revision: '2024-02-15'
},
json: subData
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ const action: ActionDefinition<Settings, Payload> = {

return await request(`${API_URL}/profile-subscription-bulk-delete-jobs`, {
method: 'POST',
headers: {
revision: '2024-02-15'
},
json: unSubData
})
},
Expand Down Expand Up @@ -128,9 +125,6 @@ const action: ActionDefinition<Settings, Payload> = {

const response = request<Response>(`${API_URL}/profile-subscription-bulk-delete-jobs`, {
method: 'POST',
headers: {
revision: '2024-02-15'
},
json: unSubData
})

Expand Down
Loading