• Overview
  • Features
  • Pricing
  • Blog
  • Support
  • API
  • View a Demo
  • Get the app




Members

GET List Members
GET Get Member
POST Update Member
POST Delete Member

Rewards

GET List Rewards
GET Get Reward
POST Create Reward
POST Update Reward
POST Delete Reward
POST Redeem Reward

Points

GET List Point Activity
POST Adjust Points

Discount Codes

GET Get Discounts
GET Get Discount

Vip Tiers

GET Get Vip Tiers



Glow Loyalty API

Welcome to the Glow API Reference! You can use the Glow API to integrate Glow with your own software, build custom reports for your program or to build connections between Glow and other apps. The Glow API is built to be RESTful and is stateless, so you'll need to authenticate with each request. Below you will find the available endpoints along with arguments and sample JSON responses.


Download PHP SDK


Base Endpoint

All API requests should use the following URL as their base:

BASE URL:
https://www.glowloyalty.com

Example Request URL:
https://www.glowloyalty.com/api/v1/members


Authentication

To use the API, you'll need to pass your api_key and api_secret in the headers of each request. You can obtain your API key and secret by logging into Glow and navigating to Settings > API Key inside your account.



Glow PHP SDK

If you are using PHP, you can download our PHP SDK and drop it into your codebase to make integration with your application a little easier.

Download PHP SDK



PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$member = $glow->getMember(['email'=>'[email protected]']);

If you need support with the API or have questions about integration, please let us know by emailing [email protected].

GUZZLE Example:
$url = "https://www.glowloyalty.com/api/v1/adjust-points";
$api_key = "SPXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$api_secret = "SPXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

$client = new \GuzzleHttp\Client([
    'headers' => [
        'api_key' 		=> $api_key,
        'api_secret'	=> $api_secret,
    ]
]);
$client->post(
    $url,
    array(
        'form_params' => array(
	        'email'			=> '[email protected]',
			'points' 		=> 100, /* add 100 points */
	        'custom_name' 	=> 'GitHub Points',
	        'custom_image'	=> 'https://image.flaticon.com/icons/svg/38/38401.svg',
        )
    )
);
PHP cURL Example:
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.glowloyalty.com/api/v1/adjust-points",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $fieldData,
  CURLOPT_HTTPHEADER => array(
    "Cache-Control: no-cache",
    "api_key: SPXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "api_secret: SPXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "content-type: multipart/form-data;"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}





List Members

GET /api/v1/members

Get a paginated list of members. Members are customers who have been enrolled in the loyalty program. You may also see members referred to as customers throughout this API.


Parameters

searchString to search by (full or partial email)
orderingOrder of results (asc or desc)
pagePage number for paginated results (100 per page)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$members = $glow->getMembers([
                'search' => 'domain.com',
                'ordering' => 'asc',
                'page' => 1
            ]);

Sample Response:
{
    "current_page": 1,
    "data": [
        {
            "id": 7,
            "user_id": 2,
            "platform_id": "7040200266",
            "email": "[email protected]",
            "first_name": "James",
            "last_name": "Bond",
            "point_balance": 4110,
            "lifetime_points": 11630,
            "birthday": null,
            "created_at": "2017-08-23 00:12:58",
            "updated_at": "2018-04-09 01:35:35",
            "referral_code": "599cc8a",
            "referred_by": null,
            "multiplier": "1.00"
        },
        {
            "id": 14,
            "user_id": 2,
            "platform_id": "7267390986",
            "email": "[email protected]",
            "first_name": "Barney",
            "last_name": "Rubble",
            "point_balance": 200,
            "lifetime_points": 200,
            "birthday": null,
            "created_at": "2017-09-21 03:33:25",
            "updated_at": "2017-09-21 03:33:25",
            "referral_code": null,
            "referred_by": null,
            "multiplier": "1.00"
        }    
    ],
    "from": 1,
    "last_page": 1,
    "next_page_url": null,
    "path": "https://www.glowloyalty.com/api/v1/members",
    "per_page": 100,
    "prev_page_url": null,
    "to": 17,
    "total": 17
}
			





Get Member

GET /api/v1/member

Get a single member


Parameters

