> For the complete documentation index, see [llms.txt](https://developers.discountninja.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api.md).

# JavaScript API

{% hint style="info" %}
The documentation below describes the API as of version 9.x of the script.&#x20;
{% endhint %}

## Documentation

* [Functions](/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/functions.md): documents all properties and functions available in the public API
* [Events](/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/events.md): documents the events published and subscribed to by the Price Rule Engine
* [Objects](/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/objects.md): documents the objects returned by the functions and properties
