Skip to main content
GET
/
v1
/
feature-access
Node.js
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"
  }
}

Headers

x-api-key
string
required

API key from your PriceOS dashboard.

Query Parameters

customerId
string
required

Internal customer ID. If the customer ID does not exist yet, it will be created.

Response

Feature access lookup

Feature access map.

{key}
Boolean · object