idMember ID (required if email and platform_id not provided)
emailMember email (required if id and platform_id not provided)
platform_idShopify platform id (required if id and email not provided)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$member = $glow->getMember([
                'email'=>'[email protected]'
            ]);

Sample Response:
{
    "id": 7,
    "user_id": 2,
    "platform_id": "7040200266",
    "email": "[email protected]",
    "first_name": "James",
    "last_name": "Bond",
    "point_balance": 4110,
    "lifetime_points": 11630,
    "birthday": null,
    "created_at": "2017-08-23 00:12:58",
    "updated_at": "2018-04-09 01:35:35",
    "referral_code": "599cc8a",
    "referred_by": null,
    "multiplier": "1.00"
}





Update Member

POST /api/v1/update-member

Update member info in Glow


Parameters

idMember ID (required)
first_nameFirst name (optional)
last_nameLast name (optional)
point_balanceCurrent point balance (optional)
lifetime_pointsLifetime points earned (optional)
birthdayBirthday (optional string - format: MM-DD)
referral_codeUnique referral code for this member (optional)
referred_byUnqiue referral code of referring member (optional)
multiplierVIP Multiplier. 1 is the default
vip_tier_idID of VIP Tier (optional). 0 is the default




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$member = $glow->updateMember([
                'id' => 1,
				'first_name' => 'James',
				'last_name' => 'Bond',
                //'point_balance' => 4110,
                //'lifetime_points' => 11630,
                'birthday' => '11-31',
                //'referral_code' => '56efsys',
                //'referred_by' => '74rg6tr',
                //'multiplier' => 1,
                //'vip_tier_id' => 15
			]);

Sample Response:
{
    "id": 7,
    "user_id": 2,
    "platform_id": "7040200266",
    "email": "[email protected]",
    "first_name": "James",
    "last_name": "Bond",
    "point_balance": 4110,
    "lifetime_points": 11630,
    "birthday": null,
    "created_at": "2017-08-23 00:12:58",
    "updated_at": "2018-04-09 01:35:35",
    "referral_code": "599cc8a",
    "referred_by": null,
    "multiplier": "1.00",
    "vip_tier_id": "15"
}





Delete Member

POST /api/v1/delete-member

Delete a member


Parameters

idMember ID (required)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$result = $glow->deleteMember([
                'id' => 1
            ]);

Sample Response:
{
                "status": 1,
                "response": "Member deleted."
            }





List Rewards

GET /api/v1/rewards

Get a list of rewards. Rewards are essentially sets of rules from which discount codes are generated in exchange for points by members.


Parameters

searchString to search by (name of reward)
orderingOrder of results (asc or desc)
pagePage number for paginated results (100 per page)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$rewards = $glow->getRewards([
                'search'=>'holiday',
                'ordering' => 'asc',
                'page' => 1
            ]);

Sample Response:
{
    "current_page": 1,
    "data": [
        {
            "id": 7,
            "user_id": 2,
            "name": "$10 Off Coupon",
            "points": 1000,
            "type": "fixed",
            "minimum": "0.00",
            "value": "10.00",
            "apply_to": "all_orders",
            "prefix": null,
            "enabled": 1,
            "collection_id": null,
            "product_id": null,
            "variant_id": null,
            "one_use_per_customer" => 1,
            "one_time" => 2,
            "vip_tier" => 3515,
            "created_at": "2017-08-22 16:28:07",
            "updated_at": "2017-11-29 22:15:50"
        },
        {
            "id": 9,
            "user_id": 2,
            "name": "Free Shipping",
            "points": 3500,
            "type": "free_shipping",
            "minimum": "0.00",
            "value": null,
            "apply_to": "all_orders",
            "prefix": "",
            "enabled": 1,
            "collection_id": null,
            "product_id": null,
            "variant_id": null,
            "one_use_per_customer" => 1,
            "one_time" => 2,
            "vip_tier" => 3516,
            "created_at": "2017-08-22 16:28:07",
            "updated_at": "2017-08-22 16:28:07"
        },
        {
            "id": 10,
            "user_id": 2,
            "name": "Free Product",
            "points": 10,
            "type": "product",
            "minimum": null,
            "value": null,
            "apply_to": "all_orders",
            "prefix": "FREEPRODUCT-",
            "enabled": 1,
            "collection_id": null,
            "product_id": null,
            "variant_id": "47522631882",
            "one_use_per_customer" => 1,
            "one_time" => 2,
            "vip_tier" => 3516,
            "created_at": "2017-11-29 02:06:02",
            "updated_at": "2017-11-29 04:53:56"
        },
        {
            "id": 12,
            "user_id": 2,
            "name": "$5 Off Collection",
            "points": 10,
            "type": "fixed",
            "minimum": null,
            "value": "5.00",
            "apply_to": "single_collection",
            "prefix": "5OFF-",
            "enabled": 1,
            "collection_id": "2550300682",
            "product_id": null,
            "variant_id": null,
            "one_use_per_customer" => 1,
            "one_time" => 2,
            "vip_tier" => 3516,
            "created_at": "2017-11-29 17:49:51",
            "updated_at": "2018-04-08 20:18:09"
        }  
    ],
    "from": 1,
    "last_page": 1,
    "next_page_url": null,
    "path": "https://www.glowloyalty.com/api/v1/rewards",
    "per_page": 100,
    "prev_page_url": null,
    "to": 10,
    "total": 10
}





