Update a price with the specified configuration
curl --request PUT \
--url https://api.cloud.flexprice.io/v1/prices/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"billing_model": "FLAT_FEE",
"description": "<string>",
"display_name": "<string>",
"effective_from": "<string>",
"group_id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"price_unit_amount": "<string>",
"price_unit_tiers": [
{
"unit_amount": "<string>",
"flat_amount": "<string>",
"up_to": 123
}
],
"tier_mode": "VOLUME",
"tiers": [
{
"unit_amount": "<string>",
"flat_amount": "<string>",
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "up"
}
}
'{
"addon": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{
"addon": "<unknown>",
"created_at": "<string>",
"created_by": "<string>",
"display_order": 123,
"end_date": "<string>",
"entity_id": "<string>",
"entity_type": "PLAN",
"environment_id": "<string>",
"feature": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"condition": "above",
"threshold": 123
},
"info": {
"condition": "above",
"threshold": 123
},
"warning": {
"condition": "above",
"threshold": 123
}
},
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"bucket_size": "MINUTE",
"field": "<string>",
"multiplier": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"parent_entitlement_id": "<string>",
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"credit_grants": [
{
"cadence": "ONETIME",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"credit_grant_anchor": "<string>",
"credits": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"expiration_duration": 123,
"expiration_duration_unit": "DAY",
"expiration_type": "NEVER",
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"description": "<string>",
"display_order": 123,
"entitlements": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"plan_id": "<string>",
"start_date": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"type": "onetime",
"updated_at": "<string>",
"updated_by": "<string>"
},
"amount": "<string>",
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"display_name": "<string>",
"display_price_unit_amount": "<string>",
"end_date": "<string>",
"entity_id": "<string>",
"entity_type": "PLAN",
"environment_id": "<string>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"bucket_size": "MINUTE",
"field": "<string>",
"multiplier": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"min_quantity": "<string>",
"parent_price_id": "<string>",
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"credit_grants": [
{
"cadence": "ONETIME",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"credit_grant_anchor": "<string>",
"credits": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"expiration_duration": 123,
"expiration_duration_unit": "DAY",
"expiration_type": "NEVER",
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"description": "<string>",
"display_order": 123,
"entitlements": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"price_unit": "<string>",
"price_unit_amount": "<string>",
"price_unit_id": "<string>",
"price_unit_tiers": [
{
"flat_amount": "<string>",
"unit_amount": "<string>",
"up_to": 123
}
],
"price_unit_type": "FIAT",
"pricing_unit": {
"base_currency": "<string>",
"code": "<string>",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"status": "published",
"symbol": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"start_date": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": "<string>",
"unit_amount": "<string>",
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "up"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}Enter your API key in the format x-api-key <api-key>*
Price ID
Price configuration
Amount is the new price amount that overrides the original price (optional)
FLAT_FEE, PACKAGE, TIERED GroupID is the id of the group to update the price in
All price fields that can be updated Non-critical fields (can be updated directly)
Show child attributes
PriceUnitAmount is the price unit amount (for CUSTOM price unit type, FLAT_FEE/PACKAGE billing models)
PriceUnitTiers are the price unit tiers (for CUSTOM price unit type, TIERED billing model)
Show child attributes
VOLUME, SLAB Tiers determines the pricing tiers for this line item
Show child attributes
Show child attributes
OK
Show child attributes
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING, ONETIME FLAT_FEE, PACKAGE, TIERED MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
ConversionRate is the conversion rate of the price unit to the fiat currency
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
DisplayName is the name of the price
DisplayPriceUnitAmount is the formatted amount of the price unit
EndDate is the end date of the price
EntityID holds the value of the "entity_id" field.
PLAN, SUBSCRIPTION, ADDON, PRICE, COSTSHEET EnvironmentID is the environment identifier for the price
Show child attributes
GroupID references the group this price belongs to
ID uuid identifier for the price
ARREAR, ADVANCE LookupKey used for looking up the price in the database
Show child attributes
Show child attributes
MeterID is the id of the meter for usage based pricing
MinQuantity is the minimum quantity of the price
ParentPriceID references the root price (always set for price lineage tracking)
Show child attributes
PriceUnit is the code of the price unit (e.g., 'btc', 'eth')
PriceUnitAmount is the amount of the price unit
PriceUnitID is the id of the price unit (for CUSTOM type)
PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED
Show child attributes
FIAT, CUSTOM Show child attributes
StartDate is the start date of the price
published, deleted, archived VOLUME, SLAB Show child attributes
Show child attributes
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE, FIXED curl --request PUT \
--url https://api.cloud.flexprice.io/v1/prices/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"billing_model": "FLAT_FEE",
"description": "<string>",
"display_name": "<string>",
"effective_from": "<string>",
"group_id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"price_unit_amount": "<string>",
"price_unit_tiers": [
{
"unit_amount": "<string>",
"flat_amount": "<string>",
"up_to": 123
}
],
"tier_mode": "VOLUME",
"tiers": [
{
"unit_amount": "<string>",
"flat_amount": "<string>",
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "up"
}
}
'{
"addon": {
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"entitlements": [
{
"addon": "<unknown>",
"created_at": "<string>",
"created_by": "<string>",
"display_order": 123,
"end_date": "<string>",
"entity_id": "<string>",
"entity_type": "PLAN",
"environment_id": "<string>",
"feature": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"condition": "above",
"threshold": 123
},
"info": {
"condition": "above",
"threshold": 123
},
"warning": {
"condition": "above",
"threshold": 123
}
},
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"bucket_size": "MINUTE",
"field": "<string>",
"multiplier": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"name": "<string>",
"status": "published",
"tenant_id": "<string>",
"type": "metered",
"unit_plural": "<string>",
"unit_singular": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"feature_id": "<string>",
"feature_type": "metered",
"id": "<string>",
"is_enabled": true,
"is_soft_limit": true,
"parent_entitlement_id": "<string>",
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"credit_grants": [
{
"cadence": "ONETIME",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"credit_grant_anchor": "<string>",
"credits": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"expiration_duration": 123,
"expiration_duration_unit": "DAY",
"expiration_type": "NEVER",
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"description": "<string>",
"display_order": 123,
"entitlements": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"plan_id": "<string>",
"start_date": "<string>",
"static_value": "<string>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>",
"usage_limit": 123,
"usage_reset_period": "MONTHLY"
}
],
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"type": "onetime",
"updated_at": "<string>",
"updated_by": "<string>"
},
"amount": "<string>",
"billing_cadence": "RECURRING",
"billing_model": "FLAT_FEE",
"billing_period": "MONTHLY",
"billing_period_count": 123,
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"currency": "<string>",
"description": "<string>",
"display_amount": "<string>",
"display_name": "<string>",
"display_price_unit_amount": "<string>",
"end_date": "<string>",
"entity_id": "<string>",
"entity_type": "PLAN",
"environment_id": "<string>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter": {
"aggregation": {
"bucket_size": "MINUTE",
"field": "<string>",
"multiplier": "<string>",
"type": "COUNT"
},
"created_at": "2024-03-20T15:04:05Z",
"event_name": "api_request",
"filters": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "API Usage Meter",
"reset_usage": "BILLING_PERIOD",
"status": "published",
"tenant_id": "tenant123",
"updated_at": "2024-03-20T15:04:05Z"
},
"meter_id": "<string>",
"min_quantity": "<string>",
"parent_price_id": "<string>",
"plan": {
"created_at": "<string>",
"created_by": "<string>",
"credit_grants": [
{
"cadence": "ONETIME",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"credit_grant_anchor": "<string>",
"credits": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"expiration_duration": 123,
"expiration_duration_unit": "DAY",
"expiration_type": "NEVER",
"id": "<string>",
"metadata": {},
"name": "<string>",
"period": "DAILY",
"period_count": 123,
"plan_id": "<string>",
"priority": 123,
"scope": "PLAN",
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"description": "<string>",
"display_order": 123,
"entitlements": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": "<array>",
"status": "published",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"price_unit": "<string>",
"price_unit_amount": "<string>",
"price_unit_id": "<string>",
"price_unit_tiers": [
{
"flat_amount": "<string>",
"unit_amount": "<string>",
"up_to": 123
}
],
"price_unit_type": "FIAT",
"pricing_unit": {
"base_currency": "<string>",
"code": "<string>",
"conversion_rate": "<string>",
"created_at": "<string>",
"created_by": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"status": "published",
"symbol": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
},
"start_date": "<string>",
"status": "published",
"tenant_id": "<string>",
"tier_mode": "VOLUME",
"tiers": [
{
"flat_amount": "<string>",
"unit_amount": "<string>",
"up_to": 123
}
],
"transform_quantity": {
"divide_by": 123,
"round": "up"
},
"trial_period": 123,
"type": "USAGE",
"updated_at": "<string>",
"updated_by": "<string>"
}