#Loyalty tiers
GET /loyalty-tiers
List the tiers defined across the organization's loyalty programs, alphabetically by default. Archived tiers are included.
Requires the loyalty:read permission.
Query parameters
limitnumberThe number of records to return.
cursorstringA pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.
sortname | -name | thresholdAmount | -thresholdAmount | createdAt | -createdAt | archivedAt | -archivedAtThe sort order. Prefix a field with - to sort descending. Defaults to name.
filterstringA JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, name, loyaltyProgramId, archivedAt, createdAt. See Filtering for the syntax.
curl \
"https://your-store.meisei.app/api/loyalty-tiers" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"import { client } from "@meisei/api/admin/client"
import { getLoyaltyTiers } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await getLoyaltyTiers()require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
page = meisei.loyalty_tiers.listfrom meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
page = meisei.loyalty_tiers.list(){
"data": [
{
"id": "A4Ws1igz",
"name": "string",
"loyaltyProgramId": "A4Ws1igz",
"threshold": {
"type": "...",
"amount": "...",
"window": "..."
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archivedAt": "2025-01-15T09:30:00Z",
"createdAt": "2025-01-15T09:30:00Z",
"updatedAt": "2025-01-15T09:30:00Z"
}
],
"nextCursor": "string"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the tier.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"description": "The tier's display name, shown to members."
},
"loyaltyProgramId": {
"type": "string",
"description": "The loyalty program the tier belongs to.",
"idCodec": "sqid"
},
"threshold": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "earnedPoints",
"description": "The tier is attained by earning points."
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "How many points have to be earned within the window to attain the tier."
},
"window": {
"type": "string",
"enum": ["lifetime", "rolling12Months"],
"description": "The period earning is summed over. `lifetime` counts everything the member ever earned; `rolling12Months` counts the last 12 months."
}
},
"required": ["type", "amount", "window"],
"additionalProperties": false
}
],
"description": "What a member has to do to attain the tier."
},
{
"type": "null"
}
],
"description": "What a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying."
},
"pointsMultiplier": {
"type": "number",
"description": "Multiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards."
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "A CSS color used to badge the tier, or null for the default look."
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "A metadata value: a string, a number, true or false, or a list of strings. A key with a metadata definition holds the type its definition names."
},
"description": "Key/value pairs for your own data. Keys you define with `/metadata-definitions` are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example `metadata.category`."
},
"archivedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the tier was archived, or null if it is still in use. Archived tiers take no new members but keep the ones they have."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was last changed."
}
},
"required": [
"id",
"name",
"loyaltyProgramId",
"threshold",
"pointsMultiplier",
"color",
"metadata",
"archivedAt",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"description": "The page of records, in the requested sort order."
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Pass this back as `cursor` to fetch the next page. Null once the last page has been returned."
}
},
"required": ["data", "nextCursor"],
"additionalProperties": false
}POST /loyalty-tiers
Create a loyalty tier inside a program. Triggers the loyaltyTier.created webhook.
Requires the loyalty:write permission.
Body parameters
namestringrequiredThe tier's display name.
loyaltyProgramIdstringrequiredThe loyalty program to add the tier to.
thresholdobject | nullWhat a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying.
pointsMultipliernumberMultiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards.
colorstring | nullA CSS color used to badge the tier, or null for the default look.
metadataobjectKey/value pairs for your own data. Keys you define with /metadata-definitions are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example metadata.category.
curl \
-X POST \
"https://your-store.meisei.app/api/loyalty-tiers" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"loyaltyProgramId": "string",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "..."
}'import { client } from "@meisei/api/admin/client"
import { postLoyaltyTiers } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await postLoyaltyTiers({
body: {
name: "string",
loyaltyProgramId: "string",
threshold: {
type: "earnedPoints",
amount: 0,
window: "lifetime",
},
pointsMultiplier: 0,
color: "string",
metadata: "...",
},
})require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.create(
name: "string",
loyalty_program_id: "string",
threshold: { type: "earnedPoints", amount: 0, window: "lifetime" },
points_multiplier: 0,
color: "string",
metadata: "...",
)from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.create(
name="string",
loyalty_program_id="string",
threshold={"type": "earnedPoints", "amount": 0, "window": "lifetime"},
points_multiplier=0,
color="string",
metadata={},
){
"id": "A4Ws1igz",
"name": "string",
"loyaltyProgramId": "A4Ws1igz",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archivedAt": "2025-01-15T09:30:00Z",
"createdAt": "2025-01-15T09:30:00Z",
"updatedAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the tier.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"description": "The tier's display name, shown to members."
},
"loyaltyProgramId": {
"type": "string",
"description": "The loyalty program the tier belongs to.",
"idCodec": "sqid"
},
"threshold": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "earnedPoints",
"description": "The tier is attained by earning points."
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "How many points have to be earned within the window to attain the tier."
},
"window": {
"type": "string",
"enum": ["lifetime", "rolling12Months"],
"description": "The period earning is summed over. `lifetime` counts everything the member ever earned; `rolling12Months` counts the last 12 months."
}
},
"required": ["type", "amount", "window"],
"additionalProperties": false
}
],
"description": "What a member has to do to attain the tier."
},
{
"type": "null"
}
],
"description": "What a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying."
},
"pointsMultiplier": {
"type": "number",
"description": "Multiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards."
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "A CSS color used to badge the tier, or null for the default look."
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "A metadata value: a string, a number, true or false, or a list of strings. A key with a metadata definition holds the type its definition names."
},
"description": "Key/value pairs for your own data. Keys you define with `/metadata-definitions` are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example `metadata.category`."
},
"archivedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the tier was archived, or null if it is still in use. Archived tiers take no new members but keep the ones they have."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was last changed."
}
},
"required": [
"id",
"name",
"loyaltyProgramId",
"threshold",
"pointsMultiplier",
"color",
"metadata",
"archivedAt",
"createdAt",
"updatedAt"
],
"additionalProperties": false,
"description": "The new loyalty tier."
}GET /loyalty-tiers/{id}
Get a single loyalty tier by ID.
Requires the loyalty:read permission.
Path parameters
idstringrequiredThe ID of the loyalty tier.
curl \
"https://your-store.meisei.app/api/loyalty-tiers/A4Ws1igz" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"import { client } from "@meisei/api/admin/client"
import { getLoyaltyTiersById } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await getLoyaltyTiersById({
path: { id: "A4Ws1igz" },
})require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.retrieve("A4Ws1igz")from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.retrieve("A4Ws1igz"){
"id": "A4Ws1igz",
"name": "string",
"loyaltyProgramId": "A4Ws1igz",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archivedAt": "2025-01-15T09:30:00Z",
"createdAt": "2025-01-15T09:30:00Z",
"updatedAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the tier.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"description": "The tier's display name, shown to members."
},
"loyaltyProgramId": {
"type": "string",
"description": "The loyalty program the tier belongs to.",
"idCodec": "sqid"
},
"threshold": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "earnedPoints",
"description": "The tier is attained by earning points."
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "How many points have to be earned within the window to attain the tier."
},
"window": {
"type": "string",
"enum": ["lifetime", "rolling12Months"],
"description": "The period earning is summed over. `lifetime` counts everything the member ever earned; `rolling12Months` counts the last 12 months."
}
},
"required": ["type", "amount", "window"],
"additionalProperties": false
}
],
"description": "What a member has to do to attain the tier."
},
{
"type": "null"
}
],
"description": "What a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying."
},
"pointsMultiplier": {
"type": "number",
"description": "Multiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards."
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "A CSS color used to badge the tier, or null for the default look."
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "A metadata value: a string, a number, true or false, or a list of strings. A key with a metadata definition holds the type its definition names."
},
"description": "Key/value pairs for your own data. Keys you define with `/metadata-definitions` are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example `metadata.category`."
},
"archivedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the tier was archived, or null if it is still in use. Archived tiers take no new members but keep the ones they have."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was last changed."
}
},
"required": [
"id",
"name",
"loyaltyProgramId",
"threshold",
"pointsMultiplier",
"color",
"metadata",
"archivedAt",
"createdAt",
"updatedAt"
],
"additionalProperties": false,
"description": "The requested loyalty tier."
}PUT /loyalty-tiers/{id}
Rename a loyalty tier, change its metadata, or archive it so it takes no new members. Triggers the loyaltyTier.updated webhook.
Requires the loyalty:write permission.
Path parameters
idstringrequiredThe ID of the loyalty tier to update.
Body parameters
namestringThe tier's display name.
thresholdobject | nullWhat a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying. Omit to leave the threshold alone.
pointsMultipliernumberMultiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards.
colorstring | nullA CSS color used to badge the tier, or null for the default look.
metadataobjectReplaces the tier's metadata wholesale. Omit to leave it alone.
archivedbooleanSet true to archive the tier so it takes no new members, or false to bring it back. Existing members stay put either way.
curl \
-X PUT \
"https://your-store.meisei.app/api/loyalty-tiers/A4Ws1igz" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archived": true
}'import { client } from "@meisei/api/admin/client"
import { putLoyaltyTiersById } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await putLoyaltyTiersById({
path: { id: "A4Ws1igz" },
body: {
name: "string",
threshold: {
type: "earnedPoints",
amount: 0,
window: "lifetime",
},
pointsMultiplier: 0,
color: "string",
metadata: "...",
archived: true,
},
})require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.update(
"A4Ws1igz",
name: "string",
threshold: { type: "earnedPoints", amount: 0, window: "lifetime" },
points_multiplier: 0,
color: "string",
metadata: "...",
archived: true,
)from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.update(
"A4Ws1igz",
name="string",
threshold={"type": "earnedPoints", "amount": 0, "window": "lifetime"},
points_multiplier=0,
color="string",
metadata={},
archived=True,
){
"id": "A4Ws1igz",
"name": "string",
"loyaltyProgramId": "A4Ws1igz",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archivedAt": "2025-01-15T09:30:00Z",
"createdAt": "2025-01-15T09:30:00Z",
"updatedAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the tier.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"description": "The tier's display name, shown to members."
},
"loyaltyProgramId": {
"type": "string",
"description": "The loyalty program the tier belongs to.",
"idCodec": "sqid"
},
"threshold": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "earnedPoints",
"description": "The tier is attained by earning points."
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "How many points have to be earned within the window to attain the tier."
},
"window": {
"type": "string",
"enum": ["lifetime", "rolling12Months"],
"description": "The period earning is summed over. `lifetime` counts everything the member ever earned; `rolling12Months` counts the last 12 months."
}
},
"required": ["type", "amount", "window"],
"additionalProperties": false
}
],
"description": "What a member has to do to attain the tier."
},
{
"type": "null"
}
],
"description": "What a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying."
},
"pointsMultiplier": {
"type": "number",
"description": "Multiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards."
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "A CSS color used to badge the tier, or null for the default look."
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "A metadata value: a string, a number, true or false, or a list of strings. A key with a metadata definition holds the type its definition names."
},
"description": "Key/value pairs for your own data. Keys you define with `/metadata-definitions` are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example `metadata.category`."
},
"archivedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the tier was archived, or null if it is still in use. Archived tiers take no new members but keep the ones they have."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was last changed."
}
},
"required": [
"id",
"name",
"loyaltyProgramId",
"threshold",
"pointsMultiplier",
"color",
"metadata",
"archivedAt",
"createdAt",
"updatedAt"
],
"additionalProperties": false,
"description": "The updated loyalty tier."
}DELETE /loyalty-tiers/{id}
Delete a loyalty tier. Archive it instead if members are still assigned to it. Triggers the loyaltyTier.deleted webhook.
Requires the loyalty:write permission.
Path parameters
idstringrequiredThe ID of the loyalty tier to delete.
curl \
-X DELETE \
"https://your-store.meisei.app/api/loyalty-tiers/A4Ws1igz" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"import { client } from "@meisei/api/admin/client"
import { deleteLoyaltyTiersById } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await deleteLoyaltyTiersById({
path: { id: "A4Ws1igz" },
})require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.delete("A4Ws1igz")from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.loyalty_tiers.delete("A4Ws1igz"){
"id": "A4Ws1igz",
"name": "string",
"loyaltyProgramId": "A4Ws1igz",
"threshold": {
"type": "earnedPoints",
"amount": 0,
"window": "lifetime"
},
"pointsMultiplier": 0,
"color": "string",
"metadata": "...",
"archivedAt": "2025-01-15T09:30:00Z",
"createdAt": "2025-01-15T09:30:00Z",
"updatedAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the tier.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"description": "The tier's display name, shown to members."
},
"loyaltyProgramId": {
"type": "string",
"description": "The loyalty program the tier belongs to.",
"idCodec": "sqid"
},
"threshold": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "earnedPoints",
"description": "The tier is attained by earning points."
},
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "How many points have to be earned within the window to attain the tier."
},
"window": {
"type": "string",
"enum": ["lifetime", "rolling12Months"],
"description": "The period earning is summed over. `lifetime` counts everything the member ever earned; `rolling12Months` counts the last 12 months."
}
},
"required": ["type", "amount", "window"],
"additionalProperties": false
}
],
"description": "What a member has to do to attain the tier."
},
{
"type": "null"
}
],
"description": "What a member has to earn to attain the tier, or null for a tier that is only assigned by hand. The loyalty tier placement automation, installed with the first tier that has a threshold, moves members up as soon as they qualify and moves a member down from a rolling-window tier once they have held it for a year and stopped qualifying."
},
"pointsMultiplier": {
"type": "number",
"description": "Multiplies points issued by rules for members of this tier, for example 2 for double points. It never applies to manual adjustments, imports, or non-points rewards."
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "A CSS color used to badge the tier, or null for the default look."
},
"metadata": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "A metadata value: a string, a number, true or false, or a list of strings. A key with a metadata definition holds the type its definition names."
},
"description": "Key/value pairs for your own data. Keys you define with `/metadata-definitions` are typed and validated; any other key is free-form. Individual keys are filterable with a dot path, for example `metadata.category`."
},
"archivedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the tier was archived, or null if it is still in use. Archived tiers take no new members but keep the ones they have."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was created."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the tier was last changed."
}
},
"required": [
"id",
"name",
"loyaltyProgramId",
"threshold",
"pointsMultiplier",
"color",
"metadata",
"archivedAt",
"createdAt",
"updatedAt"
],
"additionalProperties": false,
"description": "The deleted loyalty tier."
}