Get Reward

GET /api/v1/reward

Get a single reward


Parameters

idReward ID (required)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$reward = $glow->getReward([
                'id'=>16
            ]);

Sample Response:
{
    "id": 16,
    "user_id": 2,
    "name": "POS Only Award",
    "points": 100,
    "type": "fixed",
    "minimum": null,
    "value": "10.00",
    "apply_to": "all_orders",
    "prefix": null,
    "enabled": 2,
    "collection_id": null,
    "product_id": null,
    "variant_id": null,
    "one_use_per_customer" => 1,
    "one_time" => 2,
    "vip_tier" => 3516,
    "created_at": "2018-01-11 15:28:57",
    "updated_at": "2018-01-11 15:30:07"
}





Create Reward

POST /api/v1/create-reward

Create a reward


Parameters

nameName of reward (required)
pointsPoint value of reward (required)
typeType of reward (required - fixed, percent, free_shipping, product)
minimumMinimum order amount (optional - format: 10.00)
valuePercent or dollar amount (required if type = fixed or percent - format 10.00)
apply_toApply to orders (optional - default all_orders - all_orders, minimum_amount, single_product, single_collection)
prefixCode prefix (optional)
enabledOptional (0 = disabled, 1 = enabled, 2 = POS Only)
collection_idRequired if apply_to = single_collection
product_idRequired if apply_to = single_product
variant_idRequired if type = product
vip_tier_idID of VIP Tier (optional)
one_timeReward Usage (optional) (0 = Unlimited, 1 = Once total, 2 = Once per customer)
one_use_per_customerOnce redeemed, how many times can the customer use the discount? (optional) (0 = Multiple times by the same customer, 1 = Only once)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$reward = $glow->createReward([
				'name'=>'$10 OFF Balloons',
				'points' => 100,
				'type' => 'fixed',
               // 'minimum' => 0,
				'value' => '10.00',
				'apply_to' => 'single_collection',
				'prefix' => 'BLN-',
				'enabled' => 1,
				'collection_id' => 46457345445345,
               // 'product_id' => null,
               // 'variant_id' => null,
                'vip_tier_id' => 13,
                'one_time' => 2,
                'one_use_per_customer' => 1,
			]);

Sample Response:
{
    "user_id": 2,
    "name": "$10 OFF Balloons",
    "points": "100",
    "type": "fixed",
    "minimum": null,
    "value": "10",
    "apply_to": "all_orders",
    "prefix": null,
    "enabled": "0",
    "collection_id": null,
    "product_id": null,
    "variant_id": null,
    "one_use_per_customer" => 1,
    "one_time" => 2,
    "vip_tier" => 3515,
    "updated_at": "2018-04-09 20:42:30",
    "created_at": "2018-04-09 20:42:30",
    "id": 17
}





Update Reward

POST /api/v1/update-reward

Update the reward


Parameters

