GET
/
api
/
customer_metric_access
/
curl --request GET \
  --url https://api.uselotus.io/api/customer_metric_access/ \
  --header 'X-API-KEY: <api-key>'
[
  {
    "plan_id": "<string>",
    "subscription_filters": [
      {
        "property_name": "<string>",
        "value": "<string>"
      }
    ],
    "usage_per_component": [
      {
        "event_name": "<string>",
        "metric_free_limit": 123,
        "metric_id": "<string>",
        "metric_name": "<string>",
        "metric_total_limit": 123,
        "metric_usage": 123
      }
    ]
  }
]
lotus.get_customer_metric_access(
  customer_id= "cust_0569173ee6654369",
  event_name='api_call',
)

Authorizations

X-API-KEY
string
headerrequired

Query Parameters

customer_id
string | null
required

The customer_id of the customer you want to check access.

event_name
string | null

The name of the event you are checking access for.

metric_id
string | null

The metric_id of the metric you are checking access for. Please note that you must porovide exactly one of event_name and metric_id are mutually; a validation error will be thrown if both or none are provided.

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. This must be passed in as a stringified JSON object.

Response

200 - application/json
plan_id
string
required

The plan_id of the plan we are checking that has access to this feature.

subscription_filters
object[]
required

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.

usage_per_component
object[]
required

The usage of each component of the plan the customer is on. Only components that match the request will be included: If metric_id is provided, this will be a list of length 1. If event_name is provided, this will be a list of length 1 or more depending on how many components of the customer's plan use this event.