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

limitnumber

The number of records to return.

cursorstring

A pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.

sortname | -name | thresholdAmount | -thresholdAmount | createdAt | -createdAt | archivedAt | -archivedAt

The sort order. Prefix a field with - to sort descending. Defaults to name.

filterstring

A 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.

Request
curl \
  "https://api.cascade.dev/loyalty-tiers" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
      "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"
}

POST /loyalty-tiers

Create a loyalty tier inside a program. Triggers the loyaltyTier.created webhook.

Requires the loyalty:write permission.

Body Parameters

dataobjectrequired

The tier to create.

Request
curl \
  -X POST \
  "https://api.cascade.dev/loyalty-tiers" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "name": "string",
    "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
    "threshold": {
      "type": "earnedPoints",
      "amount": 0,
      "window": "lifetime"
    },
    "pointsMultiplier": 0,
    "color": "string",
    "metadata": "..."
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
  "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"
}

GET /loyalty-tiers/{id}

Get a single loyalty tier by ID.

Requires the loyalty:read permission.

Path Parameters

idstring (uuid)required

The ID of the loyalty tier.

Request
curl \
  "https://api.cascade.dev/loyalty-tiers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
  "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"
}

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

idstring (uuid)required

The ID of the loyalty tier to update.

Body Parameters

dataobjectrequired

The fields to update.

Request
curl \
  -X PUT \
  "https://api.cascade.dev/loyalty-tiers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "name": "string",
    "threshold": {
      "type": "earnedPoints",
      "amount": 0,
      "window": "lifetime"
    },
    "pointsMultiplier": 0,
    "color": "string",
    "metadata": "...",
    "archived": true
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
  "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"
}

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

idstring (uuid)required

The ID of the loyalty tier to delete.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/loyalty-tiers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "loyaltyProgramId": "550e8400-e29b-41d4-a716-446655440000",
  "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"
}