Get Feature Access
curl --request GET \
--url https://api.uselotus.io/api/feature_access/ \
--header 'X-API-KEY: <x-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": []
}
}
],
"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
Query Parameters
The customer_id of the customer you want to check access.
The feature_id of the feature you want to check access for.
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
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.
curl --request GET \
--url https://api.uselotus.io/api/feature_access/ \
--header 'X-API-KEY: <x-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": []
}
}
],
"customer": {
"customer_id": "<string>",
"customer_name": "<string>",
"email": "jsmith@example.com"
},
"feature": {
"feature_description": "<string>",
"feature_id": "<string>",
"feature_name": "<string>"
}
}