curl --request GET \
--url https://api.uselotus.io/api/plans/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/plans/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/plans/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uselotus.io/api/plans/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.uselotus.io/api/plans/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uselotus.io/api/plans/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/plans/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"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": "round_up"
}
],
"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": "round_up"
}
],
"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>"
}
]List plans
curl --request GET \
--url https://api.uselotus.io/api/plans/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/plans/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/plans/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uselotus.io/api/plans/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.uselotus.io/api/plans/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.uselotus.io/api/plans/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/plans/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"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": "round_up"
}
],
"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": "round_up"
}
],
"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>"
}
]duration, exclude_tags, include_tags, and include_tags_all will filter plan objects. version_currency_code, version_custom_type, and version_status will filter versions within those plans. If a plan has no versions that match the filter, it will not be returned.
lotus.list_plans()
await lotus.listPlans(); // will return a promise;
Authorizations
Token-based authentication with required prefix "Token"
Query Parameters
Filter to plans that have this duration.
monthly- Monthlyquarterly- Quarterlyyearly- Yearly
monthly, quarterly, yearly 1Filter to plans that do not have any of the tags in this list.
1Filter to plans that have any of the tags in this list.
1Filter to plans that have all of the tags in this list.
1Filter to versions that have the currency specified by this currency code.
1Filter 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
custom_only, public_only, all 1Filter 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.
active- Activeended- Endednot_started- Not Started
active, ended, not_started Response
Name of the plan
Duration of the plan
monthly- Monthlyquarterly- Quarterlyyearly- Yearly
monthly, quarterly, yearly, null Description of the plan
The external links that this plan has.
Show child attributes
Show child attributes
The number of versions that this plan has.
This plan's currently active version.
The number of active subscriptions that this plan has across all versions.
The tags that this plan has.
^[-a-zA-Z0-9_]+$This plan's versions.
Show child attributes
Show child attributes
[DEPRECATED] The parent plan that this plan has.
Show child attributes
Show child attributes
[DEPRECATED] The target customer that this plan has.
Show child attributes
Show child attributes
[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.
Show child attributes
Show child attributes
[DEPRECATED] The status of this plan.