Returns the advanced rules currently available to a customer because of the customer segments they belong to.
Changed onUse this endpoint to show a customer the benefits and campaigns targeted at their profile, such as on a landing page. It is a dedicated lookup: the customer data endpoint (GET /v1/pvt/Customer/{id}) keeps returning only the customer's segments, not their rules.
Which rules are returned
A rule is listed only when all of the following are true:
- the rule is active and the current date is within its validity period (StartDate / EndDate);
- the rule is restricted to customer segments, and the customer belongs to at least one of those segments;
- that segment is active;
- the rule still has participations left, when it has a participation limit.
Draft, paused, scheduled and completed rules are never returned. Rules that are not restricted to segments are not returned either, since they apply to every customer.
Empty list
A customer that does not belong to any active segment, or whose segments have no rule available right now, returns HTTP 200 with an empty result list. The list is also empty when the store's plan does not include advanced rules.
Order conditions
A listed rule is available to the customer, but each order must still meet the rule's own conditions to be rewarded. purchaseAmount (amount spent) and minimumOrderValue are returned; the other conditions (such as products, brands, categories, stores, payment methods and sales channels) are not part of this response.
Response
Rules are ordered from the oldest to the newest. Each rule lists in segments only the customer's segments that made it available, with the same name and tag returned by the customer data endpoint. cardTitle and cardDescription replicate the rule's name and description, as the BonifiQ widget does. If the customer is not found, returns HTTP 404 with hasError: true and errorMessage: "Customer not found".
Request
- Base URLhttps://api.bonifiq.com.br
- AuthHTTP basic
Path parameters
Id from the client`s store, usually email address
Response
Customer found; returns the available rules, which may be an empty list.
Changes
- info
endpoint added
- info