GET
/
api
/
subscriptions
/
curl --request GET \
  --url https://api.uselotus.io/api/subscriptions/ \
  --header 'Authorization: <api-key>'
[
  {
    "addons": [
      {
        "addon": {
          "addon_id": "<string>",
          "addon_name": "<string>",
          "addon_type": "flat",
          "billing_frequency": "one_time"
        },
        "addon_subscription_id": "<string>",
        "end_date": "2023-11-07T05:31:56Z",
        "fully_billed": true,
        "start_date": "2023-11-07T05:31:56Z"
      }
    ],
    "auto_renew": true,
    "billing_plan": {
      "plan_id": "<string>",
      "plan_name": "<string>",
      "version": 123,
      "version_id": "<string>"
    },
    "customer": {
      "customer_id": "<string>",
      "customer_name": "<string>",
      "email": "jsmith@example.com"
    },
    "end_date": "2023-11-07T05:31:56Z",
    "fully_billed": true,
    "is_new": true,
    "metadata": {},
    "start_date": "2023-11-07T05:31:56Z",
    "subscription_filters": [
      {
        "property_name": "<string>",
        "value": "<string>"
      }
    ],
    "subscription_id": "<string>"
  }
]

Retrieves an array of subscription objects.

lotus.list_subscriptions(customer_id="cust_id")

Authorizations

Authorization
string
headerrequired

Token-based authentication with required prefix "Token"

Query Parameters

customer_id
string | null
required

Filter to a specific customer.

plan_id
string

Filter to a specific plan.

range_end
string

If specified, will only return subscriptions with a start date before this date.

range_start
string

If specified, will only return subscriptions with an end date after this date.

status
enum<string>[]

Filter to a specific set of subscription statuses. Defaults to active.

Available options:
active,
ended,
not_started
subscription_filters
object[]

Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'.

Response

200 - application/json
addons
object[]
required
auto_renew
boolean
required

Whether the subscription automatically renews. Defaults to true.

billing_plan
object
required
customer
object
required
end_date
string
required

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

fully_billed
boolean
required
is_new
boolean
required

Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.

metadata
object
required
start_date
string
required

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

subscription_filters
object[]
required
subscription_id
string
required