Froonze Public API
GraphQL API for the loyalty and wishlist data that powers the Froonze storefront widgets.
Endpoint: a single GraphQL endpoint, POST https://api.froonze.com/api/v1/graphql, with Content-Type: application/json and a body of { "query": "…", "variables": { … } }.
See Authentication for the two supported credentials. Customer-scoped data (shop { customer { … } }) requires the store to have the public API enabled and, for the API-key flow, an X-Customer-Id header.
Wishlists are read from a Shopify customer metafield rather than through this API — see Reading the wishlist.
API Endpoints
# Endpoint:
https://api.froonze.com/api/v1/graphql
Authentication
Every request must identify the shop and carry exactly one credential. Requests that send more than one credential header are rejected with 401.
There are two ways to authenticate, depending on who is calling.
1. API key — server-to-server
For your own backend / integrations acting on behalf of a store.
| Header | Required | Value |
|---|---|---|
X-Shop-Domain |
yes | The store's *.myshopify.com domain |
X-Api-Key |
yes | A key created in the Froonze admin (Shop settings → API keys), format frcp_… |
X-Customer-Id |
optional | A Shopify customer id to act on behalf of a specific customer |
API keys are shop-scoped and bound to the X-Shop-Domain they were issued for. They are shown once at creation — store them securely and revoke them at any time. The store owner must first enable the public API and create a key. Customer-scoped fields return null unless the API is enabled. Include X-Customer-Id to read a specific customer's data; omit it for shop-only queries.
curl https://api.froonze.com/api/v1/graphql \
-H 'Content-Type: application/json' \
-H 'X-Shop-Domain: your-store.myshopify.com' \
-H 'X-Api-Key: frcp_xxx' \
-H 'X-Customer-Id: 1234567890' \
-d '{"query":"{ shop { customer { loyaltyData { points } } } }"}'
2. Customer account token — customer JWT
For customer-facing surfaces (Shopify Customer Account UI extensions, mobile apps) where the signed-in customer calls on their own behalf.
| Header | Required | Value |
|---|---|---|
X-Shop-Domain |
yes | The store's *.myshopify.com domain |
X-Customer-Account-Token |
yes | A Shopify Customer Account API id_token |
The id_token comes from Shopify's Customer Account API OAuth flow — see Authenticate customers with the Customer Account API and the Customer Account API reference. Send the id_token, not the access_token — the latter may be opaque and cannot be verified.
The token's signature is verified against the shop's JWKS and is bound to the store via the token's iss claim; the customer in context is the token's sub. Do not send X-Customer-Id with this flow — the identity comes from the token, and requests that include it are rejected.
curl https://api.froonze.com/api/v1/graphql \
-H 'Content-Type: application/json' \
-H 'X-Shop-Domain: your-store.myshopify.com' \
-H 'X-Customer-Account-Token: eyJhbGciOi…' \
-d '{"query":"{ shop { customer { loyaltyData { points } } } }"}'
Errors
| Status | Meaning |
|---|---|
401 Unauthorized |
Missing/invalid credential, more than one credential header, unknown shop, or (JWT flow) X-Customer-Id was sent |
403 Forbidden |
The store has not enabled the public API, or this IP is temporarily blocked after repeated failed authentications |
429 Too Many Requests |
Rate limit exceeded — retry after the seconds given in Retry-After |
Reading the wishlist
The API deliberately does not expose a customer's wishlist as a query field. A storefront reads the wishlist on every page load, which would spend the whole per-token rate-limit budget on data Shopify already serves you for free.
Read it from the customer metafield instead, with the Storefront API or the Customer Account API on the frontend:
customer.metafields.froonze_cp.wishlist
| Namespace | froonze_cp |
| Key | wishlist |
| Type | json |
| Access | Storefront PUBLIC_READ, customer account READ_WRITE |
Froonze keeps this metafield up to date: every change to a wishlist — through the mutations in this API or anywhere else — republishes the payload. So read the metafield for display, and use the wishlist mutations here to change it. There is no rate limit on reading a metafield, and no round trip through Froonze.
Plan access
The public API is enabled per store, and each plugin unlocks only its own part of the schema — a store reaches the loyalty fields on the top Loyalty plan and the wishlist fields on the top Wishlist plan. Qualifying through one plugin does not expose the other.
Fields you are not entitled to resolve as null (or an empty page, for referrals and loyaltyEvents) rather than erroring, and shop itself is null when the store's plan includes no API access at all. Mutations return an error message instead.
Rate limits
Limits are per credential, not per IP, so one integration cannot exhaust another's budget.
Each credential gets a leaky bucket: a burst allowance that refills continuously at a steady rate, rather than a counter that resets on the clock.
| Flow | Burst | Sustained rate |
|---|---|---|
API key (X-Api-Key) |
50 requests | 2/second |
Customer token (X-Customer-Account-Token) |
10 requests | 1/second |
You may spend the whole burst at once — after that, capacity comes back gradually, so a steady pace at or below the sustained rate never hits the limit. Idle time does not bank extra credit: the bucket never fills past its burst size.
Exceeding a limit returns 429 with a Retry-After header giving the whole seconds until enough capacity has drained for one more request. Back off for that long; retrying sooner just costs you another rejection.
Repeated failed authentications are handled separately: 10 failures from one IP within 10 minutes blocks that IP for 15 minutes with a 403. Cache your credentials rather than re-authenticating per request, and stop retrying a rejected credential.
Query limits
Every document is checked before it executes:
| Limit | Value |
|---|---|
| Maximum query depth | 10 |
| Maximum query complexity | 500 |
| Maximum query length | 5000 tokens |
| Validation timeout | 2 seconds |
Most fields cost 1 point of complexity. Fields that do real work per resolution cost 10: loyaltyDigitalCardUrls, and referrals / loyaltyEvents when asked for a page other than the first (page 1 is served from cache). Requesting the same expensive field many times over under different aliases is what these budgets exist to stop.
Paginated fields accept page 1 to 10 (10 items per page). Anything outside that range is an error rather than an empty page.
Query-limit breaches return 200 with the GraphQL errors array populated, as validation errors rather than HTTP errors.
Queries
shop
Description
The shop in context; entry point for all data. Null when the plan includes no API access.
Response
Returns a Shop
Example
Query
query shop {
shop {
customer {
...CustomerFragment
}
loyaltySettings {
...LoyaltySettingsFragment
}
}
}
Response
{
"data": {
"shop": {
"customer": Customer,
"loyaltySettings": LoyaltySettings
}
}
}
Mutations
activateWishlistList
Description
Set the customer's active wishlist list (creating it if needed). Requires an authenticated customer.
Response
Returns an ActivateWishlistListPayload
Example
Query
mutation activateWishlistList {
activateWishlistList {
clientMutationId
error
list
}
}
Response
{
"data": {
"activateWishlistList": {
"clientMutationId": "xyz789",
"error": "abc123",
"list": "abc123"
}
}
}
addToCartWishlist
Description
Move a wishlisted product into the customer's cart. Requires an authenticated customer.
Response
Returns an AddToCartWishlistPayload
Example
Query
mutation addToCartWishlist {
addToCartWishlist {
clientMutationId
error
}
}
Response
{
"data": {
"addToCartWishlist": {
"clientMutationId": "xyz789",
"error": "xyz789"
}
}
}
createWishlistList
Description
Create a new wishlist list and make it active. Requires an authenticated customer.
Response
Returns a CreateWishlistListPayload
Example
Query
mutation createWishlistList {
createWishlistList {
clientMutationId
error
list
}
}
Response
{
"data": {
"createWishlistList": {
"clientMutationId": "abc123",
"error": "xyz789",
"list": "abc123"
}
}
}
deleteWishlistList
Description
Delete a wishlist list and deactivate its items. The active list cannot be deleted. Requires an authenticated customer.
Response
Returns a DeleteWishlistListPayload
Example
Query
mutation deleteWishlistList {
deleteWishlistList {
clientMutationId
error
list
}
}
Response
{
"data": {
"deleteWishlistList": {
"clientMutationId": "abc123",
"error": "xyz789",
"list": "xyz789"
}
}
}
earnPointsForFacebookVisit
Description
Award points for visiting the shop's Facebook page. Requires an authenticated customer, and awards points only while the matching earning rule is active.
Response
Returns an EarnPointsForFacebookVisitPayload
Example
Query
mutation earnPointsForFacebookVisit {
earnPointsForFacebookVisit {
clientMutationId
error
event {
...EventFragment
}
}
}
Response
{
"data": {
"earnPointsForFacebookVisit": {
"clientMutationId": "abc123",
"error": "abc123",
"event": Event
}
}
}
earnPointsForInstagramFollow
Description
Award points for following the shop on Instagram. Requires an authenticated customer, and awards points only while the matching earning rule is active.
Response
Returns an EarnPointsForInstagramFollowPayload
Example
Query
mutation earnPointsForInstagramFollow {
earnPointsForInstagramFollow {
clientMutationId
error
event {
...EventFragment
}
}
}
Response
{
"data": {
"earnPointsForInstagramFollow": {
"clientMutationId": "abc123",
"error": "abc123",
"event": Event
}
}
}
earnPointsForXVisit
Description
Award points for visiting the shop's X (formerly Twitter) profile. Requires an authenticated customer, and awards points only while the matching earning rule is active.
Response
Returns an EarnPointsForXVisitPayload
Example
Query
mutation earnPointsForXVisit {
earnPointsForXVisit {
clientMutationId
error
event {
...EventFragment
}
}
}
Response
{
"data": {
"earnPointsForXVisit": {
"clientMutationId": "xyz789",
"error": "xyz789",
"event": Event
}
}
}
editWishlistList
Description
Rename a wishlist list, moving its items to the new name and making it active. Requires an authenticated customer.
Response
Returns an EditWishlistListPayload
Example
Query
mutation editWishlistList {
editWishlistList {
clientMutationId
error
newList
oldList
}
}
Response
{
"data": {
"editWishlistList": {
"clientMutationId": "xyz789",
"error": "abc123",
"newList": "abc123",
"oldList": "xyz789"
}
}
}
registerReferral
Description
Register a referred friend against a referrer's referral code, issuing the friend's welcome reward (a discount code or store credit).
Response
Returns a RegisterReferralPayload
Example
Query
mutation registerReferral {
registerReferral {
clientMutationId
discountCode
error
shopifyStoreCreditTransaction {
...ShopifyStoreCreditTransactionFragment
}
}
}
Response
{
"data": {
"registerReferral": {
"clientMutationId": "abc123",
"discountCode": "xyz789",
"error": "abc123",
"shopifyStoreCreditTransaction": ShopifyStoreCreditTransaction
}
}
}
spendLoyaltyPoints
Description
Redeem a customer's points against a spending rule, returning the generated reward (a discount coupon or store credit) and their updated balance. Requires an authenticated customer.
Response
Returns a SpendLoyaltyPointsPayload
Example
Query
mutation spendLoyaltyPoints {
spendLoyaltyPoints {
clientMutationId
customerPoints
discount {
...DiscountFragment
}
error
event {
...EventFragment
}
}
}
Response
{
"data": {
"spendLoyaltyPoints": {
"clientMutationId": "abc123",
"customerPoints": {},
"discount": Discount,
"error": "abc123",
"event": Event
}
}
}
syncGuestWishlist
Description
Merge a guest wishlist into the authenticated customer's wishlist (typically on login). Processed asynchronously.
Response
Returns a SyncGuestWishlistPayload
Example
Query
mutation syncGuestWishlist {
syncGuestWishlist {
clientMutationId
error
}
}
Response
{
"data": {
"syncGuestWishlist": {
"clientMutationId": "xyz789",
"error": "xyz789"
}
}
}
updateWishlist
Description
Add or remove a product (or variant) on a wishlist list. Works for logged-in customers and, via guestId, for guest wishlists.
Response
Returns an UpdateWishlistPayload
Example
Query
mutation updateWishlist {
updateWishlist {
clientMutationId
error
guestId
inWishlist
list
productId
productPrice
productTitle
variantExternalIds
}
}
Response
{
"data": {
"updateWishlist": {
"clientMutationId": "xyz789",
"error": "abc123",
"guestId": "xyz789",
"inWishlist": true,
"list": "xyz789",
"productId": "abc123",
"productPrice": "abc123",
"productTitle": "xyz789",
"variantExternalIds": [4]
}
}
}
Types
ActivateWishlistListPayload
Description
Autogenerated return type of ActivateWishlistList.
Example
{
"clientMutationId": "abc123",
"error": "xyz789",
"list": "xyz789"
}
AddToCartWishlistPayload
Description
Autogenerated return type of AddToCartWishlist.
Example
{
"clientMutationId": "abc123",
"error": "xyz789"
}
BigInt
Description
Represents non-fractional signed whole numeric values. Since the value may exceed the size of a 32-bit integer, it's encoded as a string.
Example
{}
Boolean
Description
The Boolean scalar type represents true or false.
CreateWishlistListPayload
Description
Autogenerated return type of CreateWishlistList.
Example
{
"clientMutationId": "abc123",
"error": "abc123",
"list": "xyz789"
}
Customer
Fields
| Field Name | Description |
|---|---|
loyaltyData - LoyaltyData
|
The customer's loyalty data. Null when the plan does not include loyalty API access. Should be loaded once per widget rather than per page — the payload is cached and refreshed in the background. After a mutation, update your local copy from the mutation response instead of refetching this field. |
loyaltyDigitalCardUrls - DigitalCardUrls
|
Wallet pass download links (Apple/Google) for the loyalty card. Generated on demand; null when digital cards are not enabled or the plan does not include loyalty API access. |
loyaltyEvents - EventList!
|
The loyalty history, newest first, paginated 10 per page. Page 1 matches loyaltyData.events; later pages are fetched live. |
Arguments
|
|
name - String!
|
The customer's full name (first and last name joined). |
referralToken - String
|
The customer referral token. Null when the plan does not include loyalty API access. |
referrals - ReferralsList!
|
The customer referrals, paginated 10 per page. Page 1 matches loyaltyData.referrals; later pages are fetched live. |
Arguments
|
|
Example
{
"loyaltyData": LoyaltyData,
"loyaltyDigitalCardUrls": DigitalCardUrls,
"loyaltyEvents": EventList,
"name": "xyz789",
"referralToken": "abc123",
"referrals": ReferralsList
}
DeleteWishlistListPayload
Description
Autogenerated return type of DeleteWishlistList.
Example
{
"clientMutationId": "xyz789",
"error": "abc123",
"list": "xyz789"
}
DigitalCardUrls
Example
{
"apple": "abc123",
"error": "abc123",
"google": "xyz789"
}
Discount
Fields
| Field Name | Description |
|---|---|
code - String
|
The discount code the customer applies at checkout. |
collectionIds - [ID!]
|
Collections the discount is restricted to, if any. |
discountCombinesWithFreeShipping - Boolean
|
Whether this discount can combine with free-shipping discounts. |
discountCombinesWithOrderDiscounts - Boolean
|
Whether this discount can combine with order discounts. |
discountCombinesWithProductDiscounts - Boolean
|
Whether this discount can combine with product discounts. |
endsAt - ISO8601Date
|
Expiry date of the coupon, if any. |
freeShippingCombinesWithProductAndOrderDiscounts - Boolean
|
For free-shipping discounts, whether it can combine with product and order discounts. |
freeShippingMaxPrice - Int
|
Maximum shipping price covered, for free-shipping discounts. |
iconUrl - String
|
Optional custom icon URL for displaying the coupon. |
isUsed - Boolean
|
Whether the coupon has already been redeemed. |
minOrderSubtotal - Int
|
Minimum order subtotal required to use the coupon, if any. |
order - Order
|
The order the coupon was used on, if used. |
productIds - [ID!]
|
Products the discount is restricted to, if any. |
type - String
|
Discount type: fixed_amount, percentage, or free_shipping. |
value - BigInt
|
A currency amount for fixed_amount, or a percentage for percentage. |
Example
{
"code": "xyz789",
"collectionIds": ["4"],
"discountCombinesWithFreeShipping": false,
"discountCombinesWithOrderDiscounts": true,
"discountCombinesWithProductDiscounts": true,
"endsAt": ISO8601Date,
"freeShippingCombinesWithProductAndOrderDiscounts": true,
"freeShippingMaxPrice": 987,
"iconUrl": "xyz789",
"isUsed": true,
"minOrderSubtotal": 987,
"order": Order,
"productIds": [4],
"type": "xyz789",
"value": {}
}
EarnPointsForFacebookVisitPayload
Description
Autogenerated return type of EarnPointsForFacebookVisit.
Example
{
"clientMutationId": "xyz789",
"error": "xyz789",
"event": Event
}
EarnPointsForInstagramFollowPayload
Description
Autogenerated return type of EarnPointsForInstagramFollow.
Example
{
"clientMutationId": "abc123",
"error": "xyz789",
"event": Event
}
EarnPointsForXVisitPayload
Description
Autogenerated return type of EarnPointsForXVisit.
Example
{
"clientMutationId": "abc123",
"error": "abc123",
"event": Event
}
EditWishlistListPayload
Description
Autogenerated return type of EditWishlistList.
Example
{
"clientMutationId": "abc123",
"error": "abc123",
"newList": "xyz789",
"oldList": "xyz789"
}
Event
Fields
| Field Name | Description |
|---|---|
createdAt - ISO8601Date
|
When the event occurred. |
customerNote - String
|
Optional note attached to the event (e.g. an admin adjustment reason). |
discount - Discount
|
The discount granted by this event, when it produced a coupon. |
eventType - String
|
The kind of event (e.g. earning_order, spend_points, points_expiration). |
friendEmail - String
|
Email of the referred friend, for referrer events. |
id - ID
|
Unique identifier of the loyalty event. |
order - Order
|
The order that triggered the event, for order-related events. |
points - TwoDecimalPlaceBigDecimal
|
Points delta: positive when earned, negative when spent or expired. |
pointsExpiredAfterDays - Int
|
For expiration events, the inactivity window (in days) after which points expired. |
referralStatus - String
|
Status of the associated referral (pending, complete, cancelled). |
rewardType - String
|
What the event rewarded: points or store_credit. |
shopifyStoreCreditTransaction - ShopifyStoreCreditTransaction
|
The store-credit movement, for store-credit rewards. |
spendingRule - SpendingRule
|
The redeemed spending rule, for redemption events. |
vipTierSetting - VipTierSetting
|
The VIP tier tied to the event, for VIP earning/reward events. |
Example
{
"createdAt": ISO8601Date,
"customerNote": "abc123",
"discount": Discount,
"eventType": "xyz789",
"friendEmail": "abc123",
"id": 4,
"order": Order,
"points": TwoDecimalPlaceBigDecimal,
"pointsExpiredAfterDays": 987,
"referralStatus": "xyz789",
"rewardType": "xyz789",
"shopifyStoreCreditTransaction": ShopifyStoreCreditTransaction,
"spendingRule": SpendingRule,
"vipTierSetting": VipTierSetting
}
EventList
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"4"
ISO8601Date
Description
An ISO 8601-encoded date
Example
ISO8601Date
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
JSON
Description
Represents untyped JSON
Example
{}
LoyaltyData
Fields
| Field Name | Description |
|---|---|
allEventTypes - [String!]
|
Distinct event types the customer has, useful for hiding completed one-off actions. |
discounts - [Discount!]
|
The customer's reward coupons (recently used/expired ones stay for a short window). |
events - [Event!]
|
The most recent loyalty events (up to 10). Use loyaltyEvents(page:) to paginate. |
excluded - Boolean
|
Whether this customer is excluded from the loyalty program (e.g. by customer tag). |
lastLoyaltyActivityDate - String
|
Date of the last earning/spending activity; drives points-expiration calculations. |
points - Float
|
The customer's current redeemable points balance. |
referralToken - String
|
The customer's referral token, used to build their referral URL (?frcp_ref=<token>). |
referrals - [Referral!]
|
The most recent referrals (up to 10). Use referrals(page:) to paginate. |
totalEvents - Int
|
Total number of loyalty events across all pages. |
totalReferrals - Int
|
Total number of referrals across all pages. |
vipRollingEndDate - String
|
When the current VIP accumulation window ends, for rolling-window VIP programs. |
vipTier - LoyaltyVipTier
|
The customer's current VIP tier snapshot, or null if not in a tier. |
vipValue - Float
|
Accumulated VIP progress value (points/orders/spend, per the VIP entry method). |
Example
{
"allEventTypes": ["xyz789"],
"discounts": [Discount],
"events": [Event],
"excluded": false,
"lastLoyaltyActivityDate": "abc123",
"points": 123.45,
"referralToken": "abc123",
"referrals": [Referral],
"totalEvents": 123,
"totalReferrals": 123,
"vipRollingEndDate": "xyz789",
"vipTier": LoyaltyVipTier,
"vipValue": 123.45
}
LoyaltyEarningRule
Fields
| Field Name | Description |
|---|---|
advancedOptions - JSON
|
Rule-specific options (e.g. social URL/content, review picture/video bonuses). |
customIconUrl - String
|
Optional custom icon URL for displaying the rule. |
earningType - String
|
The earning action (e.g. order, birthday, create_account, share_facebook). |
orderEarningType - String
|
For order rules, how points scale: fixed (flat) or increment (per unit spent). |
orderIncrementRoundingEnabled - Boolean
|
Whether increment order rewards are rounded. |
orderIncrementSpendingUnit - Float
|
For increment order rules, the spend amount that earns one value of reward. |
periodLimitEnabled - Boolean
|
Whether earning from this rule is capped within a rolling period. |
periodLimitUnit - String
|
The period the limit applies over (day, week, month, …). |
periodLimitValue - Int
|
The cap count, when a period limit is enabled. |
rewardType - String
|
What the rule grants: points or store_credit. |
storeCreditExpirationEnabled - Boolean
|
Whether store credit earned from this rule expires. |
storeCreditExpiresAfterDays - Int
|
Days until earned store credit expires, when expiration is enabled. |
value - Float
|
The reward amount (points, or store-credit amount) granted by the rule. |
vipTierSettingId - ID
|
The VIP tier this rule applies to, for VIP-specific order rules. |
Example
{
"advancedOptions": {},
"customIconUrl": "abc123",
"earningType": "xyz789",
"orderEarningType": "xyz789",
"orderIncrementRoundingEnabled": true,
"orderIncrementSpendingUnit": 123.45,
"periodLimitEnabled": true,
"periodLimitUnit": "xyz789",
"periodLimitValue": 987,
"rewardType": "abc123",
"storeCreditExpirationEnabled": true,
"storeCreditExpiresAfterDays": 123,
"value": 123.45,
"vipTierSettingId": "4"
}
LoyaltyReferralReward
Fields
| Field Name | Description |
|---|---|
discountAppliesToSubscriptions - Boolean
|
Whether a discount reward applies to subscription orders. |
discountApplyTo - String
|
Scope a discount reward applies to (entire order, specific collections/products). |
discountCollectionIds - [ID!]
|
Collections a discount reward is restricted to, if any. |
discountCombinesWithFreeShipping - Boolean
|
Whether a discount reward can combine with free-shipping discounts. |
discountCombinesWithOrderDiscounts - Boolean
|
Whether a discount reward can combine with order discounts. |
discountCombinesWithProductDiscounts - Boolean
|
Whether a discount reward can combine with product discounts. |
discountExpirationEnabled - Boolean
|
Whether a discount reward expires. |
discountExpiresAfterDays - Int
|
Days until a discount reward expires, when expiration is enabled. |
discountMinOrderRequirementEnabled - Boolean
|
Whether a minimum order subtotal is required to use a discount reward. |
discountMinOrderSubtotal - Float
|
Minimum order subtotal required, when the requirement is enabled. |
discountProductIds - [ID!]
|
Products a discount reward is restricted to, if any. |
freeShippingCombinesWithProductAndOrderDiscounts - Boolean
|
For free-shipping rewards, whether it can combine with product and order discounts. |
freeShippingMaxPrice - Float
|
Maximum shipping price covered, for free-shipping rewards. |
freeShippingMaxPriceEnabled - Boolean
|
Whether a maximum shipping price cap applies, for free-shipping rewards. |
rewardType - String
|
Reward type: points, store credit, or a discount (amount/percentage/free shipping). |
rewardValue - Float
|
Reward amount (points, currency amount, or percentage, depending on rewardType). |
Example
{
"discountAppliesToSubscriptions": true,
"discountApplyTo": "xyz789",
"discountCollectionIds": ["4"],
"discountCombinesWithFreeShipping": false,
"discountCombinesWithOrderDiscounts": false,
"discountCombinesWithProductDiscounts": true,
"discountExpirationEnabled": true,
"discountExpiresAfterDays": 123,
"discountMinOrderRequirementEnabled": true,
"discountMinOrderSubtotal": 123.45,
"discountProductIds": ["4"],
"freeShippingCombinesWithProductAndOrderDiscounts": false,
"freeShippingMaxPrice": 987.65,
"freeShippingMaxPriceEnabled": false,
"rewardType": "xyz789",
"rewardValue": 123.45
}
LoyaltyReferralSettings
Fields
| Field Name | Description |
|---|---|
friend - LoyaltyReferralReward
|
The reward the referred friend receives. |
referrer - LoyaltyReferralReward
|
The reward the existing customer (referrer) receives for a successful referral. |
Example
{
"friend": LoyaltyReferralReward,
"referrer": LoyaltyReferralReward
}
LoyaltySettings
Fields
| Field Name | Description |
|---|---|
customerAccountVersion - String
|
Which Shopify customer-account surface the program targets. |
dateFormat - String
|
Preferred date format for displaying loyalty dates. |
earningRules - [LoyaltyEarningRule!]
|
The ways customers earn points or store credit (orders, birthday, social, reviews). |
enableDigitalCard - Boolean
|
Whether digital wallet cards (Apple/Google) are offered to customers. |
loyaltyBlacklistedCustomerTags - JSON
|
Customer tags excluded from the program; a tagged customer sees no loyalty data. |
loyaltyEnableWidget - Boolean
|
Whether the loyalty widget is enabled for the storefront. |
loyaltyPointsExpiration - JSON
|
Points-expiration configuration (whether enabled and the inactivity window). |
loyaltyWidgetSettings - JSON
|
Free-form widget appearance/behaviour settings (colors, copy, placement). |
referrals - LoyaltyReferralSettings
|
Referral rewards for the referrer and friend; null when referrals are off. |
spendingRules - [LoyaltySettingsSpendingRule!]
|
The rewards customers can redeem points for. |
vip - LoyaltyVipSettings
|
VIP tier program configuration; null when VIP is not enabled. |
Example
{
"customerAccountVersion": "abc123",
"dateFormat": "abc123",
"earningRules": [LoyaltyEarningRule],
"enableDigitalCard": false,
"loyaltyBlacklistedCustomerTags": {},
"loyaltyEnableWidget": false,
"loyaltyPointsExpiration": {},
"loyaltyWidgetSettings": {},
"referrals": LoyaltyReferralSettings,
"spendingRules": [LoyaltySettingsSpendingRule],
"vip": LoyaltyVipSettings
}
LoyaltySettingsSpendingRule
Fields
| Field Name | Description |
|---|---|
customIconUrl - String
|
Optional custom icon URL for displaying the rule. |
discountAmountPointsType - String
|
How the reward scales with points: fixed or increment. |
discountAppliesToSubscriptions - Boolean
|
Whether the coupon applies to subscription orders. |
discountApplyTo - String
|
Scope the discount applies to (entire order, specific collections/products). |
discountCollectionIds - [ID!]
|
Collections the discount is restricted to, if any. |
discountCombinesWithFreeShipping - Boolean
|
Whether the coupon can combine with free-shipping discounts. |
discountCombinesWithOrderDiscounts - Boolean
|
Whether the coupon can combine with order discounts. |
discountCombinesWithProductDiscounts - Boolean
|
Whether the coupon can combine with product discounts. |
discountExpirationEnabled - Boolean
|
Whether the generated coupon expires. |
discountExpiresAfterDays - Int
|
Days until the generated coupon expires, when expiration is enabled. |
discountMinOrderRequirementEnabled - Boolean
|
Whether a minimum order subtotal is required. |
discountMinOrderSubtotal - Float
|
Minimum order subtotal required to use the coupon, when the requirement is enabled. |
discountProductIds - [ID!]
|
Products the discount is restricted to, if any. |
discountValue - Float
|
Reward value (currency amount or percentage, depending on rewardType). |
freeShippingCombinesWithProductAndOrderDiscounts - Boolean
|
For free-shipping rewards, whether the coupon can combine with product and order discounts. |
freeShippingMaxPrice - Float
|
Maximum shipping price covered, for free-shipping rewards. |
freeShippingMaxPriceEnabled - Boolean
|
Whether a maximum shipping price cap applies, for free-shipping rewards. |
id - ID
|
Identifier of the spending rule; pass to spendLoyaltyPoints. |
pointsCost - Float
|
Points required to redeem (per increment, for increment rules). |
rewardType - String
|
What redeeming grants: a discount (amount/percentage/free shipping) or store credit. |
title - String
|
The rule title (custom, or auto-generated from the reward). |
useACustomTitle - Boolean
|
Whether the merchant set a custom title instead of the auto-generated one. |
Example
{
"customIconUrl": "xyz789",
"discountAmountPointsType": "abc123",
"discountAppliesToSubscriptions": false,
"discountApplyTo": "abc123",
"discountCollectionIds": ["4"],
"discountCombinesWithFreeShipping": false,
"discountCombinesWithOrderDiscounts": true,
"discountCombinesWithProductDiscounts": true,
"discountExpirationEnabled": true,
"discountExpiresAfterDays": 123,
"discountMinOrderRequirementEnabled": true,
"discountMinOrderSubtotal": 123.45,
"discountProductIds": ["4"],
"discountValue": 987.65,
"freeShippingCombinesWithProductAndOrderDiscounts": false,
"freeShippingMaxPrice": 987.65,
"freeShippingMaxPriceEnabled": false,
"id": "4",
"pointsCost": 123.45,
"rewardType": "abc123",
"title": "abc123",
"useACustomTitle": true
}
LoyaltyVipPerk
LoyaltyVipSettings
Fields
| Field Name | Description |
|---|---|
entryMethod - String
|
How VIP progress is measured: by points earned, orders placed, or amount spent. |
id - ID
|
Identifier of the VIP program. |
progressExpiry - String
|
How progress resets: never, or on a rolling window (see vipRollingEndDate). |
tiers - [LoyaltyVipTierSettings!]
|
The configured tiers, each with its milestone, rewards and perks. |
Example
{
"entryMethod": "abc123",
"id": 4,
"progressExpiry": "xyz789",
"tiers": [LoyaltyVipTierSettings]
}
LoyaltyVipTier
Fields
| Field Name | Description |
|---|---|
adminAssignedAt - String
|
When an admin manually assigned this tier, if applicable. |
createdAt - String
|
When the customer reached this tier. |
vipSettingId - ID
|
Identifier of the VIP program the tier belongs to. |
vipTierSettingId - ID
|
Identifier of the tier configuration; match against loyaltySettings.vip.tiers[].id. |
Example
{
"adminAssignedAt": "xyz789",
"createdAt": "abc123",
"vipSettingId": 4,
"vipTierSettingId": 4
}
LoyaltyVipTierReward
Fields
| Field Name | Description |
|---|---|
discountAppliesToSubscriptions - Boolean
|
Whether a discount reward applies to subscription orders. |
discountApplyTo - String
|
Scope a discount reward applies to (entire order, specific collections/products). |
discountCollectionIds - [ID!]
|
Collections a discount reward is restricted to, if any. |
discountCombinesWithFreeShipping - Boolean
|
Whether a discount reward can combine with free-shipping discounts. |
discountCombinesWithOrderDiscounts - Boolean
|
Whether a discount reward can combine with order discounts. |
discountCombinesWithProductDiscounts - Boolean
|
Whether a discount reward can combine with product discounts. |
discountExpirationEnabled - Boolean
|
Whether a discount reward expires. |
discountExpiresAfterDays - Int
|
Days until a discount reward expires, when expiration is enabled. |
discountMinOrderRequirementEnabled - Boolean
|
Whether a minimum order subtotal is required to use a discount reward. |
discountMinOrderSubtotal - Float
|
Minimum order subtotal required, when the requirement is enabled. |
discountProductIds - [ID!]
|
Products a discount reward is restricted to, if any. |
freeShippingMaxPrice - Float
|
Maximum shipping price covered, for free-shipping rewards. |
freeShippingMaxPriceEnabled - Boolean
|
Whether a maximum shipping price cap applies, for free-shipping rewards. |
id - ID
|
Identifier of the tier reward. |
rewardType - String
|
Reward type: points, store credit, or a discount (amount/percentage/free shipping). |
rewardValue - Float
|
Reward amount (points, currency amount, or percentage, depending on rewardType). |
Example
{
"discountAppliesToSubscriptions": true,
"discountApplyTo": "abc123",
"discountCollectionIds": [4],
"discountCombinesWithFreeShipping": false,
"discountCombinesWithOrderDiscounts": true,
"discountCombinesWithProductDiscounts": true,
"discountExpirationEnabled": false,
"discountExpiresAfterDays": 987,
"discountMinOrderRequirementEnabled": true,
"discountMinOrderSubtotal": 987.65,
"discountProductIds": [4],
"freeShippingMaxPrice": 123.45,
"freeShippingMaxPriceEnabled": true,
"id": 4,
"rewardType": "abc123",
"rewardValue": 987.65
}
LoyaltyVipTierSettings
Fields
| Field Name | Description |
|---|---|
customIconUrl - String
|
Custom icon URL, when useCustomIcon is set. |
defaultIconColor - String
|
Color for the default icon, when no custom icon is used. |
id - ID
|
Identifier of the tier; match against loyaltyData.vipTier.vipTierSettingId. |
milestone - Float
|
Progress value required to reach this tier (in the units of the VIP entry method). |
name - String
|
Display name of the tier (e.g. "Gold"). |
perks - [LoyaltyVipPerk!]
|
Non-reward perks listed for this tier. |
rewards - [LoyaltyVipTierReward!]
|
Rewards granted on reaching this tier. |
useCustomIcon - Boolean
|
Whether the tier uses a custom icon. |
Example
{
"customIconUrl": "abc123",
"defaultIconColor": "abc123",
"id": "4",
"milestone": 123.45,
"name": "abc123",
"perks": [LoyaltyVipPerk],
"rewards": [LoyaltyVipTierReward],
"useCustomIcon": true
}
Order
Referral
Fields
| Field Name | Description |
|---|---|
createdAt - ISO8601Date
|
When the referral was created. |
discount - Discount
|
The coupon the referrer received, for discount-type rewards. |
email - String
|
Email of the referred friend. |
points - Int
|
Points the referrer earned, when the reward is points and the referral completed. |
rewardType - String
|
Referrer reward type: points, store_credit, or a discount type. |
status - String
|
Referral status: pending, complete, or cancelled. |
storeCredit - Float
|
Store credit the referrer earned, when the reward is store credit. |
Example
{
"createdAt": ISO8601Date,
"discount": Discount,
"email": "abc123",
"points": 987,
"rewardType": "xyz789",
"status": "xyz789",
"storeCredit": 123.45
}
ReferralsList
Fields
| Field Name | Description |
|---|---|
referrals - [Referral!]!
|
The referrals on the requested page (up to 10), newest first. |
totalCount - Int!
|
Total number of referrals across all pages, for building pagination. |
Example
{"referrals": [Referral], "totalCount": 123}
RegisterReferralPayload
Description
Autogenerated return type of RegisterReferral.
Fields
| Field Name | Description |
|---|---|
clientMutationId - String
|
A unique identifier for the client performing the mutation. |
discountCode - String
|
The discount code issued to the friend, for discount rewards. |
error - String
|
Error message when the referral could not be registered; null on success. |
shopifyStoreCreditTransaction - ShopifyStoreCreditTransaction
|
The store-credit granted to the friend, for store-credit rewards. |
Example
{
"clientMutationId": "xyz789",
"discountCode": "xyz789",
"error": "abc123",
"shopifyStoreCreditTransaction": ShopifyStoreCreditTransaction
}
Shop
Fields
| Field Name | Description |
|---|---|
customer - Customer
|
The customer in context (resolved from the x-customer-id header or the session). |
loyaltySettings - LoyaltySettings
|
The shop's loyalty program settings. Null when the plan does not include loyalty API access. Should be loaded once per widget rather than per page — the payload is cached and refreshed in the background. |
Example
{
"customer": Customer,
"loyaltySettings": LoyaltySettings
}
ShopifyStoreCreditTransaction
Fields
| Field Name | Description |
|---|---|
amount - String
|
Amount moved: positive when credited, negative when debited. |
balance - String
|
Resulting store-credit balance after the transaction. |
currency - String
|
Currency code of the amount and balance. |
error - String
|
Error message if the store-credit operation failed. |
Example
{
"amount": "abc123",
"balance": "xyz789",
"currency": "abc123",
"error": "xyz789"
}
SpendLoyaltyPointsPayload
Description
Autogenerated return type of SpendLoyaltyPoints.
Fields
| Field Name | Description |
|---|---|
clientMutationId - String
|
A unique identifier for the client performing the mutation. |
customerPoints - BigInt
|
The customer's points balance after redeeming. |
discount - Discount
|
The discount coupon produced, for discount rewards. |
error - String
|
Error message when the redemption failed (e.g. not enough points); null on success. |
event - Event
|
The loyalty event recording the redemption. |
Example
{
"clientMutationId": "abc123",
"customerPoints": {},
"discount": Discount,
"error": "abc123",
"event": Event
}
SpendingRule
Fields
| Field Name | Description |
|---|---|
discountAmountPointsType - String
|
How the discount scales with points: fixed or increment. |
discountValue - BigInt
|
The reward value (currency amount or percentage, depending on rewardType). |
id - Int
|
Identifier of the spending rule that was redeemed. |
rewardType - String
|
What redeeming grants: a discount (amount/percentage/free shipping) or store credit. |
title - String
|
The rule title (custom, or auto-generated). |
useACustomTitle - Boolean
|
Whether the merchant set a custom title instead of the auto-generated one. |
Example
{
"discountAmountPointsType": "xyz789",
"discountValue": {},
"id": 123,
"rewardType": "xyz789",
"title": "xyz789",
"useACustomTitle": false
}
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"
SyncGuestWishlistPayload
Description
Autogenerated return type of SyncGuestWishlist.
Example
{
"clientMutationId": "abc123",
"error": "xyz789"
}
TwoDecimalPlaceBigDecimal
Description
Decimal number with 2 decimal digits
Example
TwoDecimalPlaceBigDecimal
UpdateWishlistPayload
Description
Autogenerated return type of UpdateWishlist.
Fields
| Field Name | Description |
|---|---|
clientMutationId - String
|
A unique identifier for the client performing the mutation. |
error - String
|
Error message when the update failed; null on success. |
guestId - String
|
The guest identifier associated with the item, for guest wishlists. |
inWishlist - Boolean
|
Whether the product is now in the wishlist. |
list - String
|
The list the item was added to or removed from. |
productId - String
|
The Shopify product id of the affected product. |
productPrice - String
|
The price of the affected variant. |
productTitle - String
|
The product title. |
variantExternalIds - [ID!]
|
The variant ids now wishlisted for this product. |
Example
{
"clientMutationId": "xyz789",
"error": "abc123",
"guestId": "xyz789",
"inWishlist": false,
"list": "abc123",
"productId": "abc123",
"productPrice": "xyz789",
"productTitle": "xyz789",
"variantExternalIds": ["4"]
}