Shopwaive API 2024-11
  • Shopwaive REST API
  • Quick Start
  • Reference
    • REST API documentation
      • Customer API
      • Action API
      • Order API
    • Shopwaive API rate limits
Powered by GitBook
On this page

Was this helpful?

Quick Start

With this Quick Start guide, make your first request in just minutes

PreviousShopwaive REST APINextREST API documentation

Last updated 9 months ago

Was this helpful?

Tip: Shopwaive's quick start guide helps developers setup their first request in minutes. Use this guide to locate your API keys and more.

Get your API keys

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.

Make your first request

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.

Take a look at how you might call this method using our official libraries, or via curl:

curl --location 'https://app.shopwaive.com/api/customer/example@gmail.com' \
--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/example@gmail.com',
  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 = "support@shopwaive.com";

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/example@gmail.com", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Get customer

get
Authorizations
Path parameters
customer_emailstringRequired

The email of the customer to retrieve

Responses
200
Successfully fetched customer account
application/json
default
Unexpected error. Method not allowed
application/json
get
GET /api/customer/{customer_email} HTTP/1.1
Host: app.shopwaive.com
X-Shopwaive-Access-Token: YOUR_API_KEY
Accept: */*
{
  "status": "success",
  "customerid": "6659662610648",
  "email": "support@shopwaive.com",
  "balance": 0,
  "expirationdate": "2025-01-19T18:50:15.75Z",
  "expires": "false",
  "orders": []
}
  • Get your API keys
  • Make your first request
  • GETGet customer