Skip to content
Book a demoContact usGet started

List Rates In Catalog

rate_catalogs.list_rates(strrate_catalog_id, RateCatalogListRatesParams**kwargs) -> RateCatalogListRatesResponse
get/rate-catalogs/{rate_catalog_id}/rates

List Rates In Catalog

ParametersExpand Collapse
rate_catalog_id: str
limit: Optional[int]
maximum100
minimum1
offset: Optional[int]
minimum0
ReturnsExpand Collapse
class RateCatalogListRatesResponse:
has_more: bool
rates: List[Rate]
id: str
interval: Literal["monthly", "yearly"]
Accepts one of the following:
"monthly"
"yearly"
rate_catalog_id: str
type: Literal["fixed", "usage_based"]
Accepts one of the following:
"fixed"
"usage_based"
fixed: Optional[RateFixed]
id: str
code: str
description: Optional[str]
name: str
price: RateFixedPrice

Flat price is a price that linearly scales with the quantity.

Accepts one of the following:
class FlatPriceOutput:

Flat price is a price that linearly scales with the quantity.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

price_type: Optional[Literal["flat"]]
class PackagePriceOutput:

Package price is a price that is charged for a fixed number of units. For example, $10 per 1000 units. If the quantity is not a multiple of the package units, the rounding behavior will be applied.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

package_units: int
rounding_behavior: Literal["round_up", "round_down"]
Accepts one of the following:
"round_up"
"round_down"
price_type: Optional[Literal["package"]]
usage_based: Optional[RateUsageBased]
Accepts one of the following:
class RateUsageBasedSimpleUsageBasedRateInterface:
id: str
code: str
description: Optional[str]
included_units: int
name: str
price: RateUsageBasedSimpleUsageBasedRateInterfacePrice

Flat price is a price that linearly scales with the quantity.

Accepts one of the following:
class FlatPriceOutput:

Flat price is a price that linearly scales with the quantity.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

price_type: Optional[Literal["flat"]]
class PackagePriceOutput:

Package price is a price that is charged for a fixed number of units. For example, $10 per 1000 units. If the quantity is not a multiple of the package units, the rounding behavior will be applied.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

package_units: int
rounding_behavior: Literal["round_up", "round_down"]
Accepts one of the following:
"round_up"
"round_down"
price_type: Optional[Literal["package"]]
pricing_metric_id: str
usage_based_rate_type: Optional[Literal["simple"]]
class RateUsageBasedDimensionalUsageBasedRateInterface:
id: str
code: str
description: Optional[str]
dimensions: List[RateUsageBasedDimensionalUsageBasedRateInterfaceDimension]
description: Optional[str]
key: str
values: List[str]
included_units: int
name: str
pricing_matrix: RateUsageBasedDimensionalUsageBasedRateInterfacePricingMatrix
cells: List[RateUsageBasedDimensionalUsageBasedRateInterfacePricingMatrixCell]
dimension_coordinates: Dict[str, str]
price: RateUsageBasedDimensionalUsageBasedRateInterfacePricingMatrixCellPrice

Flat price is a price that linearly scales with the quantity.

Accepts one of the following:
class FlatPriceOutput:

Flat price is a price that linearly scales with the quantity.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

price_type: Optional[Literal["flat"]]
class PackagePriceOutput:

Package price is a price that is charged for a fixed number of units. For example, $10 per 1000 units. If the quantity is not a multiple of the package units, the rounding behavior will be applied.

amount: AmountOutput
currency_code: str

The currency code of the amount.

value: str

The value of the amount in the smallest unit of the currency.

package_units: int
rounding_behavior: Literal["round_up", "round_down"]
Accepts one of the following:
"round_up"
"round_down"
price_type: Optional[Literal["package"]]
pricing_metric_id: str
usage_based_rate_type: Optional[Literal["dimensional"]]
List Rates In Catalog
import os
from lark import Lark

client = Lark(
    api_key=os.environ.get("LARK_API_KEY"),  # This is the default and can be omitted
)
response = client.rate_catalogs.list_rates(
    rate_catalog_id="rate_catalog_id",
)
print(response.has_more)
{
  "has_more": true,
  "rates": [
    {
      "id": "rate_AJWMxR81jxoRlli6p13uf3JB",
      "interval": "monthly",
      "rate_catalog_id": "rcat_AJWMxR81jxoRlli6p13uf3JB",
      "type": "usage_based",
      "fixed": {
        "id": "id",
        "code": "code",
        "description": "description",
        "name": "name",
        "price": {
          "amount": {
            "currency_code": "usd",
            "value": "2500"
          },
          "price_type": "flat"
        }
      },
      "usage_based": {
        "id": "ubr_AJWMxR81jxoRlli6p13uf3JB",
        "code": "compute_hours",
        "description": "Compute hours usage",
        "included_units": 0,
        "name": "Compute Hours",
        "price": {
          "amount": {
            "currency_code": "usd",
            "value": "100"
          },
          "price_type": "flat"
        },
        "pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
        "usage_based_rate_type": "simple"
      }
    }
  ]
}
Returns Examples
{
  "has_more": true,
  "rates": [
    {
      "id": "rate_AJWMxR81jxoRlli6p13uf3JB",
      "interval": "monthly",
      "rate_catalog_id": "rcat_AJWMxR81jxoRlli6p13uf3JB",
      "type": "usage_based",
      "fixed": {
        "id": "id",
        "code": "code",
        "description": "description",
        "name": "name",
        "price": {
          "amount": {
            "currency_code": "usd",
            "value": "2500"
          },
          "price_type": "flat"
        }
      },
      "usage_based": {
        "id": "ubr_AJWMxR81jxoRlli6p13uf3JB",
        "code": "compute_hours",
        "description": "Compute hours usage",
        "included_units": 0,
        "name": "Compute Hours",
        "price": {
          "amount": {
            "currency_code": "usd",
            "value": "100"
          },
          "price_type": "flat"
        },
        "pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
        "usage_based_rate_type": "simple"
      }
    }
  ]
}