Module:Discounts Engine For Backend
This module provides an engine that allows to execute the new discounts engine in the backend. Besides, it exposes a web service that makes use of this engine for calculating the applicable discounts for a given ticket.
Discounts Web Service
The discounts web service provided with the module receives a ticket and returns the its applicable discounts taking into account the different discount rules defined in the Discounts and Promotions window.
The web service is exposed at the following url:
Web Service API
To know the web service details like how to consume it together with the required request data and the output result, it is recommended to install the OpenAPI module which exposes the web service API definition.
See here to know how to deploy and visualize the discounts API.
After that it is possible to see the discounts web service details by navigating to the following url:
and selecting the "discounts" definition.
A live example is available here.