Skip to content

Earn rules

Returns every earn rule configured for your shop, the ways customers can earn stamps (orders, social actions, birthdays, etc.). Takes no arguments.

Returns a non-null list of non-null EarnRule objects ([EarnRule!]!).

FieldTypeDescription
idID!Unique identifier.
nameStringDisplay name (branded/translated).
typeStringRule type (e.g. order, social, birthday).
stepIntBase stamps awarded per qualifying action.
multiplierFloatMultiplier applied to step.
iconUrlStringIcon URL if set.
query {
earnRules {
id
name
type
step
multiplier
iconUrl
}
}
{
"data": {
"earnRules": [
{
"id": "12",
"name": "Place an order",
"type": "order",
"step": 1,
"multiplier": 1.0,
"iconUrl": "https://cdn.appydesign.io/icons/order.svg"
}
]
}
}

Returns a single earn rule by its ID.

NameTypeRequiredDescription
idID!YesThe record’s ID.

Returns an EarnRule object (nullable, null if not found).

FieldTypeDescription
idID!Unique identifier.
nameStringDisplay name (branded/translated).
typeStringRule type (e.g. order, social, birthday).
stepIntBase stamps awarded per qualifying action.
multiplierFloatMultiplier applied to step.
iconUrlStringIcon URL if set.
query ($id: ID!) {
earnRule(id: $id) {
id
name
type
step
multiplier
}
}
{
"data": {
"earnRule": {
"id": "12",
"name": "Place an order",
"type": "order",
"step": 1,
"multiplier": 1.0
}
}
}