GET
/
api
/
plans
/
{plan_id}
/
curl --request GET \
  --url https://api.uselotus.io/api/plans/{plan_id}/ \
  --header 'Authorization: <api-key>'
{
  "plan_id": "<string>",
  "plan_name": "<string>",
  "plan_duration": "monthly",
  "plan_description": "<string>",
  "external_links": [
    {
      "source": "stripe",
      "external_plan_id": "<string>"
    }
  ],
  "num_versions": 123,
  "active_version": 123,
  "active_subscriptions": 123,
  "tags": [
    "<string>"
  ],
  "versions": [
    {
      "recurring_charges": [
        {
          "name": "<string>",
          "charge_timing": "in_advance",
          "charge_behavior": "prorate",
          "amount": 5000000000,
          "pricing_unit": {
            "code": "<string>",
            "name": "<string>",
            "symbol": "<string>"
          },
          "invoicing_interval_unit": "day",
          "invoicing_interval_count": 16383,
          "reset_interval_unit": "day",
          "reset_interval_count": 16383
        }
      ],
      "components": [
        {
          "billable_metric": {
            "metric_id": "<string>",
            "event_name": "<string>",
            "property_name": "<string>",
            "aggregation_type": "<string>",
            "granularity": "seconds",
            "event_type": "delta",
            "metric_type": "counter",
            "metric_name": "<string>",
            "numeric_filters": [
              {
                "property_name": "<string>",
                "operator": "gte",
                "comparison_value": 123
              }
            ],
            "categorical_filters": [
              {
                "property_name": "<string>",
                "operator": "isin",
                "comparison_value": [
                  "<string>"
                ]
              }
            ],
            "is_cost_metric": true,
            "custom_sql": "<string>",
            "proration": "seconds"
          },
          "tiers": [
            {
              "type": "flat",
              "range_start": 5000000000,
              "range_end": 5000000000,
              "cost_per_batch": 5000000000,
              "metric_units_per_batch": 5000000000,
              "batch_rounding_type": "<any>"
            }
          ],
          "pricing_unit": {
            "code": "<string>",
            "name": "<string>",
            "symbol": "<string>"
          },
          "invoicing_interval_unit": "day",
          "invoicing_interval_count": 123,
          "reset_interval_unit": "day",
          "reset_interval_count": 123,
          "prepaid_charge": {
            "units": 5000000000,
            "charge_behavior": "prorate"
          }
        }
      ],
      "features": [
        {
          "feature_id": "<string>",
          "feature_name": "<string>",
          "feature_description": "<string>"
        }
      ],
      "price_adjustment": {
        "price_adjustment_name": "<string>",
        "price_adjustment_description": "<string>",
        "price_adjustment_type": "percentage",
        "price_adjustment_amount": 0
      },
      "version": 123,
      "status": "active",
      "plan_name": "<string>",
      "currency": {
        "code": "<string>",
        "name": "<string>",
        "symbol": "<string>"
      },
      "active_from": "2023-11-07T05:31:56Z",
      "active_to": "2023-11-07T05:31:56Z",
      "localized_name": "<string>",
      "target_customers": [
        {
          "customer_name": "<string>",
          "email": "jsmith@example.com",
          "customer_id": "<string>"
        }
      ],
      "created_on": "2023-11-07T05:31:56Z",
      "usage_billing_frequency": "<string>",
      "flat_fee_billing_type": "in_advance",
      "flat_rate": 5000000000,
      "description": "<string>"
    }
  ],
  "parent_plan": {
    "plan_name": "<string>",
    "plan_id": "<string>"
  },
  "target_customer": {
    "customer_name": "<string>",
    "email": "jsmith@example.com",
    "customer_id": "<string>"
  },
  "display_version": {
    "recurring_charges": [
      {
        "name": "<string>",
        "charge_timing": "in_advance",
        "charge_behavior": "prorate",
        "amount": 5000000000,
        "pricing_unit": {
          "code": "<string>",
          "name": "<string>",
          "symbol": "<string>"
        },
        "invoicing_interval_unit": "day",
        "invoicing_interval_count": 16383,
        "reset_interval_unit": "day",
        "reset_interval_count": 16383
      }
    ],
    "components": [
      {
        "billable_metric": {
          "metric_id": "<string>",
          "event_name": "<string>",
          "property_name": "<string>",
          "aggregation_type": "<string>",
          "granularity": "seconds",
          "event_type": "delta",
          "metric_type": "counter",
          "metric_name": "<string>",
          "numeric_filters": [
            {
              "property_name": "<string>",
              "operator": "gte",
              "comparison_value": 123
            }
          ],
          "categorical_filters": [
            {
              "property_name": "<string>",
              "operator": "isin",
              "comparison_value": [
                "<string>"
              ]
            }
          ],
          "is_cost_metric": true,
          "custom_sql": "<string>",
          "proration": "seconds"
        },
        "tiers": [
          {
            "type": "flat",
            "range_start": 5000000000,
            "range_end": 5000000000,
            "cost_per_batch": 5000000000,
            "metric_units_per_batch": 5000000000,
            "batch_rounding_type": "<any>"
          }
        ],
        "pricing_unit": {
          "code": "<string>",
          "name": "<string>",
          "symbol": "<string>"
        },
        "invoicing_interval_unit": "day",
        "invoicing_interval_count": 123,
        "reset_interval_unit": "day",
        "reset_interval_count": 123,
        "prepaid_charge": {
          "units": 5000000000,
          "charge_behavior": "prorate"
        }
      }
    ],
    "features": [
      {
        "feature_id": "<string>",
        "feature_name": "<string>",
        "feature_description": "<string>"
      }
    ],
    "price_adjustment": {
      "price_adjustment_name": "<string>",
      "price_adjustment_description": "<string>",
      "price_adjustment_type": "percentage",
      "price_adjustment_amount": 0
    },
    "version": 123,
    "status": "active",
    "plan_name": "<string>",
    "currency": {
      "code": "<string>",
      "name": "<string>",
      "symbol": "<string>"
    },
    "active_from": "2023-11-07T05:31:56Z",
    "active_to": "2023-11-07T05:31:56Z",
    "localized_name": "<string>",
    "target_customers": [
      {
        "customer_name": "<string>",
        "email": "jsmith@example.com",
        "customer_id": "<string>"
      }
    ],
    "created_on": "2023-11-07T05:31:56Z",
    "usage_billing_frequency": "<string>",
    "flat_fee_billing_type": "in_advance",
    "flat_rate": 5000000000,
    "description": "<string>"
  },
  "status": "<string>"
}

Retrieves a plan object.

lotus.get_plan(
    plan_id='plan_0569173ee6654369',
)

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

plan_id
string
required

Query Parameters

version_currency_code
string

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

Minimum length: 1
version_custom_type
enum<string>
default:all

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
Available options:
custom_only,
public_only,
all
version_status
enum<string>[]

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

200 - application/json

The response is of type object.