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

access_per_subscription
object[]
required
customer
object
required
feature
object
required