Get Plan
/api/plans/{plan_id}/
curl --request GET \
--url https://api.uselotus.io/api/plans/{plan_id}/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'
{
"active_subscriptions": "integer",
"active_version": "integer",
"display_version": {
"active_from": "string",
"active_to": "string",
"components": [
{
"billable_metric": {
"aggregation_type": "string",
"categorical_filters": [
{
"comparison_value": [
"string"
],
"operator": "isin",
"property_name": "string"
}
],
"custom_sql": "string",
"event_name": "string",
"event_type": "delta",
"granularity": "seconds",
"is_cost_metric": "boolean",
"metric_id": "string",
"metric_name": "string",
"metric_type": "counter",
"numeric_filters": [
{
"comparison_value": "number",
"operator": "gte",
"property_name": "string"
}
],
"property_name": "string",
"proration": "seconds"
},
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"prepaid_charge": {
"charge_behavior": "prorate",
"units": "number"
},
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day",
"tiers": [
{
"batch_rounding_type": "round_up",
"cost_per_batch": "number",
"metric_units_per_batch": "number",
"range_end": "number",
"range_start": "number",
"type": "flat"
}
]
}
],
"created_on": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"description": "string",
"features": [
{
"feature_description": "string",
"feature_id": "string",
"feature_name": "string"
}
],
"flat_fee_billing_type": "in_advance",
"flat_rate": "number",
"localized_name": "string",
"plan_name": "string",
"price_adjustment": {
"price_adjustment_amount": "number",
"price_adjustment_description": "string",
"price_adjustment_name": "string",
"price_adjustment_type": "percentage"
},
"recurring_charges": [
{
"amount": "number",
"charge_behavior": "prorate",
"charge_timing": "in_advance",
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"name": "string",
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day"
}
],
"status": "active",
"target_customers": [
{
"customer_id": "string",
"customer_name": "string",
"email": "string"
}
],
"usage_billing_frequency": "string"
},
"external_links": [
{
"external_plan_id": "string",
"source": "stripe"
}
],
"num_versions": "integer",
"parent_plan": {
"plan_id": "string",
"plan_name": "string"
},
"plan_description": "string",
"plan_duration": "monthly",
"plan_id": "string",
"plan_name": "string",
"status": "string",
"tags": [
"string"
],
"target_customer": {
"customer_id": "string",
"customer_name": "string",
"email": "string"
},
"versions": [
{
"active_from": "string",
"active_to": "string",
"components": [
{
"billable_metric": {
"aggregation_type": "string",
"categorical_filters": [
{
"comparison_value": [
"string"
],
"operator": "isin",
"property_name": "string"
}
],
"custom_sql": "string",
"event_name": "string",
"event_type": "delta",
"granularity": "seconds",
"is_cost_metric": "boolean",
"metric_id": "string",
"metric_name": "string",
"metric_type": "counter",
"numeric_filters": [
{
"comparison_value": "number",
"operator": "gte",
"property_name": "string"
}
],
"property_name": "string",
"proration": "seconds"
},
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"prepaid_charge": {
"charge_behavior": "prorate",
"units": "number"
},
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day",
"tiers": [
{
"batch_rounding_type": "round_up",
"cost_per_batch": "number",
"metric_units_per_batch": "number",
"range_end": "number",
"range_start": "number",
"type": "flat"
}
]
}
],
"created_on": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"description": "string",
"features": [
{
"feature_description": "string",
"feature_id": "string",
"feature_name": "string"
}
],
"flat_fee_billing_type": "in_advance",
"flat_rate": "number",
"localized_name": "string",
"plan_name": "string",
"price_adjustment": {
"price_adjustment_amount": "number",
"price_adjustment_description": "string",
"price_adjustment_name": "string",
"price_adjustment_type": "percentage"
},
"recurring_charges": [
{
"amount": "number",
"charge_behavior": "prorate",
"charge_timing": "in_advance",
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"name": "string",
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day"
}
],
"status": "active",
"target_customers": [
{
"customer_id": "string",
"customer_name": "string",
"email": "string"
}
],
"usage_billing_frequency": "string"
}
]
}
Retrieves a plan object.
lotus.get_plan(
plan_id='plan_0569173ee6654369',
)
Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
Query Parameters
Filter to versions that have the currency specified by this currency code.
Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers.
custom_only
- Custom Onlypublic_only
- Public Onlyall
- All
Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null.
Response
The number of active subscriptions that this plan has across all versions.
This plan's currently active version.
[DEPRECATED] Display version has been deprecated. Use 'versions' instead. We will still return this field for now with some heuristics for figuring out what the desired version is, but it will be removed in the near future.
The external links that this plan has.
The number of versions that this plan has.
[DEPRECATED] The parent plan that this plan has.
Description of the plan
Duration of the plan
monthly
- Monthlyquarterly
- Quarterlyyearly
- Yearly
monthly
, quarterly
, yearly
, null
Name of the plan
[DEPRECATED] The status of this plan.
The tags that this plan has.
[DEPRECATED] The target customer that this plan has.
This plan's versions.
curl --request GET \
--url https://api.uselotus.io/api/plans/{plan_id}/ \
--header 'Authorization: <authorization>' \
--header 'X-API-KEY: <x-api-key>'
{
"active_subscriptions": "integer",
"active_version": "integer",
"display_version": {
"active_from": "string",
"active_to": "string",
"components": [
{
"billable_metric": {
"aggregation_type": "string",
"categorical_filters": [
{
"comparison_value": [
"string"
],
"operator": "isin",
"property_name": "string"
}
],
"custom_sql": "string",
"event_name": "string",
"event_type": "delta",
"granularity": "seconds",
"is_cost_metric": "boolean",
"metric_id": "string",
"metric_name": "string",
"metric_type": "counter",
"numeric_filters": [
{
"comparison_value": "number",
"operator": "gte",
"property_name": "string"
}
],
"property_name": "string",
"proration": "seconds"
},
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"prepaid_charge": {
"charge_behavior": "prorate",
"units": "number"
},
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day",
"tiers": [
{
"batch_rounding_type": "round_up",
"cost_per_batch": "number",
"metric_units_per_batch": "number",
"range_end": "number",
"range_start": "number",
"type": "flat"
}
]
}
],
"created_on": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"description": "string",
"features": [
{
"feature_description": "string",
"feature_id": "string",
"feature_name": "string"
}
],
"flat_fee_billing_type": "in_advance",
"flat_rate": "number",
"localized_name": "string",
"plan_name": "string",
"price_adjustment": {
"price_adjustment_amount": "number",
"price_adjustment_description": "string",
"price_adjustment_name": "string",
"price_adjustment_type": "percentage"
},
"recurring_charges": [
{
"amount": "number",
"charge_behavior": "prorate",
"charge_timing": "in_advance",
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"name": "string",
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day"
}
],
"status": "active",
"target_customers": [
{
"customer_id": "string",
"customer_name": "string",
"email": "string"
}
],
"usage_billing_frequency": "string"
},
"external_links": [
{
"external_plan_id": "string",
"source": "stripe"
}
],
"num_versions": "integer",
"parent_plan": {
"plan_id": "string",
"plan_name": "string"
},
"plan_description": "string",
"plan_duration": "monthly",
"plan_id": "string",
"plan_name": "string",
"status": "string",
"tags": [
"string"
],
"target_customer": {
"customer_id": "string",
"customer_name": "string",
"email": "string"
},
"versions": [
{
"active_from": "string",
"active_to": "string",
"components": [
{
"billable_metric": {
"aggregation_type": "string",
"categorical_filters": [
{
"comparison_value": [
"string"
],
"operator": "isin",
"property_name": "string"
}
],
"custom_sql": "string",
"event_name": "string",
"event_type": "delta",
"granularity": "seconds",
"is_cost_metric": "boolean",
"metric_id": "string",
"metric_name": "string",
"metric_type": "counter",
"numeric_filters": [
{
"comparison_value": "number",
"operator": "gte",
"property_name": "string"
}
],
"property_name": "string",
"proration": "seconds"
},
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"prepaid_charge": {
"charge_behavior": "prorate",
"units": "number"
},
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day",
"tiers": [
{
"batch_rounding_type": "round_up",
"cost_per_batch": "number",
"metric_units_per_batch": "number",
"range_end": "number",
"range_start": "number",
"type": "flat"
}
]
}
],
"created_on": "string",
"currency": {
"code": "string",
"name": "string",
"symbol": "string"
},
"description": "string",
"features": [
{
"feature_description": "string",
"feature_id": "string",
"feature_name": "string"
}
],
"flat_fee_billing_type": "in_advance",
"flat_rate": "number",
"localized_name": "string",
"plan_name": "string",
"price_adjustment": {
"price_adjustment_amount": "number",
"price_adjustment_description": "string",
"price_adjustment_name": "string",
"price_adjustment_type": "percentage"
},
"recurring_charges": [
{
"amount": "number",
"charge_behavior": "prorate",
"charge_timing": "in_advance",
"invoicing_interval_count": "integer",
"invoicing_interval_unit": "day",
"name": "string",
"pricing_unit": {
"code": "string",
"name": "string",
"symbol": "string"
},
"reset_interval_count": "integer",
"reset_interval_unit": "day"
}
],
"status": "active",
"target_customers": [
{
"customer_id": "string",
"customer_name": "string",
"email": "string"
}
],
"usage_billing_frequency": "string"
}
]
}