# List applicable item prices for a plan-item price

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


[Eventually Consistent](/docs/api/read-consistency)

Returns the set of all applicable [addon-item](/docs/api/item_prices) prices for a specific plan-item price. This set consists of all the addon-item prices that can be applied to a subscription having the plan-item price. When determining this set, Chargebee considers the following:

-   the `[item_applicability](/docs/api/items/item-object#item_applicability)` and `[applicable_items](/docs/api/items/item-object#applicable_items)` defined for the parent item of the plan-item price
-   the [compatibility](/docs/api/subscriptions) of the addon-item prices to the plan-item price

**Note**

If an addon-item price has [differential pricing](/docs/api/differential_prices) defined against the parent item of the plan-item price, then the pricing information in the addon-item price object returned, reflects the differential pricing.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/item_prices/basic-USD-weekly/applicable_item_prices \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=2
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
ListResult result = ItemPrice.FindApplicableItemPrices("basic-USD-weekly")
		.Limit(2)
		.Request();

foreach (var listItem in result.List){
  ItemPrice itemPrice = listItem.ItemPrice;
}
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    itempriceAction "github.com/chargebee/chargebee-go/v3/actions/itemprice"
    "github.com/chargebee/chargebee-go/v3/models/itemprice"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := itempriceAction.FindApplicableItemPrices("basic-USD-weekly", &itemprice.FindApplicableItemPricesRequestParams{
        Limit : chargebee.Int32(2),
    }).ListRequest()
    if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            ItemPrice := res.List[idx].ItemPrice
        }
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.ItemPriceFindApplicableItemPricesRequest{
    Limit : chargebee.Int32(2),
}
  res, err := client.ItemPrice.FindApplicableItemPrices("basic-USD-weekly", req)
      if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            ItemPrice := res.List[idx].ItemPrice
        }
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;
import java.util.List;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        ListResult result = ItemPrice.findApplicableItemPrices("basic-USD-weekly")
            .limit(2)
            .request();

        for (ListResult.Entry entry : result) {
            ItemPrice itemPrice = entry.itemPrice();
        }
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.itemPrice.ItemPrice;
import com.chargebee.v4.models.itemPrice.params.FindApplicableItemPricesParams;
import com.chargebee.v4.models.itemPrice.responses.FindApplicableItemPricesResponse;
import java.util.List;

public class FindApplicableItemPrices {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        FindApplicableItemPricesParams params = FindApplicableItemPricesParams.builder()
            .limit(2)
            .build();

        FindApplicableItemPricesResponse response = client
            .itemPrices()
            .findApplicableItemPrices("basic-USD-weekly", params);
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.itemPrice.findApplicableItemPrices("basic-USD-weekly", {
        limit: 2
    });
    result.list.forEach((entry) => {
        console.log(entry);
        const itemPrice = entry.item_price;
    });
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->itemPrice()->findApplicableItemPrices("basic-USD-weekly", [
    "limit" => 2
]);
foreach($result->list as $entry) {
    $itemPrice = $entry->item_price;
}
```

#### Python

```python
from chargebee import Chargebee, Filters

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
entries = cb_client.ItemPrice.find_applicable_item_prices("basic-USD-weekly",
    cb_client.ItemPrice.FindApplicableItemPricesParams(
        limit=2
    )
)
for entry in entries.list:
    item_price = entry.item_price
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

list = ChargeBee::ItemPrice.find_applicable_item_prices("basic-USD-weekly",{
  :limit => 2
})

list.each do |entry|
  item_price = entry.item_price
end
```

## Sample Response

```json
{
  "list": [
    {
      "item_price": {
        "id": "extra-sms-USD-daily",
        "name": "Extra SMS USD Daily",
        "item_family_id": "Product-Family",
        "item_id": "extra-sms-addon",
        "status": "active",
        "external_name": "Extra SMS USD Daily",
        "pricing_model": "flat_fee",
        "price": 2000,
        "period": 1,
        "currency_code": "USD",
        "period_unit": "day",
        "free_quantity": 0,
        "channel": "web",
        "resource_version": 1634889942715,
        "updated_at": 1634889942,
        "created_at": 1634889942,
        "is_taxable": true,
        "item_type": "addon",
        "show_description_in_invoices": false,
        "show_description_in_quotes": false,
        "object": "item_price"
      }
    },
    {..}
  ]
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/item_prices/{item-price-id}/applicable_item_prices

## Input Parameters

- `limit` (optional, integer, default=10, min=1, max=100)
  The number of resources to be returned.

- `offset` (optional, string, max chars=1000)
  Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set `offset` to the value of `next_offset` obtained in the previous iteration of the API call.

- `item_id` (optional, string, max chars=100)
  The id of the item that the item price belongs to.

## Returns

- `next_offset` (optional, string, max chars=1000)
  This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

- `item_price` (Item price object)
  Resource object representing item\_price
