with UPS and Klaviyo?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
ups: {
type: "app",
app: "ups",
}
},
async run({steps, $}) {
const data = {
"XAVRequest": {
"AddressKeyFormat": {
"ConsigneeName": "RITZ CAMERA CENTERS-1749",
"BuildingName": "Innoplex",
"AddressLine": [
"26601 ALISO CREEK ROAD",
"STE D",
"ALISO VIEJO TOWN CENTER"
],
"Region": "ROSWELL,GA,30076-1521",
"PoliticalDivision2": "ALISO VIEJO",
"PoliticalDivision1": "CA",
"PostcodePrimaryLow": "92656",
"PostcodeExtendedLow": "1521",
"Urbanization": "porto arundal",
"CountryCode": "US"
}
}
}
return await axios($, {
method: "post",
url: `https://onlinetools.ups.com/api/addressvalidation/v2/1`,
headers: {
Authorization: `Bearer ${this.ups.$auth.oauth_access_token}`,
"content-type": `application/json`,
},
params: {
maximumcandidatelistsize: `1`,
},
data,
})
},
})
The Klaviyo API grants you the power to automate and personalize your email marketing efforts. With it, you can manage lists, profiles, and campaigns, track event-driven communications, and analyze the results. By leveraging this API on Pipedream, you can create intricate, automated workflows that respond in real-time to your users' behavior, sync data across multiple platforms, and tailor your marketing strategies to improve engagement and conversion rates.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
klaviyo: {
type: "app",
app: "klaviyo",
}
},
async run({steps, $}) {
return await axios($, {
url: ` https://a.klaviyo.com/api/accounts/`,
headers: {
"Authorization": `Klaviyo-API-Key ${this.klaviyo.$auth.api_key}`,
"revision": `2023-12-15`,
},
})
},
})