idID of reward (required)
nameName of reward (required)
pointsPoint value of reward (required)
typeType of reward (required - fixed, percent, free_shipping, product)
minimumMinimum order amount (optional - format: 10.00)
valuePercent or dollar amount (required if type = fixed or percent - format 10.00)
apply_toApply to orders (optional - default all_orders - all_orders, minimum_amount, single_product, single_collection)
prefixCode prefix (optional)
enabledOptional (0 = disabled, 1 = enabled, 2 = POS Only)
collection_idRequired if apply_to = single_collection
product_idRequired if apply_to = single_product
variant_idRequired if type = product
vip_tier_idID of VIP Tier (optional)
one_timeReward Usage (optional) (0 = Unlimited, 1 = Once total, 2 = Once per customer)
one_use_per_customerOnce redeemed, how many times can the customer use the discount? (optional) (0 = Multiple times by the same customer, 1 = Only once)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$reward = $glow->updateReward([
                'id' => 17,
				'name'=>'$10 OFF Balloons',
				'points' => 100,
				'type' => 'fixed',
                'minimum' => 0,
				'value' => '10.00',
				'apply_to' => 'single_collection',
				'prefix' => 'BLN-',
				'enabled' => 1,
				'collection_id' => 46457345445345,
                'product_id' => null,
                'variant_id' => null,
                'vip_tier_id' => 3515,
                'one_time' => 2,
                'one_use_per_customer' => 1,
			]);

Sample Response:
{
    "user_id": 2,
    "name": "$10 OFF Balloons",
    "points": "100",
    "type": "fixed",
    "minimum": null,
    "value": "10",
    "apply_to": "all_orders",
    "prefix": null,
    "enabled": "0",
    "collection_id": null,
    "product_id": null,
    "variant_id": null,
    "one_use_per_customer" => 1,
    "one_time" => 2,
    "vip_tier" => 3515,
    "updated_at": "2018-04-09 20:42:30",
    "created_at": "2018-04-09 20:42:30",
    "id": 17
}





Delete Reward

POST /api/v1/delete-reward

Delete a reward


Parameters

idReward ID




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$result = $glow->deleteReward([ 
                'id' => 16 
            ]);

Sample Response:
{
    "status": 1,
    "response": "Reward deleted."
}





Redeem Reward

POST /api/v1/redeem-reward

Redeem the reward


Parameters

idID of reward (required)
member_idID of member (required)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$discountCode = $glow->redeemReward([
                'id' => 17,
				'member_id'=> 35,
			]);

Sample Response:
{
    "user_id": 15,
    "customer_id": 35,
    "platform_code_id": 77777777777777,
    "platform_price_rule_id": 888888888888,
    "code": "b81744e",
    "name": "Hot wheels",
    "reward_id": 17,
    "updated_at": "2022-06-21 16:15:52",
    "created_at": "2022-06-21 16:15:52",
    "id": 125
}





List Point Activity

GET /api/v1/point-log

Get a list of point adjustments. The point_log tracks all points awarded or deducted from members.


Parameters

idMember ID (optional)
orderingOrder of results based on time created (asc/desc)
pagePage number for paginated results (100 per page)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$log = $glow->getPointLog([
				'id'=> 2,
				'ordering' => 'desc',
				'page' => 2
			]);

Sample Response:
{
    "current_page": 1,
    "data": [
        {
            "id": 108,
            "user_id": 2,
            "customer_id": 16,
            "points": 200,
            "type": "signup",
            "order_id": "",
            "created_at": "2017-10-27 01:14:28",
            "updated_at": "2017-10-27 01:14:28",
            "order_total": "0.00",
            "custom_name": null,
            "custom_image": null,
            "description": null
        },
        {
            "id": 109,
            "user_id": 2,
            "customer_id": 16,
            "points": 100,
            "type": "order",
            "order_id": "49639522314",
            "created_at": "2017-10-27 01:14:45",
            "updated_at": "2017-10-27 01:14:45",
            "order_total": "13.66",
            "custom_name": "MANUAL ORDER ",
            "custom_image": "http://example.com?example.png",
            "description": "MANUAL ORDER"
        }
    ],
    "from": 1,
    "last_page": 1,
    "next_page_url": null,
    "path": "https://www.glowloyalty.com/api/v1/point-log",
    "per_page": 100,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}





Adjust Points

POST /api/v1/adjust-points

Add or deduct points from a member


Parameters

