Welcome to the Glow Stage API Reference! You can use the Glow Stage API to integrate Glow Stage with your own software, build custom reports for your program or to build connections between Glow Stage and other apps. The Glow Stage 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.
All API requests should use the following URL as their base:
https://stage.glowloyalty.com
https://stage.glowloyalty.com/api/v1/members
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 Stage
and navigating to Settings > API Key
inside your account.
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
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$member = $glow->getMember(['email'=>'member@domain.com']);
If you need support with the API or have questions about integration, please let us know by emailing support@glowloyalty.com.
$url = "https://stage.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,
[
'form_params' =>
[
'email' => 'fred@glowloyalty.com',
'points' => 100,
'custom_name' => 'GitHub Points',
'custom_image' => 'https://image.flaticon.com/icons/svg/38/38401.svg',
]
]
);
$curl = curl_init();
curl_setopt_array($curl,
[
CURLOPT_URL => "https://stage.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 =>
[
"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;
}
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
search |
String to search by (full or partial email) |
ordering |
Order of results (asc or desc) |
page |
Page number for paginated results (100 per page) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$members = $glow->getMembers(['search' => 'domain.com', 'ordering' => 'asc', 'page' => 1]);
{
"current_page": 1,
"data": [
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "jamesbond@glowloyalty.com",
"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": 0,
"current_vip_tier_id": null,
"current_vip_tier_name": null
},
{
"id": 14,
"user_id": 2,
"platform_id": "7267390986",
"email": "brubble@glowloyalty.com",
"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",
"vip_tier_id": 0,
"current_vip_tier_id": 1,
"current_vip_tier_name": "Bronze"
}
],
"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 a single member
Parameters
id |
Member ID (required if email and platform_id not provided) |
email |
Member email (required if id and platform_id not provided) |
platform_id |
Shopify platform id (required if id and email not provided) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$member = $glow->getMember(['email'=>'member@domain.com']);
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "jamesbond@glowloyalty.com",
"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": 0,
"current_vip_tier_id": null,
"current_vip_tier_name": null
}
Update member
info in Glow
Parameters
id |
Member ID (required) |
first_name |
First name (optional) |
last_name |
Last name (optional) |
point_balance |
Current point balance (optional) |
lifetime_points |
Lifetime points earned (optional) |
birthday |
Birthday (optional string - format: MM-DD) |
referral_code |
Unique referral code for this member (optional) |
referred_by |
Unqiue referral code of referring member (optional) |
multiplier |
VIP Multiplier. 1 is the default |
vip_tier_id |
ID of VIP Tier (optional). 0 is the default |
current_vip_tier_id |
ID of current VIP Tier (optional) |
current_vip_tier_name |
Name of current VIP Tier (optional) |
$glow = new \Glow Stage\Glow Stage($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,
'current_vip_tier_id' => 15,
'current_vip_tier_name' => 'Gold'
]
);
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "jamesbond@glowloyalty.com",
"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,
"current_vip_tier_id": 15,
"current_vip_tier_name": "Gold"
}
Delete a member
Parameters
id |
Member ID (required) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$result = $glow->deleteMember(['id' => 1]);
{
"status": 1,
"response": "Member deleted."
}
Get a list of rewards
. Rewards
are essentially sets of rules from which discount codes are generated in exchange for points
by members
.
Parameters
search |
String to search by (name of reward) |
ordering |
Order of results (asc or desc) |
page |
Page number for paginated results (100 per page) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$rewards = $glow->getRewards(['search'=>'holiday', 'ordering' => 'asc', 'page' => 1]);
{
"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,
"vip_tier" => 3515,
"usage_type" => "once_per_customer",
"num_uses_per_customer" => 1,
"created_at": "2017-08-22 16:28:07",
"updated_at": "2017-11-29 22:15:50"
"purchase_type" => "one-time",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
},
{
"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,
"vip_tier" => 3516,
"usage_type" => "once_per_customer",
"num_uses_per_customer" => 1,
"created_at": "2017-08-22 16:28:07",
"updated_at": "2017-08-22 16:28:07",
"purchase_type" => "both",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
},
{
"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",
"vip_tier" => 3516,
"usage_type" => "once_per_customer",
"num_uses_per_customer" => 1,
"created_at": "2017-11-29 02:06:02",
"updated_at": "2017-11-29 04:53:56",
"purchase_type" => "one-time",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
},
{
"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,
"vip_tier" => 3516,
"usage_type" => "once_per_customer",
"num_uses_per_customer" => 1,
"created_at": "2017-11-29 17:49:51",
"updated_at": "2018-04-08 20:18:09",
"purchase_type" => "one-time",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
}
],
"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 a single reward
Parameters
id |
Reward ID (required) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$reward = $glow->getReward(['id'=> 16]);
{
"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,
"vip_tier" => 3516,
"usage_type" => "unlimited",
"num_uses_per_customer" => 1,
"created_at": "2018-01-11 15:28:57",
"updated_at": "2018-01-11 15:30:07",
"purchase_type" => "one-time",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
}
Create a reward
Parameters
name |
Name of reward (required) |
points |
Point value of reward (required) |
type |
Type of reward (required - fixed , percent , free_shipping , product ) |
minimum |
Minimum order amount (optional - format: 10.00) |
value |
Percent or dollar amount (required if type = fixed or percent - format 10.00) |
apply_to |
Apply to orders (optional - default all_orders - all_orders , minimum_amount , single_product , single_collection ) |
prefix |
Code prefix (optional) |
enabled |
Optional (0 = disabled , 1 = enabled , 2 = POS Only ) |
collection_id |
Required if apply_to = single_collection |
product_id |
Required if apply_to = single_product |
variant_id |
Required if type = product |
vip_tier_id |
ID of VIP Tier (optional) |
usage_type |
Reward Usage (optional) (unlimited , once_total , once_per_customer ) |
num_uses_per_customer |
Once redeemed, how many times can the customer use the discount? (optional) |
purchase_type |
The purchase type the discount will apply to (optional - one-time , both ) |
combines_with_order |
Set if the discount code created from the reward can be combined with order discounts (optional - true , false ) |
combines_with_product |
Set if the discount code created from the reward can be combined with product discounts (optional - true , false ) |
combines_with_shipping |
Set if the discount code created from the reward can be combined with shipping discounts (optional - true , false ) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$reward = $glow->createReward(
[
'name'=>'$10 OFF Balloons',
'points' => 100,
'type' => 'fixed',
'value' => '10.00',
'apply_to' => 'single_collection',
'prefix' => 'BLN-',
'enabled' => 1,
'collection_id' => 46457345445345,
'vip_tier_id' => 13,
'usage_type' => 'unlimited',
'num_uses_per_customer' => 1,
'purchase_type' => 'both',
'combines_with_order' => false,
'combines_with_product' => false,
'combines_with_shipping' => false,
]
);
{
"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,
"vip_tier" => 3515,
"usage_type" => "unlimited",
"num_uses_per_customer" => 1,
"updated_at": "2018-04-09 20:42:30",
"created_at": "2018-04-09 20:42:30",
"id": 17,
"purchase_type" => "one-time",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
}
Update the reward
Parameters
id |
ID of reward (required) |
name |
Name of reward (required) |
points |
Point value of reward (required) |
type |
Type of reward (required - fixed , percent , free_shipping , product ) |
minimum |
Minimum order amount (optional - format: 10.00) |
value |
Percent or dollar amount (required if type = fixed or percent - format 10.00) |
apply_to |
Apply to orders (optional - default all_orders - all_orders , minimum_amount , single_product , single_collection ) |
prefix |
Code prefix (optional) |
enabled |
Optional (0 = disabled , 1 = enabled , 2 = POS Only ) |
collection_id |
Required if apply_to = single_collection |
product_id |
Required if apply_to = single_product |
variant_id |
Required if type = product |
vip_tier_id |
ID of VIP Tier (optional) |
usage_type |
Reward Usage (optional) (unlimited , once_total , once_per_customer ) |
num_uses_per_customer |
Once redeemed, how many times can the customer use the discount? (optional) |
purchase_type |
The purchase type the discount will apply to (optional - one-time , both ) |
combines_with_order |
Set if the discount code created from the reward can be combined with order discounts (optional - true , false ) |
combines_with_product |
Set if the discount code created from the reward can be combined with product discounts (optional - true , false ) |
combines_with_shipping |
Set if the discount code created from the reward can be combined with shipping discounts (optional - true , false ) |
$glow = new \Glow Stage\Glow Stage($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,
'usage_type' => 'unlimited',
'num_uses_per_customer' => 1
'purchase_type' => 'both',
'combines_with_order' => false,
'combines_with_product' => false,
'combines_with_shipping' => false,
]
);
{
"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,
"vip_tier" => 3515,
"usage_type" => "unlimited",
"num_uses_per_customer" => 1,
"purchase_type" => "both",
"combines_with_order" => false,
"combines_with_product" => false,
"combines_with_shipping" => false,
"updated_at": "2018-04-09 20:42:30",
"created_at": "2018-04-09 20:42:30",
"id": 17
}
Delete a reward
Parameters
id |
Reward ID |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$result = $glow->deleteReward(['id' => 16]);
{
"status": 1,
"response": "Reward deleted."
}
Redeem the reward
. Manual
members are not eligible to redeem rewards.
Parameters
id |
ID of reward (required) |
member_id |
ID of member (required) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$discountCode = $glow->redeemReward(['id' => 17, 'member_id' => 35]);
{
"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,
"legacy_price_rule": false
}
Get a list of point
adjustments. The point_log
tracks all points
awarded or deducted from members
.
Parameters
id |
Member ID (optional) |
ordering |
Order of results based on time created (asc/desc) |
page |
Page number for paginated results (100 per page) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$log = $glow->getPointLog(['id'=> 2, 'ordering' => 'desc', 'page' => 2]);
{
"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,
"refund_order_id": "",
"email_sent": 1,
"product_reward_id": 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",
"refund_order_id": "",
"email_sent": 1,
"product_reward_id": null
}
],
"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
}
Add or deduct points
from a member
Parameters
id |
Member ID (required if email not provided) |
email |
Member email (required if id not provided) |
points |
Positive integer to add points, negative integer to deduct |
custom_name |
A custom name for the type of points (ie. MyBrand Points') |
custom_image |
Full URL to a custom icon to display on the admin dashboard |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$member = $glow->adjustPoints(
[
'email'=>'jon@glowloyalty.com',
'points' => 100,
'custom_name' => 'GitHub Points',
'custom_image' => 'https://image.flaticon.com/icons/svg/38/38401.svg',
]
);
{
"id": 16,
"user_id": 2,
"platform_id": "50494668810",
"email": "jon@glowloyalty.com",
"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 a list of Glow-generated discount codes
Parameters
id |
Member ID (optional) |
ordering |
Order of results based on time created (asc/desc) |
page |
Page number for paginated results (100 per page) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$discountCodes = $glow->getDiscountCodes(['id' => 7]);
{
"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",
"status": "used",
"created_at": "2017-08-23 02:39:04",
"updated_at": "2017-08-23 03:14:07",
"order_total": "50.00",
"legacy_price_rule": true,
},
{
"id": 10,
"user_id": 2,
"customer_id": 7,
"name": "5USD Off Coupon",
"platform_code_id": 3688495242,
"platform_price_rule_id": 3733619786,
"code": "5OFF-4358310",
"status": "unused",
"created_at": "2017-08-23 02:53:55",
"updated_at": "2017-08-23 03:07:44",
"order_total": "0.00",
"legacy_price_rule": false,
}
],
"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 a single Glow-generated discount code
Parameters
id |
Glow Code ID (required if code not provided) |
code |
Code (required if id not provided) |
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$discountCodes = $glow->getDiscountCode(['id' => 17]);
{
"id": 17,
"user_id": 2,
"customer_id": 8,
"name": "$5 Off",
"platform_code_id": 4294967295,
"platform_price_rule_id": 4294967295,
"code": "5OFF-26cecb0",
"status": "unused",
"created_at": "2018-04-08 20:18:47",
"updated_at": "2018-04-08 20:18:47",
"order_total": "0.00",
"legacy_price_rule": false,
}
Get a list of vip tiers
Parameters
$glow = new \Glow Stage\Glow Stage($api_key,$api_secret);
$vipTiers = $glow->getVipTiers();
{
[
{
"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"
}
],
}