Add Rates To Rate Catalog
Add Rates To Rate Catalog
Path ParametersExpand Collapse
Body ParametersExpand Collapse
billing_interval: "monthly" or "yearly"How often the customer will be billed for these rates.
How often the customer will be billed for these rates.
fixed_rates: optional array of object { code, name, price, description } The fixed rate to create in the catalog.
The fixed rate to create in the catalog.
Code of this rate to be used for setting quantity and price multipliers. This code must be unique within the rate card.
The name of the rate displayed to the customer.
price: FlatPriceInput { amount, price_type } or PackagePriceInput { amount, package_units, rounding_behavior, price_type } Flat price is a price that linearly scales with the quantity.
Flat price is a price that linearly scales with the quantity.
FlatPriceInput = object { amount, price_type } Flat price is a price that linearly scales with the quantity.
Flat price is a price that linearly scales with the quantity.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
PackagePriceInput = object { amount, package_units, rounding_behavior, price_type } 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.
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.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
rounding_behavior: "round_up" or "round_down"
The description of the rate displayed to the customer.
usage_based_rates: optional array of object { code, name, price, 4 more } or object { code, dimensions, name, 5 more } The usage based rates to create in the catalog.
The usage based rates to create in the catalog.
Simple = object { code, name, price, 4 more }
Code of this rate to be used for price multipliers. This code must be unique within the rate card.
The name of the rate displayed to the customer.
price: FlatPriceInput { amount, price_type } or PackagePriceInput { amount, package_units, rounding_behavior, price_type } Flat price is a price that linearly scales with the quantity.
Flat price is a price that linearly scales with the quantity.
FlatPriceInput = object { amount, price_type } Flat price is a price that linearly scales with the quantity.
Flat price is a price that linearly scales with the quantity.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
PackagePriceInput = object { amount, package_units, rounding_behavior, price_type } 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.
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.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
rounding_behavior: "round_up" or "round_down"
The ID of the pricing metric to use for this rate.
The description of the rate displayed to the customer.
The number of units included in the rate before the price is applied.
Dimensional = object { code, dimensions, name, 5 more }
Code of this rate to be used for price multipliers. This code must be unique within the rate card.
dimensions: array of object { key, values, description } The dimensions of the rate.
The dimensions of the rate.
The name of the dimension. This is used to identify the dimension in the pricing matrix.
A list of possible values for the dimension.
The description of the dimension.
The name of the rate displayed to the customer.
pricing_matrix: object { cells } The pricing matrix of the rate.
The pricing matrix of the rate.
cells: array of object { dimension_coordinates, price }
A key-value mapping of dimension keys and values to identify the price for a given set of dimension values.
price: FlatPriceInput { amount, price_type } or PackagePriceInput { amount, package_units, rounding_behavior, price_type } The price for the cell.
The price for the cell.
FlatPriceInput = object { amount, price_type } Flat price is a price that linearly scales with the quantity.
Flat price is a price that linearly scales with the quantity.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
PackagePriceInput = object { amount, package_units, rounding_behavior, price_type } 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.
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.
The currency code of the amount.
value: number or stringThe value of the amount in the smallest unit of the currency.
The value of the amount in the smallest unit of the currency.
rounding_behavior: "round_up" or "round_down"
The ID of the pricing metric to use for this rate.
The description of the rate displayed to the customer.
The number of units included in the rate before the price is applied.
ReturnsExpand Collapse
Add Rates To Rate Catalog
curl https://api.uselark.ai/rate-catalogs/$RATE_CATALOG_ID/add_rates \
-H 'Content-Type: application/json' \
-H "X-API-Key: $LARK_API_KEY" \
-d '{
"billing_interval": "monthly"
}'
{
"id": "rate_catalog_AJWMxR81jxoRlli6p13uf3JB",
"description": "Rates for EC2 usage",
"name": "EC2 Rates",
"rate_count": 5
}
Returns Examples
{
"id": "rate_catalog_AJWMxR81jxoRlli6p13uf3JB",
"description": "Rates for EC2 usage",
"name": "EC2 Rates",
"rate_count": 5
}