# Discount Ninja Developer Hub

- [Storefront API](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api.md): This section documents the API available to theme developers and app developers to interact with Discount Ninja on a Shopify storefront.
- [Promotion Engine](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine.md): Information about the core JavaScript script used to load Discount Ninja promotions on a Shopify storefront and apply the promotions to the available products and the cart.
- [Enable](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/enable.md)
- [JavaScript API](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api.md): Documentation of the JavaScript API that can be used to extend Discount Ninja's Promotion Engine.
- [Functions](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/functions.md): Functions and properties available on the discountNinja.api namespace.
- [Events](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/events.md): Events are the primary way to interact with the Promotion Engine. The app publishes events when data becomes available and subscribes to a number of events that can be published by third parties.
- [Objects](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/javascript-api/objects.md)
- [Error Messages](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/promotion-engine/error-messages.md): A description of the error messages that the JavaScript API may print to the browser console
- [Widgets](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets.md): Information about the web components used to communicate Discount Ninja promotions.
- [Guiding principles](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/guiding-principles.md)
- [Accessibility](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/guiding-principles/accessibility.md)
- [Localization](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/guiding-principles/localization.md)
- [Integration](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/guiding-principles/integration.md)
- [Style](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/guiding-principles/style.md)
- [Announcement Bar](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/announcement-bar.md): The announcement bar helps merchants to draw attention to promotions, communicate important announcements to customers and tells the customer what they need to do to unlock rewards.
- [Notification](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/notification.md): The notification confirms that an offer has been applied to the cart and tells the customer what they need to do to unlock rewards.
- [Offer Rules Popup](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/offer-rules-popup.md): The offer rules popup widget displays a popup to users with details related to the offer. It optionally includes a CTA.
- [Product Banner](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/product-banner.md): The product banner is displayed on the product page and adds an optional message used to highlight the offer, explain its rules and increase the chance the user adds the product to the cart.
- [Promotion Summary](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/promotion-summary.md): The promotion summary provides a subtotal and a breakdown of the discounts.
- [Promotion Code Field](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/promotion-code-field.md): The promotion code field allows users to redeem Discount Ninja promotion codes and Shopify discount codes from the cart.
- [Promotional Badge](https://developers.discountninja.io/discount-ninja-developer-hub/storefront-api/widgets/promotional-badge.md): The promotional badge is displayed on the image of a product card (typically in a collection or on a product page) to indicate which offer applies to the product.
- [Integration](https://developers.discountninja.io/discount-ninja-developer-hub/integration.md): Discount Ninja includes out-of-the-box integration with a variety of apps and Shopify features.
- [Theme edits](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits.md): Learn how Discount Ninja complements your theme to help merchants to promote offers.
- [App blocks](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/app-blocks.md): App blocks are used to include widgets on the storefront.
- [Product Page Banner](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/app-blocks/product-page-banner.md): Learn how to add the Product Page Banner App block
- [Promo Code Field](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/app-blocks/promo-code-field.md): Learn how to add the Promo Code Field App block
- [Promotion Summary](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/app-blocks/promotion-summary.md): Learn how to add the Promotion Summary App block
- [Code edits](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits.md)
- [Product Detail Page (PDP)](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-detail-page-pdp.md)
- [Price](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-detail-page-pdp/price.md)
- [Banner](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-detail-page-pdp/banner.md)
- [Badge](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-detail-page-pdp/badge.md)
- [Product List Page (PLP) and Collections](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections.md)
- [Attributes](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/attributes.md)
- [Price](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/price.md)
- [Searchanise Search & Filter](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/price/searchanise-search-and-filter.md)
- [Globo Smart Product Filter & Search (aka SPF)](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/price/globo-smart-product-filter-and-search-aka-spf.md)
- [AI Search & Product Filter (Ultimate Search)](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/price/ai-search-and-product-filter-ultimate-search.md)
- [Boost AI Search & Filter (aka PFS)](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/price/boost-ai-search-and-filter-aka-pfs.md)
- [Badge](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/badge.md)
- [Pagination](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/pagination.md)
- [Quick View](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/product-list-page-plp-and-collections/quick-view.md)
- [Cart](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart.md)
- [Root](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart/root.md)
- [Cart item](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart/cart-item.md)
- [Promo Code Field](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart/promo-code-field.md)
- [Promotion Summary](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart/promotion-summary.md)
- [Subtotal](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/cart/subtotal.md)
- [Gift With Purchase](https://developers.discountninja.io/discount-ninja-developer-hub/theme-edits/code-edits/gift-with-purchase.md): Learn how to avoid that customers can order gifts manually.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.discountninja.io/discount-ninja-developer-hub.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
