Points & Earn Rules
Get all point earning rules
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>",
"status": "ACTIVE",
"type": "PURCHASE",
"activityType": "REGULAR",
"addAdditionalPhotoPoints": true,
"addAdditionalPoints": true,
"addAdditionalVideoPoints": true,
"additionalPhotoPoints": 123,
"additionalPoints": 123,
"additionalVideoPoints": 123,
"allowedCustomerTags": "<string>",
"allowedOrderTags": "<string>",
"allowedProductTags": "<string>",
"appliesOn": "ONE_TIME",
"applyOnImportedCustomer": true,
"autoApprovalDays": 123,
"collectBirthYear": true,
"collectionData": "<string>",
"collectionId": 123,
"createAt": "2023-11-07T05:31:56Z",
"customerFacingIconUrl": "<string>",
"customerFacingLabel": "<string>",
"disableForOnSellProduct": true,
"disablePointsForDiscountedProduct": true,
"earnLimit": 123,
"earnType": "STORE_CREDIT",
"eligibleForFirstOrder": true,
"enableBirthdayPromo": true,
"enableInterval": true,
"excludeCollections": "<string>",
"excludeOrderTags": "<string>",
"excludeProducts": "<string>",
"excludeVariantIds": "<string>",
"givePointsToGuestCustomers": true,
"historicPurchaseDuration": "NONE",
"id": 123,
"manuallyApprovePoints": true,
"maximumPoints": 123,
"minimumOrderValue": 123,
"platformType": "POS_ONLY",
"pointBasedOn": "QUANTITY",
"pointsProvided": 123,
"productData": "<string>",
"productId": 123,
"promoPointsMultiplier": 123,
"refundNotificationLabel": "<string>",
"restrictCustomerTags": "<string>",
"restrictProductTags": "<string>",
"rewardAssignType": "DYNAMIC",
"rewardInterval": "DAY",
"rollBackPointsOnUnsubscribe": true,
"ruleEndDate": "2023-11-07T05:31:56Z",
"ruleStartDate": "2023-11-07T05:31:56Z",
"serial": 123,
"shop": "<string>",
"showReviewProductDetails": true,
"socialUrl": "<string>",
"translations": "<string>",
"triggeredCount": 123,
"updateAt": "2023-11-07T05:31:56Z",
"variantId": 123,
"vipTierId": 123
}Headers
API key for authentication
Query Parameters
Include inactive rules in response (default: false)
Response
Successfully retrieved point earning rules
Available options:
ACTIVE, INACTIVE 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 Available options:
REGULAR, REFERRAL, VIP Available options:
ONE_TIME, SUBSCRIPTION, BOTH Available options:
STORE_CREDIT, DISCOUNT_CODE, POINTS Available options:
NONE, ALL, ONE_HOUR, ONE_DAY, ONE_MONTH, THREE_MONTH, ONE_YEAR Available options:
POS_ONLY, ONLINE_STORE, BOTH Available options:
QUANTITY, AMOUNT_SPEND, FLAT_PURCHASE Available options:
DYNAMIC, FIXED Available options:
DAY, WEEK, MONTH, YEAR, LIFETIME ⌘I
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>",
"status": "ACTIVE",
"type": "PURCHASE",
"activityType": "REGULAR",
"addAdditionalPhotoPoints": true,
"addAdditionalPoints": true,
"addAdditionalVideoPoints": true,
"additionalPhotoPoints": 123,
"additionalPoints": 123,
"additionalVideoPoints": 123,
"allowedCustomerTags": "<string>",
"allowedOrderTags": "<string>",
"allowedProductTags": "<string>",
"appliesOn": "ONE_TIME",
"applyOnImportedCustomer": true,
"autoApprovalDays": 123,
"collectBirthYear": true,
"collectionData": "<string>",
"collectionId": 123,
"createAt": "2023-11-07T05:31:56Z",
"customerFacingIconUrl": "<string>",
"customerFacingLabel": "<string>",
"disableForOnSellProduct": true,
"disablePointsForDiscountedProduct": true,
"earnLimit": 123,
"earnType": "STORE_CREDIT",
"eligibleForFirstOrder": true,
"enableBirthdayPromo": true,
"enableInterval": true,
"excludeCollections": "<string>",
"excludeOrderTags": "<string>",
"excludeProducts": "<string>",
"excludeVariantIds": "<string>",
"givePointsToGuestCustomers": true,
"historicPurchaseDuration": "NONE",
"id": 123,
"manuallyApprovePoints": true,
"maximumPoints": 123,
"minimumOrderValue": 123,
"platformType": "POS_ONLY",
"pointBasedOn": "QUANTITY",
"pointsProvided": 123,
"productData": "<string>",
"productId": 123,
"promoPointsMultiplier": 123,
"refundNotificationLabel": "<string>",
"restrictCustomerTags": "<string>",
"restrictProductTags": "<string>",
"rewardAssignType": "DYNAMIC",
"rewardInterval": "DAY",
"rollBackPointsOnUnsubscribe": true,
"ruleEndDate": "2023-11-07T05:31:56Z",
"ruleStartDate": "2023-11-07T05:31:56Z",
"serial": 123,
"shop": "<string>",
"showReviewProductDetails": true,
"socialUrl": "<string>",
"translations": "<string>",
"triggeredCount": 123,
"updateAt": "2023-11-07T05:31:56Z",
"variantId": 123,
"vipTierId": 123
}