Skip to content

Get Eligible Loyalty Programs (GET /v1/loyalty-accounts/eligible)

Returns a list of Loyalty Programs that the specified Card is eligible for.

URL test:

https://test.lightcms.io/loyalty/v1/loyalty-accounts/eligible

Method:

GET

Path Items

/v1/loyalty-accounts/eligible

Parameters

Name Location Type Required Description
accept header string Yes Media types that are acceptable for the response (e.g., */*).
x-idempotency-key header string No Idempotency key to guarantee safe retries.
x-tenant header string No Tenant identifier for multi‑tenant deployments.
cardId query integer (int64) Yes Identifier of the Card whose eligibility is being checked (must be > 0).
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., id,asc.

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/loyalty-accounts/eligible?cardId=123&page=0&size=20&sort=id,asc" \
         -H "accept: */*"

Responses:

200 - OK

Status Code: 200 OK

    [
      {
        "id": 0,
        "name": "string",
        "description": "string",
        "providerType": "MERCHANT",
        "providerName": "string",
        "assignmentType": "AUTOMATIC_ON_NEW_CARD",
        "assignmentEntity": "CARD",
        "status": "DRAFT",
        "validityFrom": "2026-02-03",
        "validityTo": "2026-02-03",
        "assignmentRules": {
          "cpdCodes": [
            "string"
          ],
          "associations": [
            "string"
          ]
        },
        "rewardType": "PERCENTAGE",
        "rewardApplicationType": "IMMEDIATELY",
        "loyaltyRules": [
          {
            "id": 0,
            "seqNo": 0,
            "enabled": true,
            "definition": {
              "name": "string",
              "condition": {
                "type": "string",
                "params": {
                  "additionalProp1": "string",
                  "additionalProp2": "string",
                  "additionalProp3": "string"
                }
              },
              "onTrue": {
                "type": "string",
                "params": {
                  "additionalProp1": "string",
                  "additionalProp2": "string",
                  "additionalProp3": "string"
                }
              },
              "onFalse": {
                "type": "string",
                "params": {
                  "additionalProp1": "string",
                  "additionalProp2": "string",
                  "additionalProp3": "string"
                }
              }
            },
            "outcomeOnTrue": "GO_TO_NEXT_RULE",
            "outcomeOnFalse": "GO_TO_NEXT_RULE",
            "customerMessageOnTrue": "string",
            "customerMessageOnFalse": "string",
            "validityFrom": "2026-02-03",
            "validityTo": "2026-02-03"
          }
        ]
      }
    ]

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 Assignment mode (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 assignment logic.
associations body.assignmentRules array of strings Associations used for assignment logic.
rewardType body string Reward type (PERCENTAGE, FLAT_AMOUNT, LOYALTY_POINTS).
rewardApplicationType body string When the reward is applied (IMMEDIATELY, EX_POST).
loyaltyRuleId body.loyaltyRules integer (int64) Unique identifier of the rule.
loyaltyRuleSeqNo body.loyaltyRules integer (int64) Sequence number determining rule order.
loyaltyRuleEnabled body.loyaltyRules boolean Whether the rule is active.
ruleName body.loyaltyRules.definition string Name of the rule.
conditionType body.loyaltyRules.definition.condition string Condition type.
conditionParamKey1 body.loyaltyRules.definition.condition.params string Value of additionalProp1 in condition parameters.
conditionParamKey2 body.loyaltyRules.definition.condition.params string Value of additionalProp2 in condition parameters.
conditionParamKey3 body.loyaltyRules.definition.condition.params string Value of additionalProp3 in condition parameters.
onTrueType body.loyaltyRules.definition.onTrue string Outcome type when condition evaluates to true.
onTrueParamKey1 body.loyaltyRules.definition.onTrue.params string Value of additionalProp1 in onTrue parameters.
onTrueParamKey2 body.loyaltyRules.definition.onTrue.params string Value of additionalProp2 in onTrue parameters.
onTrueParamKey3 body.loyaltyRules.definition.onTrue.params string Value of additionalProp3 in onTrue parameters.
onFalseType body.loyaltyRules.definition.onFalse string Outcome type when condition evaluates to false.
onFalseParamKey1 body.loyaltyRules.definition.onFalse.params string Value of additionalProp1 in onFalse parameters.
onFalseParamKey2 body.loyaltyRules.definition.onFalse.params string Value of additionalProp2 in onFalse parameters.
onFalseParamKey3 body.loyaltyRules.definition.onFalse.params string Value of additionalProp3 in onFalse parameters.
outcomeOnTrue body.loyaltyRules string Action after true evaluation (GO_TO_NEXT_RULE, STOP_EVALUATION).
outcomeOnFalse body.loyaltyRules string Action after false evaluation (GO_TO_NEXT_RULE, STOP_EVALUATION).
customerMessageOnTrue body.loyaltyRules string Message shown to the customer when condition is true.
customerMessageOnFalse body.loyaltyRules string Message shown to the customer when condition is false.
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-04T11:13:30.42463459",
"status": 404,
"error": "Resource Not Found",
"message": "Card not found with cardId: 1212121212121"
}

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.