Skip to content

Get Loyalty Programs List (GET /v1/loyalty-programs)

Retrieves all Loyalty Programs with optional pagination and filtering.

URL test:

https://test.lightcms.io/loyalty/v1/loyalty-programs

Method:

GET

Path Items

/v1/loyalty-programs

Parameters

Name Location Type Required Description
accept header string Yes Media types acceptable for the response (e.g., */*).
id query integer (int64) No Filter by internal Loyalty Program ID.
name query string No Filter by program name (partial match).
status query string No Filter by program status (DRAFT, ACTIVE, DISABLED, CLOSED).
providerType query string No Filter by provider type (MERCHANT, CARD_ISSUER, OTHER).
page query integer (int32) No Zero‑based page index (default 0).
size query integer (int32) No Number of items per page (default 20).
sort query string No Sorting expression, e.g., createdAt,desc.

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/loyalty-programs?page=0&size=20&sort=createdAt,desc" \
         -H "accept: */*"

Responses:

200 - OK

Status Code: 200 OK

{
  "id": 12,
  "name": "Premium Rewards",
  "description": "Earn points faster on premium purchases.",
  "providerType": "MERCHANT",
  "providerName": "Acme Corp",
  "assignmentType": "AUTOMATIC_ON_NEW_CARD",
  "assignmentEntity": "CARD",
  "status": "ACTIVE",
  "validityFrom": "2024-01-01",
  "validityTo": "2025-12-31",
  "assignmentRules": {
    "cpdCodes": ["CODE1", "CODE2"],
    "associations": ["ASSOC1"]
  },
  "rewardType": "LOYALTY_POINTS",
  "rewardApplicationType": "IMMEDIATELY",
  "loyaltyRules": [
    {
      "id": 101,
      "seqNo": 1,
      "enabled": true,
      "definition": {
        "name": "Spend over $100",
        "condition": {
          "type": "TRANSACTION_AMOUNT",
          "params": {}
        },
        "onTrue": {
          "type": "GRANT_REWARD",
          "params": {}
        },
        "onFalse": {
          "type": "NO_ACTION",
          "params": {}
        }
      },
      "outcomeOnTrue": "GO_TO_NEXT_RULE",
      "outcomeOnFalse": "STOP_EVALUATION",
      "customerMessageOnTrue": "You've earned points!",
      "customerMessageOnFalse": "Spend more to earn points.",
      "validityFrom": "2024-01-01",
      "validityTo": "2025-12-31"
    }
  ]
}

Parameter Location Type Description
id body integer (int64) Unique identifier of the Loyalty Program.
name body string Human‑readable name of the program.
description body string Detailed description of the program.
providerType body string Provider category (MERCHANT, CARD_ISSUER, OTHER).
providerName body string Name of the provider organization.
assignmentType body string How the program is assigned (AUTOMATIC_ON_NEW_CARD, MANUAL).
assignmentEntity body string Entity to which the program is assigned (CARD, ACCOUNT, HOLDER).
status body string Current status (DRAFT, ACTIVE, DISABLED, CLOSED).
validityFrom body string (date) Start date of program validity.
validityTo body string (date) End date of program validity.
cpdCodes body.assignmentRules array of strings CPD codes used for automatic assignment rules.
associations body.assignmentRules array of strings Card association codes (e.g., VISA, MC).
rewardType body string Type of reward (PERCENTAGE, FLAT_AMOUNT, LOYALTY_POINTS).
rewardApplicationType body string When the reward is applied (IMMEDIATELY, EX_POST).
loyaltyRuleId body.loyaltyRules integer (int64) Unique identifier of a rule belonging to the program.
loyaltyRuleSeqNo body.loyaltyRules integer (int64) Sequence number determining rule order.
loyaltyRuleEnabled body.loyaltyRules boolean Whether the rule is active.
loyaltyRuleName body.loyaltyRules.definition string Human‑readable name of the rule.
loyaltyRuleConditionType body.loyaltyRules.definition.condition string Type of condition (e.g., MERCHANT_NAME).
loyaltyRuleConditionParams.* body.loyaltyRules.definition.condition.params string Arbitrary key‑value parameters for the condition.
loyaltyRuleOnTrueType body.loyaltyRules.definition.onTrue string Action type when condition evaluates to true.
loyaltyRuleOnTrueParams.* body.loyaltyRules.definition.onTrue.params string Parameters for the true outcome.
loyaltyRuleOnFalseType body.loyaltyRules.definition.onFalse string Action type when condition evaluates to false.
loyaltyRuleOnFalseParams.* body.loyaltyRules.definition.onFalse.params string Parameters for the false outcome.
outcomeOnTrue body.loyaltyRules string Post‑true action (GO_TO_NEXT_RULE or STOP_EVALUATION).
outcomeOnFalse body.loyaltyRules string Post‑false action (GO_TO_NEXT_RULE or STOP_EVALUATION).
customerMessageOnTrue body.loyaltyRules string Message shown to the customer when the rule passes.
customerMessageOnFalse body.loyaltyRules string Message shown to the customer when the rule fails.
ruleValidityFrom body.loyaltyRules string (date) Start date of rule validity.
ruleValidityTo body.loyaltyRules string (date) End date of rule validity.
500 - Internal Server Error

Status Code: 500 Internal Server Error

{
  "errorMessage": "Internal error"
}