idMember ID (required if email not provided)
emailMember email (required if id not provided)
pointsPositive integer to add points, negative integer to deduct
custom_nameA custom name for the type of points (ie. MyBrand Points')
custom_imageFull URL to a custom icon to display on the admin dashboard




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$member = $glow->adjustPoints([
				'email'=>'[email protected]',
				'points' => 100, /* add 100 points */
                'custom_name' => 'GitHub Points',
                'custom_image' => 'https://image.flaticon.com/icons/svg/38/38401.svg',
			]);

Sample Response:
{
    "id": 16,
    "user_id": 2,
    "platform_id": "50494668810",
    "email": "[email protected]",
    "first_name": "Jon",
    "last_name": "Swift",
    "point_balance": 320,
    "lifetime_points": 320,
    "birthday": null,
    "created_at": "2017-10-27 01:14:28",
    "updated_at": "2018-04-09 21:00:01",
    "referral_code": null,
    "referred_by": null,
    "multiplier": "1.00"
}





Get Discounts

GET /api/v1/discount-codes

Get a list of Glow-generated discount codes


Parameters

idMember ID (optional)
orderingOrder of results based on time created (asc/desc)
pagePage number for paginated results (100 per page)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$discountCodes = $glow->getDiscountCodes([
                'id' => 7
            ]);

Sample Response:
{
    "current_page": 1,
    "data": [
        {
            "id": 9,
            "user_id": 2,
            "customer_id": 7,
            "name": "5USD Off Coupon",
            "platform_code_id": 3688486730,
            "platform_price_rule_id": 3733611274,
            "code": "c7ee299",
            "used": 1,
            "created_at": "2017-08-23 02:39:04",
            "updated_at": "2017-08-23 03:14:07",
            "order_total": "0.00"
        },
        {
            "id": 10,
            "user_id": 2,
            "customer_id": 7,
            "name": "5USD Off Coupon",
            "platform_code_id": 3688495242,
            "platform_price_rule_id": 3733619786,
            "code": "5OFF-4358310",
            "used": 1,
            "created_at": "2017-08-23 02:53:55",
            "updated_at": "2017-08-23 03:07:44",
            "order_total": "0.00"
        }
    ],
    "from": 1,
    "last_page": 1,
    "next_page_url": null,
    "path": "https://www.glowloyalty.com/api/v1/discount-codes",
    "per_page": 100,
    "prev_page_url": null,
    "to": 9,
    "total": 9
}





Get Discount

GET /api/v1/discount-code

Get a single Glow-generated discount code


Parameters

idGlow Code ID (required if code not provided)
codeCode (required if id not provided)




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$discountCodes = $glow->getDiscountCode([
                'id' => 17
            ]);

Sample Response:
{
    "id": 17,
    "user_id": 2,
    "customer_id": 8,
    "name": "$5 Off",
    "platform_code_id": 4294967295,
    "platform_price_rule_id": 4294967295,
    "code": "5OFF-26cecb0",
    "used": 0,
    "created_at": "2018-04-08 20:18:47",
    "updated_at": "2018-04-08 20:18:47",
    "order_total": "0.00"
}





Get Vip Tiers

GET /api/v1/vip-tiers

Get a list of vip tiers


Parameters




PHP SDK Example:
$glow = new \Glow\Glow($api_key,$api_secret);
$vipTiers = $glow->getVipTiers();

Sample Response:
{
    [
        {
            "id": 15,
            "user_id": 15,
            "name": "Silver",
            "min_points": 25,
            "multiplier": 1,
            "color": "#943d3d",
            "created_at": "2020-08-21 00:26:38",
            "updated_at": "2020-08-21 00:27:32"
        },
        {
            "id": 13,
            "user_id": 15,
            "name": "gold",
            "min_points": 100,
            "multiplier": 3,
            "color": "#000000",
            "created_at": "2020-05-16 14:26:04",
            "updated_at": "2020-08-21 00:27:53"
        }
    ],
}






Glow Loyalty, Rewards & Referrals
[email protected]

Company

  • About Us
  • Terms of Use
  • Privacy Policy
  • Data protection

Overview

  • Features
  • Pricing
  • Shopify App

Support

  • Help Center
  • Contact Support
  • API Documentation
Copyright © 2023 PayWhirl Inc. All Rights Reserved.     Terms of Use     Privacy Policy
This website uses cookies to improve user experience in accordance with our Cookie Policy