Articles on: Public API

Earning Rules

List Ways to Earn

Retrieve the list of "ways to earn" (earning rule configurations) for the shop.

GET /rest-api/v1/earningRules

Query parameters

Name

Type

Description

page

int

Page number (required)

pageSize

int

Number of results per page (required, max 250)

Example request

curl --request GET \
--url 'https://api.bloy.io/rest-api/v1/earningRules?page=1&pageSize=20' \
--header 'Authorization: Bearer YourApiKeyGoesHere'


Example response

{
"success": true,
"message": "OK",
"data": [
{
"id": "664f1a2b3c4d5e6f7a8b9c40",
"name": "Sign up",
"type": "sign_up",
"status": true,
"earnPoint": 100
},
{
"id": "664f1a2b3c4d5e6f7a8b9c41",
"name": "Place an order",
"type": "place_order",
"status": true,
"earnPoint": 1,
"spent": 5,
"pointsWithRewardType": "fixed",
"pointsWithdrawalType": "cancelled",
"applyProductOption": "all",
"applyProducts": [],
"applyCollections": [],
"applyVariants": [],
"excludeProductOption": "none",
"excludeVariants": [],
"excludeCollections": []
}
]
}

The fields returned vary depending on the earning rule's type (e.g. sign_upbirthdayplace_orderreviewrefer_frienddaily_visitcustom, and social actions like like_facebookfollow_instagram, etc.).

Check a customer's earning eligibility

Retrieve the list of "ways to earn" along with an isEarned status for a specific customer — meaningful for earning rules that can only be completed once (e.g. sign up, birthday, social follow actions, custom actions...).

GET /rest-api/v1/earningRules/eligibility

Query parameters

Name

Type

Description

customerIdentifier

string

Shopify customer ID or email (required)

page

int

Page number (required)

pageSize

int

Number of results per page (required, max 250)


Example request

curl --request GET \
--url 'https://api.bloy.io/rest-api/v1/earningRules/eligibility?customerIdentifier=customer@example.com&page=1&pageSize=20' \
--header 'Authorization: Bearer YourApiKeyGoesHere'


Example response

{
"success": true,
"message": "OK",
"data": [
{
"id": "664f1a2b3c4d5e6f7a8b9c40",
"name": "Sign up",
"type": "sign_up",
"status": true,
"earnPoint": 100,
"isEarned": true
},
{
"id": "664f1a2b3c4d5e6f7a8b9c41",
"name": "Place an order",
"type": "place_order",
"status": true,
"earnPoint": 1,
"spent": 5,
"pointsWithRewardType": "fixed",
"pointsWithdrawalType": "cancelled",
"applyProductOption": "all",
"applyProducts": [],
"applyCollections": [],
"applyVariants": [],
"excludeProductOption": "none",
"excludeVariants": [],
"excludeCollections": [],
"isEarned": false
}
]
}

**Note: **isEarned is only meaningful for "one-time" earning rules (sign_upbirthday, social actions, subscribecustom, etc.). For repeatable earning rules (e.g. place_order), isEarned always returns false.

Updated on: 11/06/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!