Skip to main content
GET
/
api
/
external
/
point-earn-rules
Get all point earning rules
curl --request GET \
  --url https://loyalty-admin.appstle.com/api/external/point-earn-rules \
  --header 'X-API-Key: <x-api-key>'
import requests

url = "https://loyalty-admin.appstle.com/api/external/point-earn-rules"

headers = {"X-API-Key": "<x-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};

fetch('https://loyalty-admin.appstle.com/api/external/point-earn-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://loyalty-admin.appstle.com/api/external/point-earn-rules';
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty-admin.appstle.com/api/external/point-earn-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);

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

curl_close($curl);

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

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://loyalty-admin.appstle.com/api/external/point-earn-rules"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<x-api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://loyalty-admin.appstle.com/api/external/point-earn-rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'

response = http.request(request)
puts response.read_body
{
  "basePoints": 123,
  "customerNotification": "<string>",
  "includeShippingPoints": true,
  "includeSubtotal": true,
  "includeTax": true,
  "name": "<string>",
  "addAdditionalPoints": true,
  "additionalPoints": 123,
  "allowedCustomerTags": "<string>",
  "allowedOrderTags": "<string>",
  "allowedProductTags": "<string>",
  "applyOnImportedCustomer": true,
  "autoApprovalDays": 123,
  "collectionData": "<string>",
  "collectionId": 123,
  "createAt": "2023-11-07T05:31:56Z",
  "customerFacingIconUrl": "<string>",
  "customerFacingLabel": "<string>",
  "disableForOnSellProduct": true,
  "disablePointsForDiscountedProduct": true,
  "earnLimit": 123,
  "eligibleForFirstOrder": true,
  "enableBirthdayPromo": true,
  "enableInterval": true,
  "excludeCollections": "<string>",
  "excludeOrderTags": "<string>",
  "excludeProducts": "<string>",
  "excludeVariantIds": "<string>",
  "givePointsToGuestCustomers": true,
  "id": 123,
  "manuallyApprovePoints": true,
  "maximumPoints": 123,
  "minimumOrderValue": 123,
  "pointsProvided": 123,
  "productData": "<string>",
  "productId": 123,
  "promoPointsMultiplier": 123,
  "refundNotificationLabel": "<string>",
  "restrictCustomerTags": "<string>",
  "restrictProductTags": "<string>",
  "rollBackPointsOnUnsubscribe": true,
  "ruleEndDate": "2023-11-07T05:31:56Z",
  "ruleStartDate": "2023-11-07T05:31:56Z",
  "serial": 123,
  "shop": "<string>",
  "socialUrl": "<string>",
  "translations": "<string>",
  "triggeredCount": 123,
  "updateAt": "2023-11-07T05:31:56Z",
  "variantId": 123,
  "vipTierId": 123
}

Headers

X-API-Key
string
required

API key for authentication

Query Parameters

includeInactive
boolean
default:false

Include inactive rules in response (default: false)

Response

Successfully retrieved point earning rules

basePoints
number<double>
required
customerNotification
string
required
includeShippingPoints
boolean
required
includeSubtotal
boolean
required
includeTax
boolean
required
name
string
required
status
enum<string>
required
Available options:
ACTIVE,
INACTIVE
type
enum<string>
required
Available options:
PURCHASE,
VISIT_SHOP,
REFERRAL,
CREATE_ACCOUNT,
FACEBOOK_PAGE_LIKE,
FOLLOW_TWITTER,
FOLLOW_INSTAGRAM,
BIRTHDAY,
LEAVE_REVIEW,
SUBSCRIBE_NEWSLETTER,
BUY_PRODUCT,
BUY_PRODUCT_FROM_COLLECTION,
LEAVE_REVIEW_STAMPED_IO,
LEAVE_REVIEW_LOOX_IO,
LEAVE_REVIEW_JUDGE_ME,
LEAVE_REVIEW_PRODUCT_REVIEWS,
SUBSCRIPTION,
YOUTUBE,
TIKTOK,
OKENDO,
HELPFULL_PRODUCT_REVIEWS,
RIVYO_PRODUCT_REVIEWS,
REVIEWS_IO,
QUANTITY_BASED_POINTS,
SUBSCRIBE_SMS,
VISIT_PINTEREST,
AIR_REVIEWS,
STATIC_EARN_RULE,
SHARE_ON_FACEBOOK,
SHARE_ON_X,
FIXED_REWARD
activityType
enum<string>
Available options:
REGULAR,
REFERRAL,
VIP
addAdditionalPoints
boolean
additionalPoints
number<double>
allowedCustomerTags
string
allowedOrderTags
string
allowedProductTags
string
appliesOn
enum<string>
Available options:
ONE_TIME,
SUBSCRIPTION,
BOTH
applyOnImportedCustomer
boolean
autoApprovalDays
integer<int32>
collectionData
string
collectionId
integer<int64>
createAt
string<date-time>
customerFacingIconUrl
string
customerFacingLabel
string
disableForOnSellProduct
boolean
disablePointsForDiscountedProduct
boolean
earnLimit
integer<int32>
earnType
enum<string>
Available options:
STORE_CREDIT,
DISCOUNT_CODE,
POINTS
eligibleForFirstOrder
boolean
enableBirthdayPromo
boolean
enableInterval
boolean
excludeCollections
string
excludeOrderTags
string
excludeProducts
string
excludeVariantIds
string
givePointsToGuestCustomers
boolean
historicPurchaseDuration
enum<string>
Available options:
NONE,
ALL,
ONE_HOUR,
ONE_DAY,
ONE_MONTH,
THREE_MONTH,
ONE_YEAR
id
integer<int64>
manuallyApprovePoints
boolean
maximumPoints
integer<int32>
minimumOrderValue
number<double>
platformType
enum<string>
Available options:
POS_ONLY,
ONLINE_STORE,
BOTH
pointBasedOn
enum<string>
Available options:
QUANTITY,
AMOUNT_SPEND,
FLAT_PURCHASE
pointsProvided
number<double>
productData
string
productId
integer<int64>
promoPointsMultiplier
number<double>
refundNotificationLabel
string
restrictCustomerTags
string
restrictProductTags
string
rewardAssignType
enum<string>
Available options:
DYNAMIC,
FIXED
rewardInterval
enum<string>
Available options:
DAY,
WEEK,
MONTH,
YEAR,
LIFETIME
rollBackPointsOnUnsubscribe
boolean
ruleEndDate
string<date-time>
ruleStartDate
string<date-time>
serial
integer<int32>
shop
string
socialUrl
string
translations
string
triggeredCount
integer<int64>
updateAt
string<date-time>
variantId
integer<int64>
vipTierId
integer<int64>