Quick Start
With this Quick Start guide, make your first request in just minutes
Tip: Shopwaive's quick start guide helps developers setup their first request in minutes. Use this guide to locate your API keys and more.
Your API requests are authenticated with Shopwaive using API keys and access tokens. Any request that doesn't include an API key will return an error.
Within the Shopwaive app, you can access your API keys from clicking the initial avatar at the top right of the topbar to access the Settings menu, then click Settings and scroll down to the Shopwaive REST API.
Good to know: Access tokens should be handled with care and never exposed in unsecured environments. They should never be shared as they provide access to your stores' data.
To make your first request, send an authenticated request to the get customer endpoint. This will fetch a
customer
by email address. Ensure to include the X-Shopwaive-Access-Token
and X-Shopwaive-Platform
headers.get
https://app.shopwaive.com
/api/customer/{customer_email}
Get customer
Take a look at how you might call this method using our official libraries, or via
curl
:curl
Node Axios
NPM Package
Python
curl --location 'https://app.shopwaive.com/api/customer/[email protected]' \
--header 'X-Shopwaive-Access-Token: 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0' \
--header 'X-Shopwaive-Platform: shopify' \
--header 'Content-Type: application/json' \
--data ''
var axios = require('axios');
var data = '';
var config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://app.shopwaive.com/api/customer/[email protected]',
headers: {
'X-Shopwaive-Access-Token': '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0',
'X-Shopwaive-Platform': 'shopify',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var config = {
headers: {
"X-Shopwaive-Access-Token": "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6",
"X-Shopwaive-Platform": "shopify",
"Content-Type":"application/json"
}
};
const Shopwaive = require('@shopwaive/credit');
const email = "[email protected]";
async function getCustomer() {
return new Promise((resolve, reject) => {
let data = Shopwaive.getCustomer(config, email);
resolve(data)
});
}
getCustomer().then(res => {
let data = res.data;
if (data) {
console.log(res.data);
}
console.log(res.status)
console.log(res.statusText)
})
import http.client
import json
conn = http.client.HTTPSConnection("app.shopwaive.com")
payload = ''
headers = {
'X-Shopwaive-Access-Token': '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0',
'X-Shopwaive-Platform': 'shopify',
'Content-Type': 'application/json'
}
conn.request("GET", "/api/customer/[email protected]", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Last modified 4d ago