Add KlaviyoAPI library + back in stock functionality
Closed this issue · 3 comments
stefbowerman commented
Latest is on Bravest, build out for Howdy and then roll back into this repo
stefbowerman commented
KlaviyoAPI class needs to accept a version
argument
stefbowerman commented
export default class KlaviyoAPI {
constructor({ companyId, revision }) {
this.companyId = companyId
this.revision = revision || '2024-02-15'
}
...
makeRequest(urlBase, data) {
const promise = $.Deferred()
$.ajax({
async: true,
crossDomain: true,
url: `${urlBase}?company_id=${this.companyId}`,
method: 'POST',
headers: {
'revision': this.revision,
'content-type': 'application/json',
'cache-control': 'no-cache'
},
data: JSON.stringify(data)
})
stefbowerman commented
Closed with 2074367