Skip to content

Get Loyalty Program (GET /v1/loyalty-programs/{id})

Retrieves the complete details of a Loyalty Program identified by its id.
If the specified Loyalty Program does not exist, a 404 Not Found response is returned.

URL test:

https://test.lightcms.io/loyalty/v1/loyalty-programs/{id}

Method:

GET

Path Items

/v1/loyalty-programs/{id}

Parameters

Name Location Type Required Description
id path integer (int64) Yes Identifier of the Loyalty Program (must be > 0).

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/loyalty-programs/12" \
         -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.
404 - Not Found

Status Code: 404 Not Found

{
"timestamp": "2026-02-04T12:16:34.897159276",
"status": 404,
"error": "Resource Not Found",
"message": "Loyalty program not found with id: 12121212"
}

Parameter Location Type Description
timestamp body string (date‑time) Time when the error response was generated.
status body integer HTTP status code (404).
error body string Short error label (“Resource Not Found”).
message body string Detailed error message indicating the missing ID.