TypeScript
import { PriceOS } from "priceos"; import type { MyFeatures } from "./priceos.types"; const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!); const featureAccess = await priceos.features.getAccess("customer_123"); const hasPrioritySupport = featureAccess.priority_support?.hasAccess;
{ "api_calls": { "hasAccess": true, "type": "limit", "limit": 1000, "isUnlimited": false, "usage": { "used": 120, "remaining": 880, "bonusRemaining": 25, "hasReachedLimit": false, "bonusUsed": 5, "nextReset": 1738368000000, "lastReset": 1735689600000 } }, "team_seats": { "hasAccess": true, "type": "boolean" } }
Return feature access for a customer.
API key from your PriceOS dashboard.
Internal customer ID. If the customer ID does not exist yet, it will be created.
Feature access lookup
Feature access map.
Show child attributes