GET

/api/plans/{plan_id}/

X-API-KEY*
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

Authorizationheaderrequired
string

Token-based authentication with required prefix "Token"

Path Parameters

plan_idrequired
string

Query Parameters

version_currency_code
string

Filter to versions that have the currency specified by this currency code.

version_custom_type
Default: "all"
string

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 Only
  • public_only - Public Only
  • all - All
version_status
Default: ["active","not_started","ended"]
array

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

active_subscriptionsrequired
integer

The number of active subscriptions that this plan has across all versions.

active_versionrequired
integer

This plan's currently active version.

display_versionrequired
object

[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.

external_linksrequired
array

The external links that this plan has.

num_versionsrequired
integer

The number of versions that this plan has.

parent_planrequired
object

[DEPRECATED] The parent plan that this plan has.

plan_descriptionrequired
string

Description of the plan

plan_durationrequired
string

Duration of the plan

  • monthly - Monthly
  • quarterly - Quarterly
  • yearly - Yearly
Available options:
monthly,
quarterly,
yearly,
null
plan_idrequired
string
plan_namerequired
string

Name of the plan

statusrequired
string

[DEPRECATED] The status of this plan.

tagsrequired
string[]

The tags that this plan has.

target_customerrequired
object

[DEPRECATED] The target customer that this plan has.

versionsrequired
array

This plan's versions.