Skip to content

Get Loyalty Program Rules (GET /v1/loyalty-programs/{programId}/rules)

Retrieves all rules associated with a specific Loyalty Program.

URL test:

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

Method:

GET

Path Items

/v1/loyalty-programs/{programId}/rules

Parameters

Name Location Type Required Description
programId path integer (int64) Yes Identifier of the Loyalty Program (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., seqNo,asc.
accept header string Yes Media types acceptable for the response (e.g., */*).

Example cURL

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

Responses:

200 - OK

Status Code: 200 OK

[
  {
    "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 rule.
seqNo body integer (int64) Sequence number determining rule order.
enabled body boolean Whether the rule is active.
name body.definition string Human‑readable name of the rule.
conditionType body.definition.condition string Type of the condition (e.g., MERCHANT_NAME).
conditionParamAdditionalProp1 body.definition.condition.params string Custom parameter 1 for the condition.
conditionParamAdditionalProp2 body.definition.condition.params string Custom parameter 2 for the condition.
conditionParamAdditionalProp3 body.definition.condition.params string Custom parameter 3 for the condition.
onTrueType body.definition.onTrue string Action type when condition evaluates to true.
onTrueParamAdditionalProp1 body.definition.onTrue.params string Custom parameter 1 for the true outcome.
onTrueParamAdditionalProp2 body.definition.onTrue.params string Custom parameter 2 for the true outcome.
onTrueParamAdditionalProp3 body.definition.onTrue.params string Custom parameter 3 for the true outcome.
onFalseType body.definition.onFalse string Action type when condition evaluates to false.
onFalseParamAdditionalProp1 body.definition.onFalse.params string Custom parameter 1 for the false outcome.
onFalseParamAdditionalProp2 body.definition.onFalse.params string Custom parameter 2 for the false outcome.
onFalseParamAdditionalProp3 body.definition.onFalse.params string Custom parameter 3 for the false outcome.
outcomeOnTrue body string Post‑true action (GO_TO_NEXT_RULE or STOP_EVALUATION).
outcomeOnFalse body string Post‑false action (GO_TO_NEXT_RULE or STOP_EVALUATION).
customerMessageOnTrue body string Message shown to the customer when the rule passes.
customerMessageOnFalse body string Message shown to the customer when the rule fails.
validityFrom body string (date) Start date of rule validity (ISO 8601).
validityTo body string (date) End date of rule validity (ISO 8601).
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.