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.

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.

Get customer

GEThttps://app.shopwaive.com/api/customer/{customer_email}
Path parameters
customer_email*string

The email of the customer to retrieve

Response

Successfully fetched customer account

Headers
Body
statusstring
customeridstring
emailstring
balancenumber
activityarray of object
Request
const response = await fetch('https://app.shopwaive.com/api/customer/{customer_email}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "status": "success",
    "customerid": "6659662610648",
    "email": "support@shopwaive.com",
    "balance": "450.00",
    "activity": [
      {
        "date": "2023-05-20T18:50:15.75Z",
        "note": "Refunded customer with store credit",
        "id": "1684608615750",
        "type": "adjusted",
        "transaction": "450.00",
        "expirationdate": "2023-05-20T18:50:15.738Z",
        "expires": "false"
      }
    ]
  }
]

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 ''

Last updated