GET
/
api
/
feature_access
/
curl --request GET \
  --url https://api.uselotus.io/api/feature_access/ \
  --header 'X-API-KEY: <api-key>'
{
  "customer": {
    "customer_name": "<string>",
    "email": "jsmith@example.com",
    "customer_id": "<string>"
  },
  "access": true,
  "feature": {
    "feature_id": "<string>",
    "feature_name": "<string>",
    "feature_description": "<string>"
  },
  "access_per_subscription": [
    {
      "subscription": {
        "start_date": "2023-11-07T05:31:56Z",
        "end_date": "2023-11-07T05:31:56Z",
        "subscription_filters": [
          {
            "value": "<string>",
            "property_name": "<string>"
          }
        ],
        "plan": {
          "plan_name": "<string>",
          "plan_id": "<string>",
          "version_id": "<string>",
          "version": 123
        }
      },
      "access": true
    }
  ]
}
lotus.check_feature_access(
  customer_id="cust_0569173ee6654369",
  feature_id="feature_a47ac0bf",
)

Authorizations

X-API-KEY
string
headerrequired

Query Parameters

customer_id
string | null
required

The customer_id of the customer you want to check access.

feature_id
string
required

The feature_id of the feature you want to check access for.

subscription_filters
object[]

The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you.

Response

200 - application/json
customer
object
required
access
boolean
required

Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend.

feature
object
required
access_per_subscription
object[]
required