Skip to content

Commit

Permalink
Upgrade all actions to the revision 2025-01-15 (#2748)
Browse files Browse the repository at this point in the history
  • Loading branch information
maryamsharif authored Feb 20, 2025
1 parent 64d3e5c commit dc99299
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
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'
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

0 comments on commit dc99299

Please sign in to comment.