Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The error response will have a top level code property set to RulesError. The details of which rules failed will live in the details.ruleEvaluation array. Each one of the objects within that array will contain the following properties that can be interprettedinterpreted:

  • code <string>: this will always be set to RulesError, when the error comes from the loyalty engine.

  • details object that explains more information about the error(s).

  • ruleEvaluation array of objects that each specify error(s) found in the request.

    • code <string>: descriptive error code, used to differentiate error scenarios that return the same HTTP status code.

    • ruleId <string>: the ID of the rule that failed / caused an error, for example, “store-restrictions.

    • message <string>: human readable error message, in English. These are not designed for use in direct customer display.

    • currentValue <string> (optional): The value provided in the request that was used to evaluate the rule (if applicable).

    • targetValue <array> (optional): The expected value(s) used to evaluate the currentValue (if applicable). In the example below, a storeId of 12345 was provided in the transaction (this is the currentValue), but the incentive provided was set to restrict this offer redemption to only stores with ids 1234 or 2345 (the array in the targetValue).

    • incentiveId <string> (optional): The ID of the incentive (offer or reward) related to the rule failure (if applicable).

...