Use this API reference to integrate with Glow using either official SDKs or direct HTTP requests. Each endpoint includes request parameters, SDK examples, non-SDK examples, and response payloads.
Please also review our Webhooks documentation for event-driven integrations.
api-key and api-secret from Settings > API Key.All API requests should use the following base URL:
https://glowloyalty.com
https://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
and navigating to Settings > API Key inside your account.
SDK version: 1.0.0 · Last updated: 2026-05-20 · Backward-compatible with current API routes.
curl -X POST 'https://glowloyalty.com/api/v1/adjust-points' \
-H 'api-key: YOUR_API_KEY' \
-H 'api-secret: YOUR_API_SECRET' \
-d '[email protected]&points=100'
If you need support with the API or have questions about integration, please let us know by emailing [email protected].
$url = "https://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' => '[email protected]',
'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://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.
Optional 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) |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$members = $glow->getMembers(['search' => 'domain.com', 'ordering' => 'asc', 'page' => 1]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const members = await glow.getMembers({ search: 'domain.com', ordering: 'asc', page: 1 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
members = glow.get_members({'search': 'domain.com', 'ordering': 'asc', 'page': 1})
curl -X GET 'https://www.glowloyalty.com/api/v1/members?search=domain.com&ordering=asc&page=1' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/members', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['search' => 'domain.com', 'ordering' => 'asc', 'page' => 1]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/members?search=domain.com&ordering=asc&page=1', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } }); const data = await response.json();
response = requests.get('https://www.glowloyalty.com/api/v1/members', headers={'api-key': api_key, 'api-secret': api_secret}, params={'search': 'domain.com', 'ordering': 'asc', 'page': 1}); data = response.json()
{
"current_page": 1,
"data": [
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "[email protected]",
"phone": "+1234567890",
"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,
"is_excluded_from_loyalty": false
},
{
"id": 14,
"user_id": 2,
"platform_id": "7267390986",
"email": "[email protected]",
"phone": null,
"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",
"is_excluded_from_loyalty": false
}
],
"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
Optional 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) |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$member = $glow->getMember(['email'=>'[email protected]']);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const member = await glow.getMember({ email: '[email protected]' });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
member = glow.get_member({'email': '[email protected]'})
curl -X GET 'https://www.glowloyalty.com/api/v1/member?email=member%40domain.com' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/member', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['email' => '[email protected]']]);
const response = await fetch('https://www.glowloyalty.com/api/v1/member?email=member%40domain.com', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/member', headers={'api-key': api_key, 'api-secret': api_secret}, params={'email': '[email protected]'})
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "[email protected]",
"phone": "+1234567890",
"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,
"is_excluded_from_loyalty": false
}
Update member info in Glow
Required Parameters
id |
Member ID (required) |
Optional Parameters
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) |
is_excluded_from_loyalty |
Set to true to exclude this member from loyalty points and notifications (optional) |
Common Mistakes
$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' => 0,
'current_vip_tier_id' => null,
'current_vip_tier_name' => null,
'is_excluded_from_loyalty' => false
]
);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const member = await glow.updateMember({ id: 1, first_name: 'James', last_name: 'Bond' });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
member = glow.update_member({'id': 1, 'first_name': 'James', 'last_name': 'Bond'})
curl -X POST 'https://www.glowloyalty.com/api/v1/update-member' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'id=1&first_name=James&last_name=Bond'
$response = $client->post('/api/v1/update-member', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['id' => 1, 'first_name' => 'James', 'last_name' => 'Bond']]);
const response = await fetch('https://www.glowloyalty.com/api/v1/update-member', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ id: '1', first_name: 'James', last_name: 'Bond' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/update-member', headers={'api-key': api_key, 'api-secret': api_secret}, data={'id': 1, 'first_name': 'James', 'last_name': 'Bond'})
{
"id": 7,
"user_id": 2,
"platform_id": "7040200266",
"email": "[email protected]",
"phone": "+1234567890",
"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,
"is_excluded_from_loyalty": false
}
Delete a member
Required Parameters
id |
Member ID (required) |
$glow = new \Glow\Glow($api_key, $api_secret);
$result = $glow->deleteMember(['id' => 1]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const result = await glow.deleteMember({ id: 1 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
result = glow.delete_member({'id': 1})
curl -X POST 'https://www.glowloyalty.com/api/v1/delete-member' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'id=1'
$response = $client->post('/api/v1/delete-member', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['id' => 1]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/delete-member', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ id: '1' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/delete-member', headers={'api-key': api_key, 'api-secret': api_secret}, data={'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.
Optional 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\Glow($api_key, $api_secret);
$rewards = $glow->getRewards(['search'=>'holiday', 'ordering' => 'asc', 'page' => 1]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const rewards = await glow.getRewards({ search: 'holiday', ordering: 'asc', page: 1 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
rewards = glow.get_rewards({'search': 'holiday', 'ordering': 'asc', 'page': 1})
curl -X GET 'https://www.glowloyalty.com/api/v1/rewards?search=holiday&ordering=asc&page=1' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/rewards', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['search' => 'holiday', 'ordering' => 'asc', 'page' => 1]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/rewards?search=holiday&ordering=asc&page=1', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/rewards', headers={'api-key': api_key, 'api-secret': api_secret}, params={'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
Required Parameters
id |
Reward ID (required) |
$glow = new \Glow\Glow($api_key, $api_secret);
$reward = $glow->getReward(['id'=> 16]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const reward = await glow.getReward({ id: 16 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
reward = glow.get_reward({'id': 16})
curl -X GET 'https://www.glowloyalty.com/api/v1/reward?id=16' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/reward', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['id' => 16]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/reward?id=16', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/reward', headers={'api-key': api_key, 'api-secret': api_secret}, params={'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
Required Parameters
name |
Name of reward (required) |
points |
Point value of reward (required unless type = flexible, in which case it is auto-calculated) |
type |
Type of reward (required - fixed, percent, free_shipping, product, flexible) |
Optional Parameters
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) |
flexible_points_per_currency |
Required if type = flexible. Integer rate: how many points equal 1 unit of currency (e.g. 100 means 100 points = $1) |
flexible_min_redemption |
Minimum whole currency amount a customer can redeem (optional integer, defaults to 1 if not set - only used when type = flexible) |
flexible_max_redemption |
Maximum whole currency amount a customer can redeem (optional integer, no cap if not set - only used when type = flexible) |
Common Mistakes
$glow = new \Glow\Glow($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,
]
);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const reward = await glow.createReward({ name: '$10 Off Coupon', points: 1000, type: 'fixed', value: 10 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
reward = glow.create_reward({'name': '$10 Off Coupon', 'points': 1000, 'type': 'fixed', 'value': 10})
curl -X POST 'https://www.glowloyalty.com/api/v1/create-reward' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'name=%2410%20Off%20Coupon&points=1000&type=fixed&value=10.00'
$response = $client->post('/api/v1/create-reward', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['name' => '$10 Off Coupon', 'points' => 1000, 'type' => 'fixed', 'value' => '10.00']]);
const response = await fetch('https://www.glowloyalty.com/api/v1/create-reward', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ name: '$10 Off Coupon', points: '1000', type: 'fixed', value: '10.00' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/create-reward', headers={'api-key': api_key, 'api-secret': api_secret}, data={'name': '$10 Off Coupon', 'points': 1000, 'type': 'fixed', 'value': '10.00'})
{
"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
Required Parameters
id |
ID of reward (required) |
name |
Name of reward (required) |
points |
Point value of reward (required unless type = flexible, in which case it is auto-calculated) |
type |
Type of reward (required - fixed, percent, free_shipping, product, flexible) |
Optional Parameters
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) |
flexible_points_per_currency |
Required if type = flexible. Integer rate: how many points equal 1 unit of currency (e.g. 100 means 100 points = $1) |
flexible_min_redemption |
Minimum whole currency amount a customer can redeem (optional integer, defaults to 1 if not set - only used when type = flexible) |
flexible_max_redemption |
Maximum whole currency amount a customer can redeem (optional integer, no cap if not set - only used when type = flexible) |
Common Mistakes
$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,
'usage_type' => 'unlimited',
'num_uses_per_customer' => 1
'purchase_type' => 'both',
'combines_with_order' => false,
'combines_with_product' => false,
'combines_with_shipping' => false,
]
);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const reward = await glow.updateReward({ id: 16, name: '$10 Off Coupon', points: 1000 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
reward = glow.update_reward({'id': 16, 'name': '$10 Off Coupon', 'points': 1000})
curl -X POST 'https://www.glowloyalty.com/api/v1/update-reward' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'id=16&name=%2410%20Off%20Coupon&points=1000&type=fixed&value=10.00'
$response = $client->post('/api/v1/update-reward', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['id' => 16, 'name' => '$10 Off Coupon', 'points' => 1000, 'type' => 'fixed', 'value' => '10.00']]);
const response = await fetch('https://www.glowloyalty.com/api/v1/update-reward', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ id: '16', name: '$10 Off Coupon', points: '1000', type: 'fixed', value: '10.00' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/update-reward', headers={'api-key': api_key, 'api-secret': api_secret}, data={'id': 16, 'name': '$10 Off Coupon', 'points': 1000, 'type': 'fixed', 'value': '10.00'})
{
"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
Required Parameters
id |
Reward ID |
$glow = new \Glow\Glow($api_key, $api_secret);
$result = $glow->deleteReward(['id' => 16]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const result = await glow.deleteReward({ id: 16 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
result = glow.delete_reward({'id': 16})
curl -X POST 'https://www.glowloyalty.com/api/v1/delete-reward' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'id=16'
$response = $client->post('/api/v1/delete-reward', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['id' => 16]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/delete-reward', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ id: '16' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/delete-reward', headers={'api-key': api_key, 'api-secret': api_secret}, data={'id': 16})
{
"status": 1,
"response": "Reward deleted."
}
Redeem the reward. Manual members are not eligible to redeem rewards.
Required Parameters
id |
ID of reward (required) |
member_id |
ID of member (required) |
Optional Parameters
variant_id |
Required if type = product |
address_id |
Required if type = product |
points_to_redeem |
Required if type = flexible. Integer number of points the customer wishes to redeem. Must be within the reward's configured min/max range and must not exceed the customer's point balance. Defaults to the minimum if omitted. |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$discountCode = $glow->redeemReward(['id' => 17, 'member_id' => 35]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const discountCode = await glow.redeemReward({ id: 17, member_id: 35 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
discount_code = glow.redeem_reward({'id': 17, 'member_id': 35})
curl -X POST 'https://www.glowloyalty.com/api/v1/redeem-reward' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'id=17&member_id=35'
$response = $client->post('/api/v1/redeem-reward', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['id' => 17, 'member_id' => 35]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/redeem-reward', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ id: '17', member_id: '35' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/redeem-reward', headers={'api-key': api_key, 'api-secret': api_secret}, data={'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.
Optional Parameters
id |
Member ID (optional) |
created_at_from |
Filter records created on or after this date (YYYY-MM-DD) |
created_at_to |
Filter records created on or before this date (YYYY-MM-DD) |
updated_at_from |
Filter records updated on or after this date (YYYY-MM-DD) |
updated_at_to |
Filter records updated on or before this date (YYYY-MM-DD) |
ordering |
Order of results based on time created (asc/desc) |
page |
Page number for paginated results (100 per page) |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$log = $glow->getPointLog(['id'=> 2, 'ordering' => 'desc', 'page' => 2]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const log = await glow.getPointLog({ id: 2, ordering: 'desc', page: 2 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
log = glow.get_point_log({'id': 2, 'ordering': 'desc', 'page': 2})
curl -X GET 'https://www.glowloyalty.com/api/v1/point-log?id=2&ordering=desc&page=2' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/point-log', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['id' => 2, 'ordering' => 'desc', 'page' => 2]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/point-log?id=2&ordering=desc&page=2', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/point-log', headers={'api-key': api_key, 'api-secret': api_secret}, params={'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": null,
"return_order_id": null,
"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": null,
"return_order_id": null,
"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
Required Parameters
points |
Positive integer to add points, negative integer to deduct |
Optional Parameters
id |
Member ID (required if email not provided) |
email |
Member email (required if id not provided) |
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 |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$member = $glow->adjustPoints(
[
'email'=>'[email protected]',
'points' => 100,
'custom_name' => 'GitHub Points',
'custom_image' => 'https://image.flaticon.com/icons/svg/38/38401.svg',
]
);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const member = await glow.adjustPoints({ email: '[email protected]', points: 100, custom_name: 'GitHub Points' });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
member = glow.adjust_points({'email': '[email protected]', 'points': 100, 'custom_name': 'GitHub Points'})
curl -X POST 'https://www.glowloyalty.com/api/v1/adjust-points' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'email=jon%40glowloyalty.com&points=100&custom_name=GitHub%20Points'
$response = $client->post('/api/v1/adjust-points', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['email' => '[email protected]', 'points' => 100, 'custom_name' => 'GitHub Points']]);
const response = await fetch('https://www.glowloyalty.com/api/v1/adjust-points', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ email: '[email protected]', points: '100', custom_name: 'GitHub Points' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/adjust-points', headers={'api-key': api_key, 'api-secret': api_secret}, data={'email': '[email protected]', 'points': 100, 'custom_name': 'GitHub Points'})
{
"id": 16,
"user_id": 2,
"platform_id": "50494668810",
"email": "[email protected]",
"phone": "+1987654321",
"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",
"vip_tier_id": 0,
"current_vip_tier_id": null,
"current_vip_tier_name": null,
"is_excluded_from_loyalty": false
}
Get a list of Glow-generated discount codes
Optional 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\Glow($api_key, $api_secret);
$discountCodes = $glow->getDiscountCodes(['id' => 7]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const codes = await glow.getDiscountCodes({ id: 7 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
codes = glow.get_discount_codes({'id': 7})
curl -X GET 'https://www.glowloyalty.com/api/v1/discount-codes?id=7' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/discount-codes', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['id' => 7]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/discount-codes?id=7', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/discount-codes', headers={'api-key': api_key, 'api-secret': api_secret}, params={'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
Required Parameters
id |
Glow Code ID (required if code not provided) |
code |
Code (required if id not provided) |
Common Mistakes
$glow = new \Glow\Glow($api_key, $api_secret);
$discountCodes = $glow->getDiscountCode(['id' => 17]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const code = await glow.getDiscountCode({ id: 17 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
code = glow.get_discount_code({'id': 17})
curl -X GET 'https://www.glowloyalty.com/api/v1/discount-code?id=17' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/discount-code', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'query' => ['id' => 17]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/discount-code?id=17', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/discount-code', headers={'api-key': api_key, 'api-secret': api_secret}, params={'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
$glow = new \Glow\Glow($api_key, $api_secret);
$vipTiers = $glow->getVipTiers();
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const vipTiers = await glow.getVipTiers();
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
vip_tiers = glow.get_vip_tiers()
curl -X GET 'https://www.glowloyalty.com/api/v1/vip-tiers' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET'
$response = $client->get('/api/v1/vip-tiers', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/vip-tiers', { headers: { 'api-key': apiKey, 'api-secret': apiSecret } });
response = requests.get('https://www.glowloyalty.com/api/v1/vip-tiers', headers={'api-key': api_key, 'api-secret': api_secret})
{
[
{
"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"
}
],
}
Process a referral between two members. This endpoint records that one member has referred another, and awards points accordingly based on your referral settings.
Required Parameters
member_referring_id |
ID of the member who is referring (required) |
member_referred_id |
ID of the member being referred (required) |
$glow = new \Glow\Glow($api_key, $api_secret);
$response = $glow->referral([
'member_referring_id' => 1,
'member_referred_id' => 2,
]);
import { GlowClient } from '@glow/sdk';
const glow = new GlowClient({
apiKey: process.env.GLOW_API_KEY!,
apiSecret: process.env.GLOW_API_SECRET!
});
const response = await glow.referral({ member_referring_id: 1, member_referred_id: 2 });
from glow_sdk import GlowClient
glow = GlowClient(api_key='your-api-key', api_secret='your-api-secret')
response = glow.referral({'member_referring_id': 1, 'member_referred_id': 2})
curl -X POST 'https://www.glowloyalty.com/api/v1/referral' -H 'api-key: YOUR_API_KEY' -H 'api-secret: YOUR_API_SECRET' -d 'member_referring_id=1&member_referred_id=2'
$response = $client->post('/api/v1/referral', ['headers' => ['api-key' => $apiKey, 'api-secret' => $apiSecret], 'form_params' => ['member_referring_id' => 1, 'member_referred_id' => 2]]);
const response = await fetch('https://www.glowloyalty.com/api/v1/referral', { method: 'POST', headers: { 'api-key': apiKey, 'api-secret': apiSecret, 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ member_referring_id: '1', member_referred_id: '2' }) });
response = requests.post('https://www.glowloyalty.com/api/v1/referral', headers={'api-key': api_key, 'api-secret': api_secret}, data={'member_referring_id': 1, 'member_referred_id': 2})
{
"success": true,
"message": "Referral processed successfully.",
"data": {
"referrer": {
"id": 1,
"name": "Alice Smith",
"referral_code": "abc123"
},
"referred": {
"id": 2,
"name": "Bob Johnson",
"referred_by": "abc123"
}
}
}
api-key
and api-secret.YYYY-MM-DD and points use integers).
/api/v1/point-log for reads and
/api/v1/adjust-points for balance changes.