Summary
APIs to help you understand if the entitlements are valid for a certain member.
See Entitlement Validation Recommended Steps for helpful information on how to validate entitlements in the cart!
Validate Entitlements
POST /v2/b2c/entitlements/validate
Headers
x-acme-api-key
x-b2c-tenant-id
Body
{
"id": "<Shopping Cart ID>"
}
Example:
{ "id": "663bccb327763c5e2e6117f1" }
Response Parameters
Returns a EntitlementsResults Object which contains a list of validations results that includes a list of violated rules and a list of rules that have passed.
EntitlementResult Object
Field | Type | Description |
Valid | Boolean | False means there is a violation in the shopping cart |
messages | List [string] | List of short description of violations |
Violations | List [EntitlementResultSummary] | List of detailed description of the violations |
Sample Responses
{ "valid":false, "messages":[ "Rule failed:Adult_Cat_Child_Senior_4" ], "results":[ { "allowedQuantity":4, "purchasedQuantity":0, "requestedQuantity":6, "valid":false, "ruleSetId":"5e154f2e61a30742351f3a01", "rulesApplied":[ { "id":"Adult_Cat_Child_Senior_4", "valid":false, "message":"Rule failed:Adult_Cat_Child_Senior_4", "messageCode":"Adult_Cat_Child_Senior_4-ERROR" } ], "items":[ { "itemId":"45f8d9cb7e1b47bc9f567cd8d8191243", "eventId":"5f106bfd0652511474a9105c", "ticketingTypeId":"5a05089bc1a3ef6c3663a67b", "ticketingTypeName":"Cat", "quantity":6, "unitPrice":"1.00", "retailUnitPrice":"1.00", "amount":"6.00", "eventName":"ACME Yoga" } ], "membershipId":3961087, "membershipLevelId":"59de230e58ccc43869ddfa98", "timeFrame":"oneDay", "pricepointIds":[ "58c1f29c79e71d020be4abd5", "5a05089bc1a3ef6c3663a67b", "54248ab2e4b01cd228b007a3", "54248adae4b01cd228b007a5" ], "ruleType":"memberBenefits", "validatedPricePointIds":[ ], "reason":"Cart" }, { "allowedQuantity":4, "purchasedQuantity":0, "requestedQuantity":6, "valid":true, "ruleSetId":"5e154f2e61a30742351f3a01", "rulesApplied":[ { "id":"Adult_Cat_Child_Senior_4", "valid":true } ], "items":[ { "eventId":"5f106bfd0652511474a9105c", "ticketingTypeId":"5a05089bc1a3ef6c3663a67b", "quantity":6, "eventName":"ACME Yoga" } ], "timeFrame":"oneDay", "pricepointIds":[ "58c1f29c79e71d020be4abd5", "5a05089bc1a3ef6c3663a67b", "54248ab2e4b01cd228b007a3", "54248adae4b01cd228b007a5" ], "ruleType":"memberBenefits", "validatedPricePointIds":[ ] } ], "violations":[ { "eventId":"5f106bfd0652511474a9105c", "pricePointId":"5a05089bc1a3ef6c3663a67b", "allowedQuantity":4, "purchasedQuantity":0, "requestedQuantity":6, "timeFrame":"day", "pricePoints":[ "Adult", "Cat", "Child", "Senior" ], "ruleType":"memberBenefits", "validatedPricePointIds":[ "58c1f29c79e71d020be4abd5", "5a05089bc1a3ef6c3663a67b", "54248ab2e4b01cd228b007a3", "54248adae4b01cd228b007a5" ], "validatedPricePoints":[ "Adult", "Cat", "Child", "Senior" ], "reason":"Cart", "pricePointIds":[ "58c1f29c79e71d020be4abd5", "5a05089bc1a3ef6c3663a67b", "54248ab2e4b01cd228b007a3", "54248adae4b01cd228b007a5" ] } ], "passed":[ ] }