GET
/
api
/
metric_access
/
curl --request GET \
  --url https://api.uselotus.io/api/metric_access/ \
  --header 'X-API-KEY: <api-key>'
{
  "customer": {
    "customer_name": "<string>",
    "email": "jsmith@example.com",
    "customer_id": "<string>"
  },
  "access": true,
  "metric": {
    "metric_id": "<string>",
    "event_name": "<string>",
    "metric_name": "<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
        }
      },
      "metric_usage": 5000000000,
      "metric_free_limit": 5000000000,
      "metric_total_limit": 5000000000
    }
  ]
}
lotus.check_metric_access(
  customer_id="cust_0569173ee6654369",
  metric_id="metric_a47ac0bf",
)

Authorizations

X-API-KEY
string
header
required

Query Parameters

customer_id
string | null
required

The customer_id of the customer you want to check access.

Minimum length: 1
metric_id
string
required

The metric_id of the metric you want to check access for.

subscription_filters
object[]

Used if you want to restrict the access check to only plans that fulfill certain subscription filter criteria. 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

The response is of type object.