> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/promotions/retrieve-active-promotions-in-cart.md).

# Retrieve active promotions in cart

Use this method to list all promotions applied to products added to the cart.

## Requirements

This method requires you to set a specific partner using [**setPartner**](/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/partner/set-partner.md).

## Request parameters

<table><thead><tr><th width="119.7999267578125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Session identifier, output of the Login method. An exception is thrown if the values are incorrect.</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$jsonRpcRequest = array (
  'jsonrpc' => '2.0',
  'id' => $i++,
  'method' => 'getPromotions',
  'params' => array($sessionID)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));
```

## Response parameters

<table><thead><tr><th width="284.199951171875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>Promotion</code></td><td><p><strong>Array of objects</strong></p><p>Details below.</p></td></tr><tr><td><code>Promotion.Name</code></td><td><strong>String</strong><br>Promotion name</td></tr><tr><td><code>Promotion.Description</code></td><td><strong>String</strong><br>Promotion description</td></tr><tr><td><code>Promotion.StartDate</code></td><td><strong>String</strong><br>Promotion start date. NULL for promotions that start immediately after they're created.</td></tr><tr><td><code>Promotion.EndDate</code></td><td><strong>String</strong><br>Ending date. The date when you set the promotion to end. NULL for promotions that are active indefinitely.</td></tr><tr><td><code>Promotion.MaximumOrdersNumber</code></td><td><strong>Int</strong><br>When the maximum number of orders is reached the promotion stops. NULL for unlimited number of orders.</td></tr><tr><td><code>Promotion.MaximumQuantity</code></td><td><strong>Int</strong><br>Discount applies to a specific number of products, smaller than the maximum defined quantity. NULL for unlimited number of units. Any extra quantity added to the cart will be sold at full price.</td></tr><tr><td><code>Promotion.InstantDiscount</code></td><td><strong>Boolean</strong><br>Selecting the instant discount option auto-applies the discount for ALL the selected products for all shoppers, without the need to enter the discount coupon.</td></tr><tr><td><code>Promotion.Coupon</code></td><td><strong>String</strong><br>Promotion coupon/voucher.</td></tr><tr><td><code>Promotion.DiscountLabel</code></td><td><strong>String</strong><br>Set discounts as percentage from the product price or as a fixed amount in the chosen currency.</td></tr></tbody></table>

## Errors

<table><thead><tr><th width="185.800048828125">Error</th><th>Description</th></tr></thead><tbody><tr><td><strong>EMPTY_CART</strong></td><td>The shopping cart is empty.</td></tr><tr><td><strong>NO_PROMOTIONS</strong></td><td>There are no promotions applied to the current shopping cart.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/promotions/retrieve-active-promotions-in-cart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
