Tiers

List tiers

Returns all tiers and their levels for the given program.

get/v1/programs/{program_id}/tiers

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/programs/{program_id}/tiers
  • Auth: HTTP bearer

Path parameters

program_idstring uuid required

The program's id.

Query parameters

created_afterstring date-time

Return only records created after this time, RFC 3339.

created_beforestring date-time

Return only records created before this time, RFC 3339.

Response

List of tiers

Example response

{
  "data": [
    {
      "archived_at": "2027-01-15T10:30:00Z",
      "created_at": "2027-01-15T10:30:00Z",
      "display_name": "Loyalty Status",
      "id": "e0a4c6b2-8d13-4f57-9b6a-3c5e7a9d1b22",
      "key": "status",
      "levels": [
        {
          "color": "#FFD700",
          "created_at": "2027-01-15T10:30:00Z",
          "display_name": "Gold",
          "icon_url": "https://example.com/icons/gold.png",
          "id": "e0a4c6b2-8d13-4f57-9b6a-3c5e7a9d1b22",
          "key": "gold",
          "qualification": {
            "criteria": [
              {
                "counter": "nights",
                "operator": ">=",
                "threshold": 25
              }
            ],
            "mode": "ALL"
          },
          "qualification_condition": "participant.counter.nights >= 25",
          "rank": 2,
          "updated_at": "2027-01-15T10:30:00Z"
        }
      ],
      "lifecycle": {
        "counters": {
          "rollover": "EXCESS"
        },
        "downgrade_policy": {
          "grace_days": 30,
          "min_level": "silver",
          "mode": "DROP_ONE"
        },
        "qualification_period": {
          "start_day": 1,
          "start_month": 2,
          "type": "FIXED_YEAR"
        },
        "retention": {
          "duration": "90d",
          "mode": "ACTIVITY_REFRESH"
        },
        "status_validity": {
          "extend_months": 1
        }
      },
      "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
      "status": "ACTIVE",
      "updated_at": "2027-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "YWJjMTIz"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.